Skip to content

Commit

Permalink
CMake: (fix) libaec
Browse files Browse the repository at this point in the history
Implemented the fallback option for the case if version 1.0.5
of libaec could not be found.
  • Loading branch information
jwsblokland committed Jun 15, 2021
1 parent 257e19c commit 9a8dfbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,16 @@ 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)
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 ()
else ()
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
Expand Down

0 comments on commit 9a8dfbc

Please sign in to comment.