Added generated file for cmake-based builds.

This commit is contained in:
Ward Fisher 2014-09-10 10:49:32 -06:00
parent 87f0d6d300
commit a4241785c3
3 changed files with 46 additions and 15 deletions

View File

@ -23,12 +23,13 @@ set(PACKAGE "netCDF" CACHE STRING "")
# http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
#####
SET(netCDF_VERSION_MAJOR 4)
SET(netCDF_VERSION_MINOR 3)
SET(netCDF_VERSION_PATCH 3)
SET(netCDF_VERSION_NOTE "-rc2")
SET(netCDF_VERSION ${netCDF_VERSION_MAJOR}.${netCDF_VERSION_MINOR}.${netCDF_VERSION_PATCH}${netCDF_VERSION_NOTE})
SET(NC_VERSION_MAJOR 4)
SET(NC_VERSION_MINOR 3)
SET(NC_VERSION_PATCH 3)
SET(NC_VERSION_NOTE "-rc2")
SET(netCDF_VERSION ${NC_VERSION_MAJOR}.${NC_VERSION_MINOR}.${NC_VERSION_PATCH}${NC_VERSION_NOTE})
SET(VERSION ${netCDF_VERSION})
SET(NC_VERSION ${netCDF_VERSION})
SET(netCDF_LIB_VERSION 7.2.0)
SET(netCDF_SO_VERSION 7)
SET(PACKAGE_VERSION ${VERSION})
@ -1187,6 +1188,10 @@ INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT headers)
INSTALL(FILES ${netCDF_BINARY_DIR}/include/netcdf_meta.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT headers)
IF(ENABLE_PNETCDF OR ENABLE_PARALLEL)
INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf_par.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
@ -1414,12 +1419,9 @@ INSTALL(FILES "${netCDF_BINARY_DIR}/libnetcdf.settings"
# Create 'netcdf_meta.h' include file.
#####
configure_file(
${netCDF_SOURCE_DIR}/include/netcdf_meta.h.cmake.in
${netCDF_SOURCE_DIR}/include/netcdf_meta.cmake.in
${netCDF_BINARY_DIR}/include/netcdf_meta.h @ONLY)
####
# Export files
####

View File

@ -4,11 +4,11 @@
# This automake file generates the Makefile to build the include
# directory.
include_HEADERS = netcdf.h
include_HEADERS = netcdf.h netcdf_meta.h
if BUILD_PARALLEL
include_HEADERS += netcdf_par.h
endif
include_HEADERS += netcdf_par.h
endif
noinst_HEADERS = nc_logging.h nc_tests.h fbits.h nc.h \
nclist.h ncuri.h utf8proc.h ncdispatch.h ncdimscale.h \
@ -17,8 +17,7 @@ nclog.h ncconfigure.h nc4internal.h nctime.h nc3dispatch.h nc3internal.h \
onstack.h
if USE_NETCDF4
noinst_HEADERS += ncaux.h
noinst_HEADERS += ncaux.h
endif
EXTRA_DIST = CMakeLists.txt XGetopt.h
EXTRA_DIST = CMakeLists.txt XGetopt.h netcdf_meta.cmake.in netcdf_meta.h.in

View File

@ -0,0 +1,30 @@
/*! Meta information for libnetcdf.
This file is automatically generated by the build system
at configure time, and contains information related to
how libnetcdf was built.
*/
#ifndef NETCDF_META_H
#define NETCDF_META_H
#cmakedefine NC_VERSION_MAJOR @NC_VERSION_MAJOR@
#cmakedefine NC_VERSION_MINOR @NC_VERSION_MINOR@
#cmakedefine NC_VERSION_PATCH @NC_VERSION_PATCH@
#cmakedefine NC_VERSION_NOTE "@NC_VERSION_NOTE@"
#cmakedefine NC_VERSION @NC_VERSION@
#cmakedefine NC_HAS_NC2
#cmakedefine NC_HAS_NC4
#cmakedefine NC_HAS_HDF4
#cmakedefine NC_HAS_HDF5
#cmakedefine NC_HAS_SZIP
#cmakedefine NC_HAS_DAP
#cmakedefine NC_HAS_DISKLESS
#cmakedefine NC_HAS_MMAP
#cmakedefine NC_HAS_JNA
#cmakedefine NC_HAS_PNETCDF
#cmakedefine NC_HAS_PARALLEL
#endif