-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathCMakeLists.txt
44 lines (32 loc) · 966 Bytes
/
CMakeLists.txt
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
33
34
35
36
37
38
39
40
41
42
43
44
cmake_minimum_required(VERSION 3.16)
enable_testing()
project(hefur C CXX)
set(CMAKE_CXX_STANDARD 17)
option(HEFUR_CONTROL_INTERFACE "enables Hefur's control interface and hefurctl" ON)
find_package(GnuTLS REQUIRED)
file(STRINGS VERSION HEFUR_VERSION)
message("hefur version: ${HEFUR_VERSION}")
message("control interface: ${HEFUR_CONTROL_INTERFACE}")
add_definitions(
-D_GNU_SOURCE -D_LARGEFILE64_SOURCE
-Wall -Wextra -Werror=return-type
-DHEFUR_VERSION=\"${HEFUR_VERSION}\"
${GNUTLS_DEFINITIONS})
if(HEFUR_CONTROL_INTERFACE)
add_definitions(-DHEFUR_CONTROL_INTERFACE)
endif()
include(GNUInstallDirs)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(RT_LIB "rt")
else()
set(RT_LIB "")
endif()
add_subdirectory(mimosa EXCLUDE_FROM_ALL)
include_directories(mimosa)
add_subdirectory(hefur)
install(
DIRECTORY www/
DESTINATION ${CMAKE_INSTALL_DATADIR}/hefur/www)
install(
FILES manual/manual.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}/hefur/)