|
|
|
@ -2,34 +2,58 @@ include(CMakePackageConfigHelpers)
|
|
|
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_library( exiv2lib_int OBJECT
|
|
|
|
|
canonmn_int.cpp canonmn_int.hpp
|
|
|
|
|
casiomn_int.cpp casiomn_int.hpp
|
|
|
|
|
cr2header_int.cpp cr2header_int.hpp
|
|
|
|
|
crwimage_int.cpp crwimage_int.hpp
|
|
|
|
|
fujimn_int.cpp fujimn_int.hpp
|
|
|
|
|
helper_functions.cpp helper_functions.hpp
|
|
|
|
|
image_int.cpp image_int.hpp
|
|
|
|
|
jp2image_int.cpp jp2image_int.hpp
|
|
|
|
|
makernote_int.cpp makernote_int.hpp
|
|
|
|
|
minoltamn_int.cpp minoltamn_int.hpp
|
|
|
|
|
nikonmn_int.cpp nikonmn_int.hpp
|
|
|
|
|
olympusmn_int.cpp olympusmn_int.hpp
|
|
|
|
|
orfimage_int.cpp orfimage_int.hpp
|
|
|
|
|
panasonicmn_int.cpp panasonicmn_int.hpp
|
|
|
|
|
pentaxmn_int.cpp pentaxmn_int.hpp
|
|
|
|
|
rw2image_int.cpp rw2image_int.hpp
|
|
|
|
|
add_library(
|
|
|
|
|
exiv2lib_int OBJECT
|
|
|
|
|
canonmn_int.cpp
|
|
|
|
|
canonmn_int.hpp
|
|
|
|
|
casiomn_int.cpp
|
|
|
|
|
casiomn_int.hpp
|
|
|
|
|
cr2header_int.cpp
|
|
|
|
|
cr2header_int.hpp
|
|
|
|
|
crwimage_int.cpp
|
|
|
|
|
crwimage_int.hpp
|
|
|
|
|
fujimn_int.cpp
|
|
|
|
|
fujimn_int.hpp
|
|
|
|
|
helper_functions.cpp
|
|
|
|
|
helper_functions.hpp
|
|
|
|
|
image_int.cpp
|
|
|
|
|
image_int.hpp
|
|
|
|
|
jp2image_int.cpp
|
|
|
|
|
jp2image_int.hpp
|
|
|
|
|
makernote_int.cpp
|
|
|
|
|
makernote_int.hpp
|
|
|
|
|
minoltamn_int.cpp
|
|
|
|
|
minoltamn_int.hpp
|
|
|
|
|
nikonmn_int.cpp
|
|
|
|
|
nikonmn_int.hpp
|
|
|
|
|
olympusmn_int.cpp
|
|
|
|
|
olympusmn_int.hpp
|
|
|
|
|
orfimage_int.cpp
|
|
|
|
|
orfimage_int.hpp
|
|
|
|
|
panasonicmn_int.cpp
|
|
|
|
|
panasonicmn_int.hpp
|
|
|
|
|
pentaxmn_int.cpp
|
|
|
|
|
pentaxmn_int.hpp
|
|
|
|
|
rw2image_int.cpp
|
|
|
|
|
rw2image_int.hpp
|
|
|
|
|
safe_op.hpp
|
|
|
|
|
samsungmn_int.cpp samsungmn_int.hpp
|
|
|
|
|
sigmamn_int.cpp sigmamn_int.hpp
|
|
|
|
|
sonymn_int.cpp sonymn_int.hpp
|
|
|
|
|
tags_int.cpp tags_int.hpp
|
|
|
|
|
tiffcomposite_int.cpp tiffcomposite_int.hpp
|
|
|
|
|
tiffimage_int.cpp tiffimage_int.hpp
|
|
|
|
|
tiffvisitor_int.cpp tiffvisitor_int.hpp
|
|
|
|
|
samsungmn_int.cpp
|
|
|
|
|
samsungmn_int.hpp
|
|
|
|
|
sigmamn_int.cpp
|
|
|
|
|
sigmamn_int.hpp
|
|
|
|
|
sonymn_int.cpp
|
|
|
|
|
sonymn_int.hpp
|
|
|
|
|
tags_int.cpp
|
|
|
|
|
tags_int.hpp
|
|
|
|
|
tiffcomposite_int.cpp
|
|
|
|
|
tiffcomposite_int.hpp
|
|
|
|
|
tiffimage_int.cpp
|
|
|
|
|
tiffimage_int.hpp
|
|
|
|
|
tiffvisitor_int.cpp
|
|
|
|
|
tiffvisitor_int.hpp
|
|
|
|
|
tifffwd_int.hpp
|
|
|
|
|
utils.hpp utils.cpp
|
|
|
|
|
utils.hpp
|
|
|
|
|
utils.cpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(PUBLIC_HEADERS
|
|
|
|
@ -76,7 +100,8 @@ set(PUBLIC_HEADERS
|
|
|
|
|
../include/exiv2/xmpsidecar.hpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add_library( exiv2lib
|
|
|
|
|
add_library(
|
|
|
|
|
exiv2lib
|
|
|
|
|
asfvideo.cpp
|
|
|
|
|
basicio.cpp
|
|
|
|
|
bmffimage.cpp
|
|
|
|
@ -121,10 +146,14 @@ add_library( exiv2lib
|
|
|
|
|
)
|
|
|
|
|
add_library(Exiv2::exiv2lib ALIAS exiv2lib)
|
|
|
|
|
|
|
|
|
|
generate_export_header(exiv2lib
|
|
|
|
|
EXPORT_MACRO_NAME EXIV2API
|
|
|
|
|
EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/exiv2lib_export.h
|
|
|
|
|
STATIC_DEFINE exiv2lib_STATIC
|
|
|
|
|
generate_export_header(
|
|
|
|
|
exiv2lib
|
|
|
|
|
EXPORT_MACRO_NAME
|
|
|
|
|
EXIV2API
|
|
|
|
|
EXPORT_FILE_NAME
|
|
|
|
|
${CMAKE_BINARY_DIR}/exiv2lib_export.h
|
|
|
|
|
STATIC_DEFINE
|
|
|
|
|
exiv2lib_STATIC
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Conditional addition of sources to library targets
|
|
|
|
@ -153,8 +182,9 @@ endif()
|
|
|
|
|
# Other library target properties
|
|
|
|
|
# ---------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
set_target_properties( exiv2lib PROPERTIES
|
|
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
|
set_target_properties(
|
|
|
|
|
exiv2lib
|
|
|
|
|
PROPERTIES VERSION ${PROJECT_VERSION}
|
|
|
|
|
SOVERSION ${EXIV2LIB_SOVERSION}
|
|
|
|
|
OUTPUT_NAME exiv2
|
|
|
|
|
PDB_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
@ -165,16 +195,11 @@ if (MSVC)
|
|
|
|
|
set_target_properties(exiv2lib PROPERTIES LINK_FLAGS "/ignore:4099")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set_target_properties( exiv2lib_int PROPERTIES
|
|
|
|
|
POSITION_INDEPENDENT_CODE ON
|
|
|
|
|
COMPILE_DEFINITIONS exiv2lib_EXPORTS
|
|
|
|
|
)
|
|
|
|
|
set_target_properties(exiv2lib_int PROPERTIES POSITION_INDEPENDENT_CODE ON COMPILE_DEFINITIONS exiv2lib_EXPORTS)
|
|
|
|
|
|
|
|
|
|
# NOTE: Cannot use target_link_libraries on OBJECT libraries with old versions of CMake
|
|
|
|
|
target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR})
|
|
|
|
|
target_include_directories(exiv2lib SYSTEM PRIVATE
|
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>
|
|
|
|
|
)
|
|
|
|
|
target_include_directories(exiv2lib SYSTEM PRIVATE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/xmpsdk/include>)
|
|
|
|
|
|
|
|
|
|
if(EXIV2_ENABLE_XMP OR EXIV2_ENABLE_EXTERNAL_XMP)
|
|
|
|
|
target_include_directories(exiv2lib PRIVATE ${EXPAT_INCLUDE_DIR})
|
|
|
|
@ -191,15 +216,12 @@ elseif(EXIV2_ENABLE_EXTERNAL_XMP)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Use include/exiv2 to build library code
|
|
|
|
|
target_include_directories(exiv2lib PUBLIC
|
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/exiv2>
|
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
|
|
|
|
target_include_directories(
|
|
|
|
|
exiv2lib PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/exiv2> $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
|
|
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
target_include_directories(exiv2lib_int PUBLIC
|
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/exiv2>
|
|
|
|
|
)
|
|
|
|
|
target_include_directories(exiv2lib_int PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/exiv2>)
|
|
|
|
|
|
|
|
|
|
if(EXIV2_ENABLE_WEBREADY)
|
|
|
|
|
if(EXIV2_ENABLE_CURL)
|
|
|
|
@ -273,8 +295,14 @@ endif()
|
|
|
|
|
list(SORT requires_private_list)
|
|
|
|
|
string(REPLACE ";" ", " requires_private_string "${requires_private_list}")
|
|
|
|
|
|
|
|
|
|
set(libs_private_for_pc_file "${libs_private_string}" PARENT_SCOPE)
|
|
|
|
|
set(requires_private_for_pc_file "${requires_private_string}" PARENT_SCOPE)
|
|
|
|
|
set(libs_private_for_pc_file
|
|
|
|
|
"${libs_private_string}"
|
|
|
|
|
PARENT_SCOPE
|
|
|
|
|
)
|
|
|
|
|
set(requires_private_for_pc_file
|
|
|
|
|
"${requires_private_string}"
|
|
|
|
|
PARENT_SCOPE
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
write_basic_package_version_file(exiv2ConfigVersion.cmake COMPATIBILITY ExactVersion)
|
|
|
|
|
|
|
|
|
@ -282,25 +310,17 @@ install(TARGETS exiv2lib EXPORT exiv2Export)
|
|
|
|
|
|
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
|
configure_package_config_file(
|
|
|
|
|
../cmake/exiv2Config.cmake.in
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/exiv2Config.cmake
|
|
|
|
|
INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2"
|
|
|
|
|
../cmake/exiv2Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/exiv2Config.cmake INSTALL_DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install(FILES
|
|
|
|
|
${PUBLIC_HEADERS}
|
|
|
|
|
${CMAKE_BINARY_DIR}/exv_conf.h
|
|
|
|
|
${CMAKE_BINARY_DIR}/exiv2lib_export.h
|
|
|
|
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/exiv2)
|
|
|
|
|
install(FILES ${PUBLIC_HEADERS} ${CMAKE_BINARY_DIR}/exv_conf.h ${CMAKE_BINARY_DIR}/exiv2lib_export.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/exiv2)
|
|
|
|
|
|
|
|
|
|
install(EXPORT exiv2Export
|
|
|
|
|
install(
|
|
|
|
|
EXPORT exiv2Export
|
|
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2"
|
|
|
|
|
NAMESPACE Exiv2::
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
install(
|
|
|
|
|
FILES
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/exiv2ConfigVersion.cmake
|
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/exiv2Config.cmake
|
|
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2")
|
|
|
|
|
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2ConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2Config.cmake
|
|
|
|
|
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/exiv2"
|
|
|
|
|
)
|
|
|
|
|