aboutsummaryrefslogtreecommitdiff
path: root/vcpkg-ports/zlib/vcpkg-cmake-wrapper.cmake
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /vcpkg-ports/zlib/vcpkg-cmake-wrapper.cmake
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'vcpkg-ports/zlib/vcpkg-cmake-wrapper.cmake')
-rw-r--r--vcpkg-ports/zlib/vcpkg-cmake-wrapper.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcpkg-ports/zlib/vcpkg-cmake-wrapper.cmake b/vcpkg-ports/zlib/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 00000000..868a4185
--- /dev/null
+++ b/vcpkg-ports/zlib/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,12 @@
+find_path(ZLIB_INCLUDE_DIR NAMES zlib.h PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" NO_DEFAULT_PATH)
+find_library(ZLIB_LIBRARY_RELEASE NAMES zlib z PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH)
+find_library(ZLIB_LIBRARY_DEBUG NAMES zlibd z PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH)
+if(NOT ZLIB_INCLUDE_DIR OR NOT (ZLIB_LIBRARY_RELEASE OR ZLIB_LIBRARY_DEBUG))
+ message(FATAL_ERROR "Broken installation of vcpkg port zlib")
+endif()
+if(CMAKE_VERSION VERSION_LESS 3.4)
+ include(SelectLibraryConfigurations)
+ select_library_configurations(ZLIB)
+ unset(ZLIB_FOUND)
+endif()
+_find_package(${ARGS})