vcpkg/ports/exiv2/iconv.patch

29 lines
969 B
Diff
Raw Normal View History

2018-06-12 10:32:58 -07:00
diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
index e220e2f..992b887 100644
--- a/cmake/findDependencies.cmake
+++ b/cmake/findDependencies.cmake
@@ -50,7 +50,7 @@ if( EXIV2_ENABLE_NLS )
# the manual check in cmake/generateConfigFile.cmake
endif( )
-find_package(Iconv)
+find_package(unofficial-iconv CONFIG REQUIRED)
if( ICONV_FOUND )
message ( "-- ICONV_INCLUDE_DIR : " ${Iconv_INCLUDE_DIR} )
message ( "-- ICONV_LIBRARIES : " ${Iconv_LIBRARY} )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 91469b6..4c51068 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -274,8 +274,8 @@ if( EXIV2_ENABLE_NLS )
target_link_libraries( exiv2lib PRIVATE ${LIBINTL_LIBRARIES} )
endif()
-if( ICONV_FOUND )
- target_link_libraries( exiv2lib PRIVATE Iconv::Iconv )
+if( ICONV_FOUND OR 1 )
+ target_link_libraries( exiv2lib PRIVATE unofficial::iconv::libiconv )
endif()