]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt |
2 | index 1d1bebe..3a7a51c 100644 | |
3 | --- a/blosc/CMakeLists.txt | |
4 | +++ b/blosc/CMakeLists.txt | |
5 | @@ -109,7 +109,7 @@ endif(NOT DEACTIVATE_ZLIB) | |
6 | ||
7 | if (NOT DEACTIVATE_ZSTD) | |
8 | if (ZSTD_FOUND) | |
9 | - set(LIBS ${LIBS} ${ZSTD_LIBRARY}) | |
10 | + set(LIBS ${LIBS} ${ZSTD_LIBRARIES}) | |
11 | else (ZSTD_FOUND) | |
12 | file(GLOB ZSTD_FILES | |
13 | ${ZSTD_LOCAL_DIR}/common/*.c | |
14 | diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake | |
15 | index e581a80..8ce17c5 100644 | |
16 | --- a/cmake/FindLZ4.cmake | |
17 | +++ b/cmake/FindLZ4.cmake | |
18 | @@ -1,10 +1,13 @@ | |
19 | -find_path(LZ4_INCLUDE_DIR lz4.h) | |
20 | +find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) | |
21 | ||
22 | -find_library(LZ4_LIBRARY NAMES lz4) | |
23 | +find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) | |
24 | +find_library(LZ4_LIBRARY_RELEASE NAMES lz4) | |
25 | ||
26 | -if (LZ4_INCLUDE_DIR AND LZ4_LIBRARY) | |
27 | - set(LZ4_FOUND TRUE) | |
28 | - message(STATUS "Found LZ4 library: ${LZ4_LIBRARY}") | |
29 | -else () | |
30 | - message(STATUS "No LZ4 library found. Using internal sources.") | |
31 | -endif () | |
32 | +include(SelectLibraryConfigurations) | |
33 | +select_library_configurations(LZ4) | |
34 | + | |
35 | +include(FindPackageHandleStandardArgs) | |
36 | +find_package_handle_standard_args( | |
37 | + LZ4 | |
38 | + REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS | |
39 | +) | |
40 | diff --git a/cmake/FindSnappy.cmake b/cmake/FindSnappy.cmake | |
41 | index 688d4d5..c8b9a05 100644 | |
42 | --- a/cmake/FindSnappy.cmake | |
43 | +++ b/cmake/FindSnappy.cmake | |
44 | @@ -1,10 +1,13 @@ | |
45 | -find_path(SNAPPY_INCLUDE_DIR snappy-c.h) | |
46 | +find_path(SNAPPY_INCLUDE_DIR snappy.h) | |
47 | ||
48 | -find_library(SNAPPY_LIBRARY NAMES snappy) | |
49 | +find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) | |
50 | +find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) | |
51 | ||
52 | -if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARY) | |
53 | - set(SNAPPY_FOUND TRUE) | |
54 | - message(STATUS "Found SNAPPY library: ${SNAPPY_LIBRARY}") | |
55 | -else () | |
56 | - message(STATUS "No snappy found. Using internal sources.") | |
57 | -endif () | |
58 | +include(SelectLibraryConfigurations) | |
59 | +select_library_configurations(SNAPPY) | |
60 | + | |
61 | +include(FindPackageHandleStandardArgs) | |
62 | +FIND_PACKAGE_HANDLE_STANDARD_ARGS( | |
63 | + SNAPPY DEFAULT_MSG | |
64 | + SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR | |
65 | +) | |
66 | diff --git a/cmake/FindZstd.cmake b/cmake/FindZstd.cmake | |
67 | index 7db4bb9..ba20ba6 100644 | |
68 | --- a/cmake/FindZstd.cmake | |
69 | +++ b/cmake/FindZstd.cmake | |
70 | @@ -1,10 +1,30 @@ | |
71 | +include(FindPackageHandleStandardArgs) | |
72 | + | |
73 | find_path(ZSTD_INCLUDE_DIR zstd.h) | |
74 | ||
75 | -find_library(ZSTD_LIBRARY NAMES zstd) | |
76 | +get_filename_component(_prefix_path ${ZSTD_INCLUDE_DIR} PATH) | |
77 | + | |
78 | +find_library( | |
79 | + ZSTD_LIBRARY_DEBUG | |
80 | + NAMES zstdd | |
81 | + PATHS ${_prefix_path}/debug/lib | |
82 | + NO_DEFAULT_PATH | |
83 | +) | |
84 | + | |
85 | +find_library( | |
86 | + ZSTD_LIBRARY_RELEASE | |
87 | + NAMES zstd | |
88 | + PATHS ${_prefix_path}/lib | |
89 | + NO_DEFAULT_PATH | |
90 | +) | |
91 | + | |
92 | +unset(_prefix_path) | |
93 | + | |
94 | +include(SelectLibraryConfigurations) | |
95 | +select_library_configurations(ZSTD) | |
96 | ||
97 | -if (ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY) | |
98 | - set(ZSTD_FOUND TRUE) | |
99 | - message(STATUS "Found Zstd library: ${ZSTD_LIBRARY}") | |
100 | -else () | |
101 | - message(STATUS "No Zstd library found. Using internal sources.") | |
102 | -endif () | |
103 | +include(FindPackageHandleStandardArgs) | |
104 | +find_package_handle_standard_args( | |
105 | + ZSTD | |
106 | + REQUIRED_VARS ZSTD_LIBRARIES ZSTD_INCLUDE_DIR | |
107 | +) |