summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-02-04 01:18:33 +0100
committerSuren A. Chilingaryan <csa@suren.me>2016-02-04 01:18:33 +0100
commit0e12e11ed817d66ff1e9246a32931e14e4fa6700 (patch)
tree6d2a2f2c6f374a0df45605701a0f736f2993a8a5 /CMakeLists.txt
parent333fe52eb3c7876cfe668dfe0445d34c46989d73 (diff)
downloadpcitool-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.txt9
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}")