aboutsummaryrefslogtreecommitdiff
path: root/ports/netcdf-c/config-pkg-location.patch
blob: 532082ccb600192c55fa3aa453087bfce41f1703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46892ee..803ff46 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1742,7 +1742,9 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h
 # Create CMake package configuration files. With these, other packages using
 # cmake should be able to find netcdf using find_package and find_library.
 # The EXPORT call is paired with one in liblib.
-set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF)
+if(NOT DEFINED ConfigPackageLocation)
+  set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF)
+endif(NOT DEFINED ConfigPackageLocation)
 
 install(EXPORT netCDFTargets
   DESTINATION ${ConfigPackageLocation}