mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 17:30:35 +08:00
d8783052cb
* Use upstream's standard filenames * Update license info * CMake style * Revise downstream zstd patching * Update versions * Don't use '_static' lib name suffix * Revise downstream zstd patching * Add usage * Update versions * Update versions * [zstd] Simplify consumers via fixed .pc and linkage alias * [zstd] Fix missing IMPORTED Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake
|
|
index e581a80..8ce17c5 100644
|
|
--- a/cmake/FindLZ4.cmake
|
|
+++ b/cmake/FindLZ4.cmake
|
|
@@ -1,10 +1,13 @@
|
|
-find_path(LZ4_INCLUDE_DIR lz4.h)
|
|
+find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
|
|
|
|
-find_library(LZ4_LIBRARY NAMES lz4)
|
|
+find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
|
|
+find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
|
|
|
|
-if (LZ4_INCLUDE_DIR AND LZ4_LIBRARY)
|
|
- set(LZ4_FOUND TRUE)
|
|
- message(STATUS "Found LZ4 library: ${LZ4_LIBRARY}")
|
|
-else ()
|
|
- message(STATUS "No LZ4 library found. Using internal sources.")
|
|
-endif ()
|
|
+include(SelectLibraryConfigurations)
|
|
+select_library_configurations(LZ4)
|
|
+
|
|
+include(FindPackageHandleStandardArgs)
|
|
+find_package_handle_standard_args(
|
|
+ LZ4
|
|
+ REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS
|
|
+)
|
|
diff --git a/cmake/FindSnappy.cmake b/cmake/FindSnappy.cmake
|
|
index 688d4d5..c8b9a05 100644
|
|
--- a/cmake/FindSnappy.cmake
|
|
+++ b/cmake/FindSnappy.cmake
|
|
@@ -1,10 +1,13 @@
|
|
-find_path(SNAPPY_INCLUDE_DIR snappy-c.h)
|
|
+find_path(SNAPPY_INCLUDE_DIR snappy.h)
|
|
|
|
-find_library(SNAPPY_LIBRARY NAMES snappy)
|
|
+find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd)
|
|
+find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy)
|
|
|
|
-if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARY)
|
|
- set(SNAPPY_FOUND TRUE)
|
|
- message(STATUS "Found SNAPPY library: ${SNAPPY_LIBRARY}")
|
|
-else ()
|
|
- message(STATUS "No snappy found. Using internal sources.")
|
|
-endif ()
|
|
+include(SelectLibraryConfigurations)
|
|
+select_library_configurations(SNAPPY)
|
|
+
|
|
+include(FindPackageHandleStandardArgs)
|
|
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
|
+ SNAPPY DEFAULT_MSG
|
|
+ SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR
|
|
+)
|