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:
Ward Fisher 2014-05-12 16:05:39 -06:00
parent ef3ea2e582
commit 2e1c5bb1cb
2 changed files with 16 additions and 4 deletions

View File

@ -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

View File

@ -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