mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 11:11:38 +08:00
cf2e61b0f7
* libwebp update to 1.2.3 * v db * fix missing libwebp target * v db * add find_dependency(Threads) * v db * include the macro * v db * Add license * update version Co-authored-by: Jonliu1993 <13720414433@163.com>
27 lines
1.4 KiB
Diff
27 lines
1.4 KiB
Diff
diff --git a/cmake/WebPConfig.cmake.in b/cmake/WebPConfig.cmake.in
|
|
index 822fc59..fb31829 100644
|
|
--- a/cmake/WebPConfig.cmake.in
|
|
+++ b/cmake/WebPConfig.cmake.in
|
|
@@ -5,7 +5,19 @@ set(WEBP_VERSION ${WebP_VERSION})
|
|
|
|
+include(CMakeFindDependencyMacro)
|
|
+find_dependency(Threads)
|
|
include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
|
|
|
-set(WebP_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
|
+get_filename_component(_vcpkg_libwebp_root "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
|
|
+set(WebP_INCLUDE_DIRS "${_vcpkg_libwebp_root}/include")
|
|
set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS})
|
|
-set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@")
|
|
+set(WebP_LIBRARIES "")
|
|
+include(SelectLibraryConfigurations)
|
|
+foreach(_vcpkg_libwebp_lib IN ITEMS @INSTALLED_LIBRARIES@)
|
|
+ string(REPLACE "libwebpmux" "webpmux" _vcpkg_libwebp_lib "${_vcpkg_libwebp_lib}") # offical OUTPUT_NAME
|
|
+ find_library(_vcpkg_${_vcpkg_libwebp_lib}_LIBRARY_RELEASE NAMES ${_vcpkg_libwebp_lib} NAMES_PER_DIR PATHS "${_vcpkg_libwebp_root}/lib" NO_DEFAULT_PATH)
|
|
+ find_library(_vcpkg_${_vcpkg_libwebp_lib}_LIBRARY_DEBUG NAMES ${_vcpkg_libwebp_lib}d ${_vcpkg_libwebp_lib} NAMES_PER_DIR PATHS "${_vcpkg_libwebp_root}/debug/lib" NO_DEFAULT_PATH)
|
|
+ select_library_configurations(_vcpkg_${_vcpkg_libwebp_lib})
|
|
+ list(APPEND WebP_LIBRARIES ${_vcpkg_${_vcpkg_libwebp_lib}_LIBRARIES})
|
|
+endforeach()
|
|
set(WEBP_LIBRARIES "${WebP_LIBRARIES}")
|
|
+unset(_vcpkg_libwebp_root)
|