diff --git a/config/findDependencies.cmake b/config/findDependencies.cmake index 235aa87d..116bf4f8 100644 --- a/config/findDependencies.cmake +++ b/config/findDependencies.cmake @@ -2,12 +2,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/") find_package(Threads REQUIRED) -include( FindIconv ) if( EXIV2_ENABLE_PNG ) find_package( ZLIB REQUIRED ) include_directories( ${ZLIB_INCLUDE_DIR} ) -endif( EXIV2_ENABLE_PNG ) +endif( ) if( EXIV2_ENABLE_WEBREADY ) set( ENABLE_WEBREADY 1 ) @@ -17,12 +16,12 @@ if( EXIV2_ENABLE_WEBREADY ) if( EXIV2_ENABLE_SSH ) find_package( SSH REQUIRED) - endif( EXIV2_ENABLE_SSH ) -endif( EXIV2_ENABLE_WEBREADY ) + endif( ) +endif( ) if (EXIV2_ENABLE_XMP) find_package(EXPAT REQUIRED) -endif (EXIV2_ENABLE_XMP) +endif () if( EXIV2_ENABLE_NLS ) find_package(Intl) @@ -35,20 +34,19 @@ if( EXIV2_ENABLE_NLS ) set( ENABLE_NLS 1 ) # TODO : This is assuming that Intl is always found. This check should be improved and remove # the manual check in config/generateConfigFile.cmake -endif( EXIV2_ENABLE_NLS ) +endif( ) -find_package(Iconv) +include( FindIconv ) if( ICONV_FOUND ) - include_directories(${ICONV_INCLUDE_DIR}) message ( "-- ICONV_INCLUDE_DIR : " ${ICONV_INCLUDE_DIR} ) message ( "-- ICONV_LIBRARIES : " ${ICONV_LIBRARIES} ) message ( "-- ICONV_ACCEPTS_CONST_INPUT : ${ICONV_ACCEPTS_CONST_INPUT}" ) -endif( ICONV_FOUND ) +endif() if( EXIV2_ENABLE_BUILD_PO ) find_package(MSGFMT) if(MSGFMT_FOUND) message(STATUS "Program msgfmt found (${MSGFMT_EXECUTABLE})") set( EXIV2_BUILD_PO 1 ) - endif(MSGFMT_FOUND) + endif() endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 093beb80..87a4d6f1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -241,6 +241,7 @@ if( EXIV2_ENABLE_NLS ) endif() if( ICONV_FOUND ) + target_include_directories( exiv2lib SYSTEM PRIVATE ${ICONV_INCLUDE_DIR}) target_link_libraries( exiv2lib PRIVATE ${ICONV_LIBRARIES} ) endif()