forked from qicosmos/rest_rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (23 loc) · 844 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
28
29
30
cmake_minimum_required(VERSION 3.1)
project(example)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++11")
SET(ENABLE_SSL OFF)
if (ENABLE_SSL)
add_definitions(-DCINATRA_ENABLE_SSL)
message(STATUS "Use SSL")
endif()
find_package(Boost COMPONENTS system filesystem REQUIRED)
find_package(JNI REQUIRED)
include_directories(
"/usr/local/include"
"../include"
"../thirdparty/msgpack-c/include")
add_executable(basic_server server/main.cpp)
add_executable(basic_client client/main.cpp)
if (ENABLE_SSL)
target_link_libraries(basic_server ${Boost_LIBRARIES} -lssl -lcrypto -lpthread)
target_link_libraries(basic_client ${Boost_LIBRARIES} -lssl -lcrypto -lpthread)
else()
target_link_libraries(basic_server ${Boost_LIBRARIES})
target_link_libraries(basic_client ${Boost_LIBRARIES})
endif()