diff options
author | Manuel Bentele | 2020-09-10 13:30:47 +0200 |
---|---|---|
committer | Manuel Bentele | 2020-09-16 07:37:56 +0200 |
commit | 1dd2c3999236595a5f6cebdf35dfe7536ff5c34d (patch) | |
tree | 75b42c0631cb78ae9b0ce2a817399f8095bc6b07 /utils/CMakeLists.txt | |
parent | Fixed major number of xloop device and device names in xlosetup (diff) | |
download | xloop-1dd2c3999236595a5f6cebdf35dfe7536ff5c34d.tar.gz xloop-1dd2c3999236595a5f6cebdf35dfe7536ff5c34d.tar.xz xloop-1dd2c3999236595a5f6cebdf35dfe7536ff5c34d.zip |
Generate util-linux configuration to build xlosetup
Diffstat (limited to 'utils/CMakeLists.txt')
-rw-r--r-- | utils/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index df83a7a..1388f2b 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -7,8 +7,12 @@ project(xloop-utils) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) -# add include of config.h to each source file -add_compile_options(-include ${CMAKE_CURRENT_SOURCE_DIR}/config.h) +# prepare date for configuring config.h +string(TIMESTAMP DATE "%d-%b-%Y") + +# configure configuration config.h and add it to each source file +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +add_compile_options(-include ${CMAKE_CURRENT_BINARY_DIR}/config.h) # add xloop specific compile options add_definitions(-DCONFIG_BLK_DEV_XLOOP_MIN_COUNT=${BLK_DEV_XLOOP_MIN_COUNT} -DXLOOP_MAJOR=${XLOOP_MAJOR}) |