vcpkg/ports/exiv2/fix-brotli.patch

28 lines
939 B
Diff
Raw Normal View History

diff --git a/cmake/findDependencies.cmake b/cmake/findDependencies.cmake
index bec2128a5..664522c2a 100644
--- a/cmake/findDependencies.cmake
+++ b/cmake/findDependencies.cmake
@@ -47,7 +47,7 @@ if( EXIV2_ENABLE_PNG )
endif( )
if( EXIV2_ENABLE_BMFF AND EXIV2_ENABLE_BROTLI )
- find_package( Brotli REQUIRED )
+ find_package( BROTLI NAMES unofficial-brotli CONFIG REQUIRED )
endif( )
if( EXIV2_ENABLE_WEBREADY )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 15bab8c8a..3db5bdd08 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -240,8 +240,7 @@ if( EXIV2_ENABLE_PNG )
endif()
if( EXIV2_ENABLE_BMFF AND BROTLI_FOUND )
- target_link_libraries( exiv2lib PRIVATE ${Brotli_LIBRARIES})
- target_include_directories(exiv2lib PRIVATE ${Brotli_INCLUDE_DIRS})
+ target_link_libraries( exiv2lib PRIVATE unofficial::brotli::brotlidec)
list(APPEND requires_private_list "libbrotlidec")
endif()