2016-07-31 21:04:18 +01:00
|
|
|
cmake_minimum_required(VERSION 2.8.7)
|
2016-07-12 20:47:02 +01:00
|
|
|
project(TriviaBot)
|
2016-07-10 19:18:02 +01:00
|
|
|
|
2016-07-12 20:47: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
|
|
|
|
2016-08-12 15:42:03 +01:00
|
|
|
link_directories(../lib/v8/lib)
|
|
|
|
|
2016-07-12 20:47:02 +01:00
|
|
|
###############################################################################
|
|
|
|
## target definitions #########################################################
|
|
|
|
###############################################################################
|
2016-07-10 19:18:02 +01:00
|
|
|
|
2016-07-12 20:47: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
|
2016-07-31 22:59:51 +01:00
|
|
|
set (CMAKE_CXX_FLAGS "-std=c++14 -Wall ${CMAKE_CXX_FLAGS}")
|
2016-07-10 19:18:02 +01:00
|
|
|
|
2016-07-12 20:47:02 +01:00
|
|
|
###############################################################################
|
|
|
|
## dependencies ###############################################################
|
|
|
|
###############################################################################
|
2016-07-10 19:18:02 +01:00
|
|
|
|
2016-07-12 20:47: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
|
|
|
|
2016-07-12 20:47:02 +01:00
|
|
|
target_link_libraries(TriviaBot PUBLIC
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${OPENSSL_LIBRARIES}
|
|
|
|
${CURL_LIBRARIES}
|
2016-08-12 15:42:03 +01:00
|
|
|
v8
|
|
|
|
v8_libplatform
|
|
|
|
v8_libbase
|
|
|
|
icui18n
|
|
|
|
icuuc
|
|
|
|
rt
|
2016-07-31 23:38:32 +01:00
|
|
|
dl
|
2016-08-12 15:42:03 +01:00
|
|
|
pthread
|
2016-07-12 20:47:02 +01:00
|
|
|
)
|
2016-07-10 19:18:02 +01:00
|
|
|
|
2016-07-12 20:47:02 +01:00
|
|
|
include_directories(
|
|
|
|
${OPENSSL_INCLUDE_DIR}
|
|
|
|
${Boost_INCLUDE_DIR}
|
|
|
|
${CURL_INCLUDE_DIR}
|
|
|
|
../lib/websocketpp
|
2016-07-31 23:07:22 +01:00
|
|
|
../lib/sqlite3
|
2016-08-12 15:42:03 +01:00
|
|
|
../lib/v8
|
2016-07-12 20:47:02 +01:00
|
|
|
)
|
2016-07-10 19:18:02 +01:00
|
|
|
|
2016-07-12 20:47:02 +01:00
|
|
|
# don't know if necessary, too scared to remove
|
2016-08-12 15:42:03 +01:00
|
|
|
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
|
2016-08-15 20:12:47 +01:00
|
|
|
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|