[tinyexif] add TinyEXIF library (#2221)

This commit is contained in:
cDc 2017-12-09 10:24:19 +02:00 committed by Robert Schumacher
parent 940b33e52d
commit 19860a0933
3 changed files with 40 additions and 0 deletions

4
ports/tinyexif/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: tinyexif
Version: 1.0.0-1
Build-Depends: tinyxml2
Description: tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG images

View File

@ -0,0 +1,30 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cdcseacave/TinyEXIF
REF 1.0.0
SHA512 530b3e165bc51fa5a1bb29ea1f8cb5d7100a995347622d50375fdb5fab36139e9474d97ae2e3d54ac2886c2da1fe7138ed15710277410b6a6504ce05537fff28
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS}
-DBUILD_DEMO=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tinyexif")
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexif RENAME copyright)

View File

@ -190,6 +190,12 @@ macro(find_package name)
if(TIFF_LIBRARIES)
list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES})
endif()
elseif("${name}" STREQUAL "tinyxml2")
_find_package(${ARGV})
if(TARGET tinyxml2_static AND NOT TARGET tinyxml2)
add_library(tinyxml2 INTERFACE IMPORTED)
set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static")
endif()
elseif("${name}" STREQUAL "MPI")
if(MPI_C_LIB_NAMES)
set(MPI_C_WORKS TRUE)