yuzu/externals/vcpkg/ports/libwebp/0002-cmake-config.patch

25 lines
1.3 KiB
Diff
Raw Normal View History

2022-07-23 05:01:36 +04:00
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,17 @@ set(WEBP_VERSION ${WebP_VERSION})
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)