Match Conan's cmake find module case for Brotli

main
Miloš Komarčević 3 years ago
parent 1e395ff98f
commit eada606992

@ -1260,7 +1260,7 @@ The CI workflow file `.github/workflows/on_PR_windows_matrix.yml` has a build jo
Please note that you will need to install the `ucrt-x86_64` package version of the exiv2 dependencies:
```bash
pacman -S mingw-w64-ucrt-x86_64-{brotli,cc,cmake,curl,expat,gettext,gtest,libiconv,libwinpthread,ninja,zlib}
pacman -S --needed mingw-w64-ucrt-x86_64-{brotli,cc,cmake,curl,expat,gettext,gtest,libiconv,libwinpthread,ninja,zlib}
```
### Download exiv2 from github and build

@ -23,7 +23,7 @@ debian_build_gtest() {
# workaround for really bare-bones Archlinux containers:
if [ -x "$(command -v pacman)" ]; then
pacman --noconfirm -Sy
pacman --noconfirm -S grep gawk sed
pacman --noconfirm --needed -S grep gawk sed
fi
distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')
@ -41,7 +41,7 @@ case "$distro_id" in
'arch')
pacman --noconfirm -Syu
pacman --noconfirm -S gcc clang cmake make expat zlib brotli libssh curl gtest dos2unix which diffutils
pacman --noconfirm --needed -S gcc clang cmake make expat zlib brotli libssh curl gtest dos2unix which diffutils
;;
'ubuntu')

@ -26,7 +26,7 @@ find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon)
find_library(BROTLIDEC_LIBRARY NAMES brotlidec)
find_package_handle_standard_args(BROTLI
find_package_handle_standard_args(Brotli
FOUND_VAR
BROTLI_FOUND
REQUIRED_VARS
@ -34,8 +34,12 @@ find_package_handle_standard_args(BROTLI
BROTLICOMMON_LIBRARY
BROTLI_INCLUDE_DIR
FAIL_MESSAGE
"Could NOT find BROTLI"
"Could NOT find Brotli"
)
set(BROTLI_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
set(Brotli_INCLUDE_DIRS ${BROTLI_INCLUDE_DIR})
set(Brotli_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
mark_as_advanced(BROTLI_INCLUDE_DIR)
mark_as_advanced(BROTLICOMMON_LIBRARY)
mark_as_advanced(BROTLIDEC_LIBRARY)

@ -47,7 +47,7 @@ if( EXIV2_ENABLE_PNG )
endif( )
if( EXIV2_ENABLE_BMFF )
find_package( BROTLI )
find_package( Brotli )
endif( )
if( EXIV2_ENABLE_WEBREADY )

@ -233,8 +233,8 @@ 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 ${Brotli_LIBRARIES})
target_include_directories(exiv2lib PRIVATE ${Brotli_INCLUDE_DIRS})
endif()
if( EXIV2_ENABLE_NLS )

Loading…
Cancel
Save