Enhanced version handling

This commit is contained in:
Daniele Tricoli 2011-06-02 04:17:39 +02:00
parent aedb81ee83
commit b948e237c5
2 changed files with 5 additions and 1 deletions

View file

@ -1,7 +1,11 @@
# Top-level CMakeLists.txt for liboceanography
cmake_minimum_required(VERSION 2.8)
project(liboceanography C)
set(oceanography_version 1.0.0)
# Prevent build in source directory
if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
message (FATAL_ERROR "Building in the source directory is not supported.")

View file

@ -5,7 +5,7 @@ add_library(oceanography SHARED ${oceanography_lib_src})
set_target_properties(oceanography
PROPERTIES
VERSION 1.0.0
VERSION ${oceanography_version}
SOVERSION 1)
install(TARGETS oceanography