-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathconanize-link-szip-1.8.21.patch
45 lines (45 loc) · 1.79 KB
/
conanize-link-szip-1.8.21.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- a/CMakeFilters.cmake
+++ b/CMakeFilters.cmake
@@ -91,38 +91,10 @@ endif ()
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
- if (NOT SZIP_USE_EXTERNAL)
- find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
- if (NOT SZIP_FOUND)
- find_package (SZIP) # Legacy find
- if (SZIP_FOUND)
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_LIBRARIES})
- endif ()
- endif ()
- endif ()
- if (SZIP_FOUND)
- set (H5_HAVE_FILTER_SZIP 1)
- set (H5_HAVE_SZLIB_H 1)
- set (H5_HAVE_LIBSZ 1)
- set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
- else ()
- if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
- set (H5_HAVE_FILTER_SZIP 1)
- set (H5_HAVE_SZLIB_H 1)
- set (H5_HAVE_LIBSZ 1)
- message (STATUS "Filter SZIP is built")
- else ()
- message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
- endif ()
- endif ()
- if (BUILD_SHARED_LIBS)
- set (LINK_COMP_SHARED_LIBS ${LINK_COMP_SHARED_LIBS} ${SZIP_SHARED_LIBRARY})
- endif ()
- set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_STATIC_LIBRARY})
- INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
+ set (LINK_COMP_LIBS ${LINK_COMP_LIBS} "CONAN_PKG::${CONAN_SZIP_LIBNAME}")
+ set (H5_HAVE_FILTER_SZIP 1)
+ set (H5_HAVE_SZLIB_H 1)
+ set (H5_HAVE_LIBSZ 1)
message (STATUS "Filter SZIP is ON")
if (H5_HAVE_FILTER_SZIP)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")