diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a379bbc9..cbdf7496 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -144,7 +144,10 @@ set_target_properties( exiv2lib_int PROPERTIES ) target_include_directories(exiv2lib_int PRIVATE ${ZLIB_INCLUDE_DIR}) -target_include_directories(exiv2lib PRIVATE ${ZLIB_INCLUDE_DIR}) +target_include_directories(exiv2lib PRIVATE + $ + ${ZLIB_INCLUDE_DIR} +) if (EXIV2_ENABLE_XMP) target_link_libraries(exiv2lib PRIVATE exiv2-xmp) diff --git a/xmpsdk/CMakeLists.txt b/xmpsdk/CMakeLists.txt index 8728cadb..a22698fb 100644 --- a/xmpsdk/CMakeLists.txt +++ b/xmpsdk/CMakeLists.txt @@ -28,13 +28,12 @@ add_library(exiv2-xmp STATIC target_link_libraries(exiv2-xmp PRIVATE - ${EXPAT_LIBRARY} + $ ) target_include_directories(exiv2-xmp - PUBLIC - $ PRIVATE + $ ${EXPAT_INCLUDE_DIR} ) @@ -50,8 +49,9 @@ if (BUILD_SHARED_LIBS) set_property(TARGET exiv2-xmp PROPERTY POSITION_INDEPENDENT_CODE ON) endif() -# 1119 Install libxmp.a for use by third party applications (Thanks, Emmanuel) -install(TARGETS exiv2-xmp EXPORT exiv2Config - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +# The private dependencies of a static library still need to be exported because they are needed to properly link the consumers of the static library. +install(TARGETS exiv2-xmp EXPORT exiv2Config + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )