From 5387063faa68d774e2f586e6d8284520f3cde12f Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 2 May 2015 14:45:42 +0200 Subject: Include version information in all API descriptions --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d73596b..aa64112 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ cmake_minimum_required(VERSION 2.6) set(DISABLE_PCITOOL FALSE CACHE BOOL "Build only the library") +#list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") find_package(PkgConfig REQUIRED) find_package(Threads REQUIRED) @@ -19,6 +20,10 @@ endif (NOT DISABLE_PCITOOL) add_definitions("-fPIC --std=c99 -Wall -O2 -gdwarf-2 -g3") #add_definitions("-fPIC --std=c99 -Wall -O2") +include(cmake/version.cmake) +VERSION_TO_VARS(${PCILIB_VERSION} PCILIB_VERSION_MAJOR PCILIB_VERSION_MINOR PCILIB_VERSION_MICRO) + + add_subdirectory(dma) add_subdirectory(protocols) add_subdirectory(pcilib) @@ -64,8 +69,11 @@ set(PCILIB_DEBUG_DIR "." CACHE PATH "Directory to write debug information") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcitool.pc.in ${CMAKE_CURRENT_BINARY_DIR}/pcitool.pc) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcilib/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/pcilib/config.h) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcilib/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/pcilib/version.h) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pcitool.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig ) + +message("-- Configured pcitool ${PCILIB_VERSION_MAJOR}.${PCILIB_VERSION_MINOR}.${PCILIB_VERSION_MICRO} with public ABI ${PCILIB_ABI_VERSION}") -- cgit v1.2.3