mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-29 04:01:51 +00:00
- added fallback to pkg-config if webp cmake module wasn't found
fixes linker errors: undefined reference to `WebPGetInfo`, `WebPMuxCreateInternal`, `WebPMuxGetChunk`, `WebPMuxDelete`, `WebPInitDecoderConfigInternal`, `WebPDecode`
This commit is contained in:
parent
ecc0301f5b
commit
964f98da12
1 changed files with 14 additions and 0 deletions
|
@ -229,6 +229,20 @@ find_package( VPX )
|
|||
find_package( ZLIB )
|
||||
find_package( WebP )
|
||||
|
||||
if (NOT WebP_FOUND)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(libwebp IMPORTED_TARGET libwebp)
|
||||
if (NOT TARGET PkgConfig::libwebp)
|
||||
message(SEND_ERROR "libwebp not found")
|
||||
endif()
|
||||
pkg_check_modules(libwebpmux REQUIRED IMPORTED_TARGET libwebpmux)
|
||||
pkg_check_modules(libwebpdemux REQUIRED IMPORTED_TARGET libwebpdemux)
|
||||
|
||||
add_library(WebP::webp ALIAS PkgConfig::libwebp)
|
||||
add_library(WebP::webpdemux ALIAS PkgConfig::libwebpdemux)
|
||||
add_library(WebP::libwebpmux ALIAS PkgConfig::libwebpmux)
|
||||
endif()
|
||||
|
||||
include( TargetArch )
|
||||
|
||||
target_architecture(TARGET_ARCHITECTURE)
|
||||
|
|
Loading…
Reference in a new issue