mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-06 18:00:24 +08:00
Added a netcdf_lib_version variable to correspond to the version computed by autotools. Also changed netcdf_so_version to 7 in cmake. This way cmake-based builds give us the same library names as autotools-based builds.
This commit is contained in:
parent
ef3ea2e582
commit
2e1c5bb1cb
@ -11,14 +11,25 @@ cmake_minimum_required(VERSION 2.8.8)
|
||||
#Project Name
|
||||
project(netCDF C)
|
||||
set(PACKAGE "netCDF" CACHE STRING "")
|
||||
#Project Version
|
||||
#####
|
||||
# Version Info:
|
||||
#
|
||||
# Release Version
|
||||
# Library Version
|
||||
# SO Version
|
||||
#
|
||||
# SO Version is computed from library version. See:
|
||||
# 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 "-rc1")
|
||||
SET(netCDF_VERSION ${netCDF_VERSION_MAJOR}.${netCDF_VERSION_MINOR}.${netCDF_VERSION_PATCH}${netCDF_VERSION_NOTE})
|
||||
SET(VERSION ${netCDF_VERSION})
|
||||
SET(netCDF_SO_VERSION 7.2.0)
|
||||
SET(netCDF_LIB_VERSION 7.2.0)
|
||||
SET(netCDF_SO_VERSION 7)
|
||||
SET(PACKAGE_VERSION ${VERSION})
|
||||
|
||||
# Get system configuration, Use it to determine osname, os release, cpu. These
|
||||
|
@ -89,8 +89,9 @@ IF(NOT MSVC)
|
||||
ENDIF()
|
||||
|
||||
SET_TARGET_PROPERTIES(netcdf PROPERTIES
|
||||
VERSION ${netCDF_VERSION}
|
||||
SOVERSION ${netCDF_SO_VERSION})
|
||||
VERSION ${netCDF_LIB_VERSION}
|
||||
SOVERSION ${netCDF_SO_VERSION}
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
TARGETS netcdf EXPORT netcdf-targets RUNTIME DESTINATION bin COMPONENT libraries
|
||||
|
Loading…
x
Reference in New Issue
Block a user