mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 13:49:39 +08:00
809e93f524
* Try to add libdwarf
* Has
* fix
* hash
* fixes
* hash
* Fixes
* bump hash
* zlib fix
* bump hash
* fix
* bump hash
* fixes
* Bump hash
* fix
* bump
* x
* bump
* fix
* bump
* fix
* bump
* fix
* bump
* fix
* bump
* fix
* bump
* Try this
* bump
* cleanup
* bump
* Update patches
* bump hash
* fix whitespace
* bump
* Update usage
* Bump
* Update portfile and patches (#1)
* Re-introduce off_t patch
* Bump
* Fix patch
* Bump
* Usage is now correct
* Bump
* Revert "Usage is now correct"
This reverts commit 54b32d172d
.
* Bump
---------
Co-authored-by: Kai Pastor <dg0yt@darc.de>
47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 9e9b75f..fd5fbe3 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -195,6 +195,20 @@ check_c_source_compiles([=[
|
|
}]=] HAVE_STDAFX_H)
|
|
#message(STATUS "Checking have windows stdafx.h... ${HAVE_STDAFX_H}")
|
|
|
|
+find_package(ZLIB REQUIRED)
|
|
+add_library(z ALIAS ZLIB::ZLIB)
|
|
+set(HAVE_ZLIB 1)
|
|
+set(HAVE_ZLIB_H 1)
|
|
+
|
|
+find_package(zstd CONFIG REQUIRED)
|
|
+if(TARGET zstd::libzstd_shared)
|
|
+ add_library(zstd ALIAS zstd::libzstd_shared)
|
|
+else()
|
|
+ add_library(zstd ALIAS zstd::libzstd_static)
|
|
+endif()
|
|
+set(HAVE_ZSTD 1)
|
|
+set(HAVE_ZSTD_H 1)
|
|
+
|
|
set(CMAKE_REQUIRED_LIBRARIES z)
|
|
check_c_source_compiles( [=[
|
|
#include "zlib.h"
|
|
diff --git a/src/lib/libdwarf/cmake/libdwarf-config.cmake b/src/lib/libdwarf/cmake/libdwarf-config.cmake
|
|
index 604c563..5362360 100644
|
|
--- a/src/lib/libdwarf/cmake/libdwarf-config.cmake
|
|
+++ b/src/lib/libdwarf/cmake/libdwarf-config.cmake
|
|
@@ -1,3 +1,6 @@
|
|
+include(CMakeFindDependencyMacro)
|
|
+find_dependency(ZLIB)
|
|
+find_dependency(zstd CONFIG)
|
|
if (NOT TARGET libdwarf::libdwarf)
|
|
include(${CMAKE_CURRENT_LIST_DIR}/libdwarf-targets.cmake)
|
|
endif()
|
|
diff --git a/src/lib/libdwarf/libdwarf.pc.cmake b/src/lib/libdwarf/libdwarf.pc.cmake
|
|
index 6b18c77..5c97ce9 100644
|
|
--- a/src/lib/libdwarf/libdwarf.pc.cmake
|
|
+++ b/src/lib/libdwarf/libdwarf.pc.cmake
|
|
@@ -9,4 +9,5 @@ Description: DWARF debug symbols library
|
|
Version: @PACKAGE_VERSION@
|
|
Libs: -L${libdir} -ldwarf
|
|
Cflags: -I${includedir}
|
|
+Requires.private: zlib libzstd
|
|
|