Skip to content

Commit 7eaafef

Browse files
committed
Incorporate a recent change to netcdf_plugin_install_dir
1 parent ebd0229 commit 7eaafef

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,11 @@ if((NOT DEFINED HDF5_PLUGIN_PATH) OR ("${HDF5_PLUGIN_PATH}" STREQUAL ""))
666666
string(REPLACE "\\" "/" AUP "$ENV{ALLUSERSPROFILE}")
667667
set(HDF5_PLUGIN_PATH "${AUP}/hdf5/lib/plugin")
668668
else()
669-
set(HDF5_PLUGIN_PATH "/usr/local/hdf5/lib/plugin")
669+
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
670+
set(HDF5_PLUGIN_PATH "/usr/local/hdf5/lib/plugin")
671+
else()
672+
set(HDF5_PLUGIN_PATH "${CMAKE_INSTALL_PREFIX}/hdf5/lib/plugin")
673+
endif(NOT DEFINED CMAKE_INSTALL_PREFIX)
670674
endif()
671675
set(ENV{HDF5_PLUGIN_PATH} "${HDF5_PLUGIN_PATH}")
672676
endif()
@@ -696,7 +700,7 @@ if(NETCDF_ENABLE_PLUGIN_INSTALL)
696700
endif(DEFINED ENV{HDF5_PLUGIN_PATH})
697701
message(STATUS "Defaulting to -DPLUGIN_INSTALL_DIR=${NETCDF_PLUGIN_INSTALL_DIR}")
698702
endif()
699-
endif(ENABLE_PLUGIN_INSTALL)
703+
endif(NETCDF_ENABLE_PLUGIN_INSTALL)
700704

701705
if(ENABLE_PLUGIN_INSTALL)
702706
# Use the lowest priority dir in the path

0 commit comments

Comments
 (0)