vcpkg/ports/exiv2/iconv.patch

39 lines
1.3 KiB
Diff
Raw Normal View History

diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
index a458a0c..9caffcf 100644
2018-06-13 01:32:58 +08:00
--- a/cmake/findDependencies.cmake
+++ b/cmake/findDependencies.cmake
@@ -40,7 +40,7 @@ else()
endif()
if (EXIV2_ENABLE_NLS)
- find_package(Intl REQUIRED)
+ find_package(unofficial-gettext CONFIG)
2018-06-13 01:32:58 +08:00
endif( )
find_package(Iconv)
2018-06-13 01:32:58 +08:00
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 76eaabc..68d29de 100644
2018-06-13 01:32:58 +08:00
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -214,16 +214,15 @@ if( EXIV2_ENABLE_PNG )
endif()
if( EXIV2_ENABLE_NLS )
- target_link_libraries(exiv2lib PRIVATE ${Intl_LIBRARIES})
- target_include_directories(exiv2lib PRIVATE ${Intl_INCLUDE_DIRS})
- target_include_directories(exiv2lib_int PRIVATE ${Intl_INCLUDE_DIRS})
+ target_link_libraries(exiv2lib PRIVATE unofficial::gettext::libintl)
# Definition needed for translations
target_compile_definitions(exiv2lib PUBLIC EXV_LOCALEDIR="/../${CMAKE_INSTALL_LOCALEDIR}")
2018-06-13 01:32:58 +08:00
endif()
-if( ICONV_FOUND )
- target_link_libraries( exiv2lib PRIVATE Iconv::Iconv )
+if(NOT TARGET unofficial::iconv::libiconv)
+ find_package(unofficial-iconv CONFIG)
endif()
+target_link_libraries( exiv2lib PRIVATE unofficial::iconv::libiconv )
write_basic_package_version_file(exiv2ConfigVersion.cmake COMPATIBILITY ExactVersion)
2018-06-13 01:32:58 +08:00