diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 5cfe20f6..59cf8f0b 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -75,7 +75,7 @@ if (MSVC) target_sources(metacopy PRIVATE ../src/getopt_win32.c) endif() -if( EXIV2_ENABLE_LIBXMP ) +if( EXIV2_ENABLE_XMP ) add_executable( geotag geotag.cpp) target_link_libraries( geotag PRIVATE exiv2lib ${ZLIB_LIBRARIES}) install( TARGETS geotag RUNTIME DESTINATION bin) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d41c6725..32680ed8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -199,7 +199,10 @@ if ( UNIX AND CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" ) set (FREEBSD 1) endif() -target_include_directories(exiv2lib PRIVATE ${CMAKE_SOURCE_DIR}/xmpsdk/include) +if ( EXIV2_ENABLE_XMP ) + target_include_directories(exiv2lib PRIVATE ${CMAKE_SOURCE_DIR}/xmpsdk/include) +endif () + # TODO : We should not include include/exiv2 but only include !!! target_include_directories(exiv2lib PUBLIC $ @@ -233,7 +236,7 @@ else() target_link_libraries( exiv2lib PUBLIC ${CURL_LIBRARIES} ${SSH_LIBRARIES}) endif() -if( EXIV2_ENABLE_LIBXMP ) +if( EXIV2_ENABLE_XMP AND EXIV2_ENABLE_LIBXMP ) TARGET_LINK_LIBRARIES( exiv2lib PUBLIC xmp ) ENDIF()