Remove exiv2-xmp from CMake exported config

main
Miloš Komarčević 2 years ago committed by Rosen Penev
parent 972795741b
commit c04dcc8341

@ -188,7 +188,7 @@ if (EXIV2_ENABLE_XMP OR EXIV2_ENABLE_EXTERNAL_XMP)
endif()
if (EXIV2_ENABLE_XMP)
target_link_libraries(exiv2lib PRIVATE exiv2-xmp)
target_sources(exiv2lib PRIVATE $<TARGET_OBJECTS:exiv2-xmp>)
elseif(EXIV2_ENABLE_EXTERNAL_XMP)
target_link_libraries(exiv2lib PUBLIC ${XMPSDK_LIBRARY})
target_include_directories(exiv2lib PUBLIC ${XMPSDK_INCLUDE_DIR})

@ -26,14 +26,10 @@ add_library(exiv2-xmp OBJECT
include/XMP_Version.h
)
target_link_libraries(exiv2-xmp
PRIVATE
EXPAT::EXPAT
)
target_include_directories(exiv2-xmp SYSTEM
PRIVATE
${PROJECT_SOURCE_DIR}/xmpsdk/include
${EXPAT_INCLUDE_DIRS}
)
# Prevent a denial-service-attack related to XML entity expansion
@ -41,7 +37,7 @@ target_include_directories(exiv2-xmp SYSTEM
# See https://bugzilla.redhat.com/show_bug.cgi?id=888769
target_compile_definitions(exiv2-xmp PRIVATE BanAllEntityUsage=1)
if (MSVC)
if (WIN32)
target_compile_definitions(exiv2-xmp PRIVATE XML_STATIC)
endif()
@ -53,10 +49,3 @@ endif()
if (BUILD_SHARED_LIBS)
set_property(TARGET exiv2-xmp PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
# 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}
)

Loading…
Cancel
Save