aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2013-06-02 14:32:45 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2013-06-04 20:18:56 +0200
commitce341fe53bb235f1c8d848ae850ebc136b08f563 (patch)
tree9464f07776b17444a745116dd4d78ca802cdee9c /CMakeLists.txt
parenta5dd532cbb2d3bdf9b7f2d7c3e111fff981ab11a (diff)
cmake: add version module
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b113311..09a9cbb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,12 @@ if(NOT LIB_INSTALL_DIR)
set(LIB_INSTALL_DIR lib)
endif()
+# Set the version information here
+set(VERSION_INFO_MAJOR_VERSION 0) # increment major on api compatibility changes
+set(VERSION_INFO_MINOR_VERSION 0) # increment minor on feature-level changes
+set(VERSION_INFO_PATCH_VERSION git) # increment patch for bug fixes and docs
+include(Version) # setup version info
+
########################################################################
# Compiler specific setup
########################################################################
@@ -146,3 +152,9 @@ INSTALL(
FILES ${CMAKE_CURRENT_BINARY_DIR}/librtlsdr.pc
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
)
+
+########################################################################
+# Print Summary
+########################################################################
+MESSAGE(STATUS "Building for version: ${VERSION} / ${LIBVER}")
+MESSAGE(STATUS "Using install prefix: ${CMAKE_INSTALL_PREFIX}")