summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 31fffe114e4d03772ce25f1237bf014486903047 (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
24
25
26
cmake_minimum_required(VERSION 3.4)

include(FindPkgConfig)

project(Horizon
	LANGUAGES CXX
	VERSION 0.1.0)

pkg_check_modules(LIBUDEV REQUIRED libudev)
pkg_check_modules(PARTED REQUIRED libparted)
find_library(BCNM_LIBRARY REQUIRED wpactrl PATH_SUFFIXES bcnm)

option(BUILD_TOOLS "Enable building of tools (Validator, Simulator, etc)" ON)
option(COVERAGE "Build for code coverage tests (slow)" OFF)

IF(COVERAGE)
    SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
    SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage")
ENDIF(COVERAGE)

include_directories(.)

add_subdirectory(hscript)
IF(BUILD_TOOLS)
    add_subdirectory(tools)
ENDIF(BUILD_TOOLS)