This commit is contained in:
Qing Wang
2020-10-21 12:44:51 +08:00
parent b61f388b24
commit 9ae931cd65
3 changed files with 30 additions and 52 deletions
+30
View File
@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.1)
project(example)
set(ASIO_STANDALONE 1)
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)
include_directories(
# "/usr/local/include"
"../include"
"/Users/qingwang/workspace/opensource/rest_rpc/third/msgpack/include")
INCLUDE_DIRECTORIES(SYSTEM "/Users/qingwang/workspace/opensource/dousi/core/build/external/boost/src/boost_ep")
INCLUDE_DIRECTORIES(SYSTEM "/Users/qingwang/workspace/opensource/rest_rpc/third/msgpack/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)
else()
target_link_libraries(basic_server ${Boost_LIBRARIES})
endif()
-26
View File
@@ -1,26 +0,0 @@
cmake_minimum_required(VERSION 3.1)
project(basic_client)
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 REQUIRED)
include_directories(
"/usr/local/include"
"../../include"
"../../third/msgpack/include"
)
add_executable(basic_client main.cpp)
if (ENABLE_SSL)
target_link_libraries(basic_client ${Boost_LIBRARIES} -lssl -lcrypto -lpthread)
else()
target_link_libraries(basic_client ${Boost_LIBRARIES})
endif()
-26
View File
@@ -1,26 +0,0 @@
cmake_minimum_required(VERSION 3.1)
project(basic_server)
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)
include_directories(
"/usr/local/include"
"../../include"
"../../third/msgpack/include"
)
add_executable(basic_server main.cpp)
if (ENABLE_SSL)
target_link_libraries(basic_server ${Boost_LIBRARIES} -lssl -lcrypto -lpthread)
else()
target_link_libraries(basic_server ${Boost_LIBRARIES})
endif()