mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 19:39:06 +08:00
42bb0d9e8d
* Add libdwarf 0.9.0 * Bump hash * Retrofit cpptrace and fix a libdwarf issue * Bump * Bump a baseline * Undo baseline bump * Undo port version bump * Add libdwarf 0.9.1 * Bump hash * Move zstd patch to dependencies.diff * Bump baseline * Bump * Undo changes to versoins/c-/cpptrace.json * properly update cpptrace port version * --overwrite-version this time * Forgot to delete file * fix hash
55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 70839abd..04b0f86f 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -196,6 +196,12 @@ if (ENABLE_DECOMPRESSION)
|
|
set(HAVE_ZSTD TRUE)
|
|
set(HAVE_ZSTD_H TRUE)
|
|
endif()
|
|
+ find_package(zstd CONFIG REQUIRED)
|
|
+ if(TARGET zstd::libzstd_shared)
|
|
+ set(ZSTD_LIB zstd::libzstd_shared)
|
|
+ else()
|
|
+ set(ZSTD_LIB zstd::libzstd_static)
|
|
+ endif()
|
|
endif ()
|
|
|
|
message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} )
|
|
|
|
# DW_FWALLXX are gnu C++ options.
|
|
diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt
|
|
index 7500c9f4..ae367cc1 100644
|
|
--- a/src/lib/libdwarf/CMakeLists.txt
|
|
+++ b/src/lib/libdwarf/CMakeLists.txt
|
|
@@ -105,7 +105,7 @@ target_include_directories(dwarf PUBLIC
|
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
)
|
|
if(ZLIB_FOUND AND ZSTD_FOUND)
|
|
- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD )
|
|
+ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} )
|
|
endif()
|
|
set_target_properties(dwarf PROPERTIES PUBLIC_HEADER "libdwarf.h;dwarf.h")
|
|
|
|
|
|
diff --git a/src/lib/libdwarf/cmake/libdwarf-config.cmake b/src/lib/libdwarf/cmake/libdwarf-config.cmake
|
|
index 604c563c..53623603 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 6b18c77c..8862d5b4 100644
|
|
--- a/src/lib/libdwarf/libdwarf.pc.cmake
|
|
+++ b/src/lib/libdwarf/libdwarf.pc.cmake
|
|
@@ -9,4 +9,4 @@ Description: DWARF debug symbols library
|
|
Version: @PACKAGE_VERSION@
|
|
Libs: -L${libdir} -ldwarf
|
|
Cflags: -I${includedir}
|
|
-
|
|
+Requires.private: zlib libzstd
|