diff options
author | Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> | 2021-07-14 15:42:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-14 15:42:14 (GMT) |
commit | 21c6bb38e6cf0776dbdc37841280dffd6ca79990 (patch) | |
tree | 1a39e54c4cc042535d90060e2d04b6d59ce836bb /CMakeFilters.cmake | |
parent | 31027a997c3cc5de9140930560d5155bef26289b (diff) | |
download | hdf5-21c6bb38e6cf0776dbdc37841280dffd6ca79990.zip hdf5-21c6bb38e6cf0776dbdc37841280dffd6ca79990.tar.gz hdf5-21c6bb38e6cf0776dbdc37841280dffd6ca79990.tar.bz2 |
CMake: (feature) libaec (#703)
* CMake: (feature) libaec
Implemented better support for the compression library libaec.
Especially, for the new version 1.0.5:
- The CMake config files of this version 1.0.5 now set certain
SZIP variables which can be used in the existing
CMake structure.
- Both static and shared SZIP compatible libaec library contains
all required objects such it can be easily used when building
HDF5 from scratch.
- Introduced the USE_LIBAEC_STATIC option to make use of the static
version of SZIP compatible libaec library.
* CMake: (fix) libaec
Implemented the fallback option for the case if version 1.0.5
of libaec could not be found.
* Docs: Added description about libaec implementation.
Added short description about the libaec improvement to the Bug Fixes
section in the Configuration sub-section.
Diffstat (limited to 'CMakeFilters.cmake')
-rw-r--r-- | CMakeFilters.cmake | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index d5f801e..51ac61c 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -10,6 +10,7 @@ # help@hdfgroup.org. # option (USE_LIBAEC "Use AEC library as SZip Filter" OFF) +option (USE_LIBAEC_STATIC "Use static AEC library " OFF) include (ExternalProject) include (FetchContent) @@ -110,13 +111,24 @@ 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 + set(SZIP_FOUND FALSE) + if (USE_LIBAEC) + set(libaec_USE_STATIC_LIBS ${USE_LIBAEC_STATIC}) + find_package (libaec 1.0.5 CONFIG) if (SZIP_FOUND) set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES}) endif () endif () + + if (NOT SZIP_FOUND) + 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}) + endif () + endif () + endif () endif () if (SZIP_FOUND) set (H5_HAVE_FILTER_SZIP 1) |