summaryrefslogtreecommitdiffstats
path: root/src/utils/CMakeLists.txt
blob: f3ea912c52f86b5f97fbd739e0a618211ca25fe7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required(VERSION 3.10)

# set the project name
project(xloop-utils)

# include global headers
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${PROJECT_INCLUDE_GEN_DIR})

# configure configuration config.h and add it to each source file
add_compile_options(-include ${CMAKE_CURRENT_SOURCE_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)