Toast/TriviaBot/CMakeLists.txt

45 lines
1.5 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 2.8.7)
project(TriviaBot)
2016-07-10 19:18:02 +01:00
###############################################################################
## get source ## ##############################################################
###############################################################################
2016-07-10 19:18:02 +01:00
2016-07-31 23:18:21 +01:00
file(GLOB_RECURSE sources bot/*.cpp bot/*.hpp ../lib/sqlite3/sqlite3.c)
2016-07-10 19:18:02 +01:00
###############################################################################
## target definitions #########################################################
###############################################################################
2016-07-10 19:18:02 +01:00
# add the data to the target, so it becomes visible in some IDE
add_executable(TriviaBot ${sources})
2016-07-10 19:18:02 +01:00
2016-07-31 21:13:38 +01:00
# add some compiler flags
set (CMAKE_CXX_FLAGS "-std=c++14 -Wall ${CMAKE_CXX_FLAGS}")
2016-07-10 19:18:02 +01:00
###############################################################################
## dependencies ###############################################################
###############################################################################
2016-07-10 19:18:02 +01:00
find_package(Boost COMPONENTS system thread regex REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)
2016-07-10 19:18:02 +01:00
target_link_libraries(TriviaBot PUBLIC
${Boost_LIBRARIES}
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
pthread
2016-07-31 23:33:32 +01:00
ld
)
2016-07-10 19:18:02 +01:00
include_directories(
${OPENSSL_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
${CURL_INCLUDE_DIR}
../lib/websocketpp
../lib/sqlite3
)
2016-07-10 19:18:02 +01:00
# don't know if necessary, too scared to remove
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)