Toast/TriviaBot/CMakeLists.txt

43 lines
1.5 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.0)
project(TriviaBot)
2016-07-10 19:18:02 +01:00
###############################################################################
## get source ## ##############################################################
###############################################################################
2016-07-10 19:18:02 +01:00
file(GLOB_RECURSE sources bot/*.cpp bot/*.hpp)
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
# just for example add some compiler flags
target_compile_options(TriviaBot PUBLIC -std=c++14 -Wall -Wfloat-conversion -g)
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-10 19:18:02 +01:00
include_directories(
${OPENSSL_INCLUDE_DIR}
${Boost_INCLUDE_DIR}
${CURL_INCLUDE_DIR}
../lib/websocketpp
)
2016-07-10 19:18:02 +01:00
# don't know if necessary, too scared to remove
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)