-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
30 lines (24 loc) · 1.17 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
cmake_minimum_required(VERSION 3.15)
project(discordpp-websocket-simpleweb)
if (CMAKE_CXX_STANDARD LESS 14)
error(${PROJECT_NAME} requires at least C++14)
endif ()
###################
option(DISCORDPP_USE_BOOST "set ON to use Boost.Asio instead of standalone Asio" OFF)
list(PREPEND ALL_DISCORDPP_PLUGINS discordpp::WebsocketSimpleWeb)
list(APPEND ALL_DISCORDPP_LIBRARIES discordpp-websocket-simpleweb)
set(ALL_DISCORDPP_INCLUDES ${ALL_DISCORDPP_INCLUDES} "#include <discordpp/websocket-simpleweb.hh>\n" PARENT_SCOPE)
set(ALL_DISCORDPP_LIBRARIES ${ALL_DISCORDPP_LIBRARIES} PARENT_SCOPE)
set(ALL_DISCORDPP_PLUGINS ${ALL_DISCORDPP_PLUGINS} PARENT_SCOPE)
if (NOT ${DISCORDPP_USE_BOOST})
option(USE_STANDALONE_ASIO "set ON to use standalone Asio instead of Boost.Asio" ON)
set(ASIO_PATH ${discordpp_SOURCE_DIR}/lib/asio)
endif ()
add_subdirectory(lib/simple-websocket-server)
if (NOT ${DISCORDPP_USE_BOOST})
unset(ASIO_PATH)
unset(USE_STANDALONE_ASIO)
endif ()
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} ${Simple-WebSocket-Server_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} INTERFACE discordpp)