-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (24 loc) · 899 Bytes
/
CMakeLists.txt
File metadata and controls
32 lines (24 loc) · 899 Bytes
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
27
28
29
30
31
32
cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
project(astaire)
INCLUDE(CheckLibraryExists)
INCLUDE(FindPkgConfig)
# CXX11
set(CMAKE_CXX_STANDARD 11)
set(VERSION "0.1")
# Check if building in release or debug mode
if ((CMAKE_BUILD_TYPE MATCHES Debug) OR (CMAKE_BUILD_TYPE MATCHES DEBUG))
set(DEBUG_BUILD 1)
message(STATUS "Note: building in debug mode. Log will be more verbose")
else()
set(DEBUG_BUILD 0)
message(STATUS "Note: building in release mode. Build in debug mode for a verbose log")
endif()
# Where astaireopenvpn will be installed
set(CMAKE_INSTALL_BINDIR bin)
# Don't want compilation in source dir
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
if(",${CMAKE_SOURCE_DIR}," STREQUAL ",${CMAKE_BINARY_DIR},")
message(FATAL_ERROR "ERROR: In-source builds are not allowed.")
endif()
add_subdirectory("${astaire_SOURCE_DIR}/src/")