summaryrefslogtreecommitdiffstats
path: root/CMakePlugins.cmake
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2023-10-04 20:51:01 (GMT)
committerGitHub <noreply@github.com>2023-10-04 20:51:01 (GMT)
commit283202bc6268843a4a4c26e2c39020791e9af929 (patch)
tree775e2b132f3402656a3a06bf1eeb8a08373ce2a2 /CMakePlugins.cmake
parentb1663686012d7c1cc10ef0792bf478442f2c0e7f (diff)
downloadhdf5-283202bc6268843a4a4c26e2c39020791e9af929.zip
hdf5-283202bc6268843a4a4c26e2c39020791e9af929.tar.gz
hdf5-283202bc6268843a4a4c26e2c39020791e9af929.tar.bz2
Remove old EXTERNALPROJECT_ADD in favor of FETCH_CONTENT (#3624)
Diffstat (limited to 'CMakePlugins.cmake')
-rw-r--r--CMakePlugins.cmake28
1 files changed, 21 insertions, 7 deletions
diff --git a/CMakePlugins.cmake b/CMakePlugins.cmake
index 16fb874..726bc29 100644
--- a/CMakePlugins.cmake
+++ b/CMakePlugins.cmake
@@ -9,27 +9,41 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
+option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 0)
+
+set (PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGIN" 1)
+if (NOT PLUGIN_USE_LOCALCONTENT)
+ set (PLUGIN_URL ${PLUGIN_TGZ_ORIGPATH}/${PLUGIN_TGZ_ORIGNAME})
+else ()
+ if (NOT H5PL_TGZPATH)
+ set (H5PL_TGZPATH ${TGZPATH})
+ endif ()
+ set (PLUGIN_URL ${H5PL_TGZPATH}/${PLUGIN_TGZ_ORIGNAME})
+endif ()
+message (STATUS "Filter PLUGIN file is ${PLUGIN_URL}")
include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO GIT TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO GIT TGZ)")
set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- option (PLUGIN_USE_EXTERNAL "Use External Library Building for filter PLUGIN" 1)
+ set (PLUGIN_USE_EXTERNAL "Use External Library Building for PLUGIN" 1)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT")
set (PLUGIN_URL ${PLUGIN_GIT_URL} CACHE STRING "Path to PLUGIN git repository")
set (PLUGIN_BRANCH ${PLUGIN_GIT_BRANCH})
elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- if (NOT TGZPATH)
- set (TGZPATH ${HDF5_SOURCE_DIR})
+ if (NOT H5PL_TGZPATH)
+ set (H5PL_TGZPATH ${TGZPATH})
endif ()
- set (PLUGIN_URL ${TGZPATH}/${PLUGIN_TGZ_NAME})
- if (NOT EXISTS "${PLUGIN_URL}")
- set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
- message (STATUS "Filter PLUGIN file ${PLUGIN_URL} not found")
+ if (PLUGIN_USE_LOCALCONTENT)
+ if (NOT EXISTS "${PLUGIN_URL}")
+ set (HDF5_ENABLE_PLUGIN_SUPPORT OFF CACHE BOOL "" FORCE)
+ message (VERBOSE "Filter PLUGIN file ${PLUGIN_URL} not found")
+ endif ()
endif ()
else ()
set (PLUGIN_USE_EXTERNAL 0)
+ message (VERBOSE "Filter PLUGIN not built")
endif ()
endif ()