mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
Merge "cmake: restore compatibility with cmake < 3.12" into main
This commit is contained in:
commit
25807fb4cb
@ -710,13 +710,16 @@ write_basic_package_version_file(
|
|||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
# Fix libwebpmux reference. The target name libwebpmux is used for compatibility
|
# Fix libwebpmux reference. The target name libwebpmux is used for compatibility
|
||||||
# purposes, but the library mentioned in WebPConfig.cmake should be the
|
# purposes, but the library mentioned in WebPConfig.cmake should be the
|
||||||
# unprefixed version.
|
# unprefixed version. Note string(...) can be replaced with list(TRANSFORM ...)
|
||||||
list(TRANSFORM INSTALLED_LIBRARIES REPLACE "libwebpmux" "webpmux")
|
# if cmake_minimum_required is >= 3.12.
|
||||||
|
string(REGEX REPLACE "libwebpmux" "webpmux" INSTALLED_LIBRARIES
|
||||||
|
"${INSTALLED_LIBRARIES}")
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# For compatibility with nmake, MSVC builds use a custom prefix (lib) that
|
# For compatibility with nmake, MSVC builds use a custom prefix (lib) that
|
||||||
# needs to be included in the library name.
|
# needs to be included in the library name.
|
||||||
list(TRANSFORM INSTALLED_LIBRARIES
|
string(REGEX REPLACE "[A-Za-z0-9_]+" "${CMAKE_STATIC_LIBRARY_PREFIX}\\0"
|
||||||
REPLACE "[A-Za-z0-9_]+" "${CMAKE_STATIC_LIBRARY_PREFIX}\\0")
|
INSTALLED_LIBRARIES "${INSTALLED_LIBRARIES}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_package_config_file(
|
configure_package_config_file(
|
||||||
|
Loading…
Reference in New Issue
Block a user