diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-05-02 14:45:42 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-05-02 14:45:42 +0200 |
commit | 5387063faa68d774e2f586e6d8284520f3cde12f (patch) | |
tree | c849a07034fe0ba9880fdf8db27972925f93c75a /CMakeLists.txt | |
parent | 92b8fe6e949f08308d237e87441e066a19a9eda6 (diff) | |
download | pcitool-5387063faa68d774e2f586e6d8284520f3cde12f.tar.gz pcitool-5387063faa68d774e2f586e6d8284520f3cde12f.tar.bz2 pcitool-5387063faa68d774e2f586e6d8284520f3cde12f.tar.xz pcitool-5387063faa68d774e2f586e6d8284520f3cde12f.zip |
Include version information in all API descriptions
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
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}") |