From dbb41ce2b7f309d394054a6bd1e33afd578798a5 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 23 Oct 2020 15:18:01 +0200 Subject: Move the source code of all xloop components to the common 'src' directory --- src/utils/CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/utils/CMakeLists.txt (limited to 'src/utils/CMakeLists.txt') diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt new file mode 100644 index 0000000..cfc5548 --- /dev/null +++ b/src/utils/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.10) + +# set the project name +project(xloop-utils) + +# include global headers +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) + +# 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}) + +add_subdirectory(lib) +add_subdirectory(libsmartcols) +add_subdirectory(sys-utils) + +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bash-completion/xlosetup + DESTINATION share/bash-completion/completions + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ + COMPONENT main) -- cgit v1.2.3-55-g7522