mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-01 17:06:03 +08:00
This commit is contained in:
commit
5df67ba8fd
@ -383,6 +383,7 @@ IF (USE_HDF5 OR ENABLE_NETCDF_4)
|
||||
SET(USE_HDF5 ON)
|
||||
SET(USE_NETCDF4 ON)
|
||||
|
||||
|
||||
#FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
|
||||
FIND_LIBRARY(HDF5_LIB NAMES hdf5 libhdf5 hdf5dll)
|
||||
FIND_LIBRARY(HDF5_HL_LIB NAMES hdf5_hl libhdf5_hl hdf5_hldll)
|
||||
|
@ -1,9 +1,11 @@
|
||||
**************************
|
||||
Building NetCDF with CMake
|
||||
**************************
|
||||
|
||||
This document describes how to use CMake to configure and build the
|
||||
NetCDF-C libraries across different platforms.
|
||||
|
||||
************
|
||||
Introduction
|
||||
************
|
||||
|
||||
@ -17,7 +19,7 @@ and will generate files for a variety of build systems.
|
||||
- Windows: Borland Makefiles, MSYS Makefiles, MinGW Makefiles, Visual
|
||||
- Studio Projects (Versions 6+) Linux: Ninja, KDevelop3 OSX: Xcode
|
||||
|
||||
|
||||
************************************
|
||||
Requirements for building with CMake
|
||||
************************************
|
||||
|
||||
@ -26,8 +28,7 @@ a) Subversion: svn co
|
||||
http://svn.unidata.ucar.edu/repos/netcdf/trunk netcdf
|
||||
2. CMake 2.8.8+ for your platform of choice. http://www.cmake.org
|
||||
|
||||
|
||||
|
||||
***********
|
||||
Using CMake
|
||||
***********
|
||||
|
||||
@ -42,7 +43,6 @@ developer@dummy-machine:/netcdf$ mkdir build_dir
|
||||
developer@dummy-machine:/netcdf$ cd build_dir
|
||||
developer@dummy-machine:/netcdf/build_dir$ cmake ..
|
||||
|
||||
|
||||
Compiling and Testing the NetCDF Libraries and Utilities
|
||||
********************************************************
|
||||
|
||||
@ -65,15 +65,30 @@ C:\netcdf\build_dir>cmake --build .
|
||||
Note: If you want to use a different generator than the default, you
|
||||
would specify it with the '-G' flag.
|
||||
|
||||
Common NetCDF Options
|
||||
*********************
|
||||
Manually specifying which HDF5 Libraries to include.
|
||||
****************************************************
|
||||
|
||||
Occasionally CMake may not find the appropriate dependencies
|
||||
for your build, and you may need to specify the libraries
|
||||
manually. For the HDF5 libraries, this could be accomplished as
|
||||
follows:
|
||||
|
||||
developer@dummy-machine:/netcdf/build_dir$ cmake .. \
|
||||
-DHDF5_HL_LIB=/path/to/lib/libhdf5_hl.dylib \
|
||||
-DHDF5_LIB=/path/to/lib/libhdf5.dylib \
|
||||
-DHDF5_INCLUDE_DIR=/path/to/include/
|
||||
|
||||
|
||||
|
||||
Common NetCDF/CMake Options
|
||||
***************************
|
||||
|
||||
- ENABLE_NETCDF_4 (On by Default)
|
||||
- ENABLE_DAP (On by Default)
|
||||
- BUILD_SHARED_LIBS (Off by Default for Windows,
|
||||
On by Default for Unix/Linux)
|
||||
- ENABLE_DLL (Windows Only, Off by Default)
|
||||
|
||||
- CMAKE_PREFIX_PATH (Specify list of
|
||||
|
||||
This is just a partial list of options available. To see a full list
|
||||
of options, run 'cmake -L' from the command line, or use a CMake GUI.
|
Loading…
Reference in New Issue
Block a user