]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add NETCDF_DIR
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Nov 2012 11:06:36 +0000 (11:06 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Nov 2012 11:06:36 +0000 (11:06 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@27425 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/modules/FindNETCDF.cmake

index 75d521a19688811d2bad0950d1ac6eab6c7aa2b7..a9098599b79b52b6badb48a4501455b3de0f4dcb 100644 (file)
 
 INCLUDE(FindPackageHandleStandardArgs)
 
-FIND_PATH(NETCDF_INCLUDE_DIR netcdf.hh)
+SET_IF_EMPTY(NETCDF_DIR "$ENV{NETCDF_DIR}")
+
+FIND_PATH(NETCDF_INCLUDE_DIR netcdf.hh
+  HINTS
+    ${NETCDF_DIR}
+  PATH_SUFFIXES
+    netcdf include
+  )
 
 #
 # TODO: netcdf might externally depend on hdf5. Check and fix this.
 #
 
 FIND_LIBRARY(NETCDF_LIBRARY NAMES netcdf_c++ netcdf_cpp
+  HINTS
+    ${NETCDF_DIR}
   PATH_SUFFIXES
     lib${LIB_SUFFIX} lib64 lib
   )
@@ -38,6 +47,11 @@ IF(NETCDF_FOUND)
   MARK_AS_ADVANCED(
     NETCDF_LIBRARY
     NETCDF_INCLUDE_DIR
+    NETCDF_DIR
   )
+ELSE()
+  SET(NETCDF_DIR "" CACHE STRING
+    "An optional hint to a NETCDF installation"
+    )
 ENDIF()
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.