summaryrefslogtreecommitdiffstats
path: root/utils/CMakeLists.txt
blob: df83a7a4057d0d9f927062b1f47d032f68ac954c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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)

# add include of config.h 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 /usr/share/bash-completion/completions
        PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)