diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2016-02-04 01:18:33 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2016-02-04 01:18:33 +0100 |
commit | 0e12e11ed817d66ff1e9246a32931e14e4fa6700 (patch) | |
tree | 6d2a2f2c6f374a0df45605701a0f736f2993a8a5 /CMakeLists.txt | |
parent | 333fe52eb3c7876cfe668dfe0445d34c46989d73 (diff) | |
download | pcitool-0e12e11ed817d66ff1e9246a32931e14e4fa6700.tar.gz pcitool-0e12e11ed817d66ff1e9246a32931e14e4fa6700.tar.bz2 pcitool-0e12e11ed817d66ff1e9246a32931e14e4fa6700.tar.xz pcitool-0e12e11ed817d66ff1e9246a32931e14e4fa6700.zip |
Add build information
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 63bdeb3..46a35b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,8 +59,17 @@ add_definitions("-fPIC --std=c99 -Wall -O2 -gdwarf-2 -g3 -fno-omit-frame-pointer #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_custom_target(build) +add_custom_command(TARGET build + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/build.cmake + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +) +set_source_files_properties(${CMAKE_BINARY_DIR}/pcilib/build.h PROPERTIES GENERATED TRUE) + + set(TARNAME "pcitool") set(PACKAGE_VERSION ${PCILIB_VERSION}) set(PACKAGE_NAME "${TARNAME}") |