-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
39 lines (28 loc) · 1.14 KB
/
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(keywatch)
#### Configuration ############################################################
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -Wextra -pedantic -g")
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
SET(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Werror -ftemplate-depth=1024 -Wunreachable-code -Wimplicit-fallthrough -Wpadded -g")
ENDIF()
#### Libraries ################################################################
# Boost (for the Spirit parser)
FIND_PACKAGE(Boost REQUIRED COMPONENTS program_options)
INCLUDE_DIRECTORIES(Boost_INCLUDE_DIRS)
# CURL (for http)
FIND_PACKAGE(CURL REQUIRED)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
# Crypto++ (for hashing and random-number generation)
FIND_LIBRARY(CRYPTOPP_LIBRARIES crypto++)
IF(NOT CRYPTOPP_LIBRARIES)
MESSAGE(SEND_ERROR "Could not find Crypto++")
ENDIF(NOT CRYPTOPP_LIBRARIES)
# Threads (for std::thread)
FIND_PACKAGE(Threads)
# NCURSES
FIND_PACKAGE(Curses)
#### Down to business #########################################################
SUBDIRS(src)