-
Notifications
You must be signed in to change notification settings - Fork 22
/
CMakeLists.txt
27 lines (20 loc) · 972 Bytes
/
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
cmake_minimum_required(VERSION 3.0)
project(rosbridgecpp)
option(PRINT_DEBUG "Print debug messages" ON)
if(PRINT_DEBUG)
add_definitions(-DDEBUG)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_EXTENSIONS OFF) # Set OFF to use -std=c++11, otherwise it uses -std=gnu++11 by default
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Simple-WebSocket-Server") #PROJECT_SOURCE_DIR
add_subdirectory(Simple-WebSocket-Server)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include")
add_library(rosbridgecpp INTERFACE)
target_include_directories(rosbridgecpp INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(rosbridgecpp INTERFACE simple-websocket-server)
# If Simple-WebSocket-Server is not a sub-project:
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
add_executable(rosbridge_ws_client rosbridge_ws_client.cpp)
target_link_libraries(rosbridge_ws_client simple-websocket-server)
endif()