diff options
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r-- | config/cmake_ext_mod/HDFLibMacros.cmake | 15 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 13 |
2 files changed, 27 insertions, 1 deletions
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake index fe633bf..9704fbd 100644 --- a/config/cmake_ext_mod/HDFLibMacros.cmake +++ b/config/cmake_ext_mod/HDFLibMacros.cmake @@ -84,6 +84,10 @@ endmacro () #------------------------------------------------------------------------------- macro (EXTERNAL_SZIP_LIBRARY compress_type encoding) if (${compress_type} MATCHES "GIT") +# FetchContent_Declare (SZIP +# GIT_REPOSITORY ${SZIP_URL} +# GIT_TAG ${SZIP_BRANCH} +# ) EXTERNALPROJECT_ADD (SZIP GIT_REPOSITORY ${SZIP_URL} GIT_TAG ${SZIP_BRANCH} @@ -104,6 +108,10 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding) -DPACKAGE_NAMESPACE=${HDF_PACKAGE_NAMESPACE} ) elseif (${compress_type} MATCHES "TGZ") +# FetchContent_Declare (SZIP +# URL ${SZIP_URL} +# URL_HASH "" +# ) EXTERNALPROJECT_ADD (SZIP URL ${SZIP_URL} URL_MD5 "" @@ -125,7 +133,12 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding) ) endif () externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR) - +# FetchContent_GetProperties(SZIP) +# if(NOT SZIP_POPULATED) +# FetchContent_Populate(SZIP) +# add_subdirectory(${szip_SOURCE_DIR} ${szip_BINARY_DIR}) +# endif() +# ##include (${BINARY_DIR}/${SZ_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) # Create imported target szip-static if (USE_LIBAEC) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 5740740..eb0392e 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -427,6 +427,19 @@ macro (HDF_DIR_PATHS package_prefix) set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) endif () endif () + +#----------------------------------------------------------------------------- +# Setup pre-3.14 FetchContent +#----------------------------------------------------------------------------- + if(${CMAKE_VERSION} VERSION_LESS 3.14) + macro(FetchContent_MakeAvailable NAME) + FetchContent_GetProperties(${NAME}) + if(NOT ${NAME}_POPULATED) + FetchContent_Populate(${NAME}) + add_subdirectory(${${NAME}_SOURCE_DIR} ${${NAME}_BINARY_DIR}) + endif() + endmacro() + endif() endmacro () macro (ADD_H5_FLAGS h5_flag_var infile) |