-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
29 lines (22 loc) · 1005 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
cmake_minimum_required(VERSION 3.5.0)
project(CGraph-NIO)
set(CMAKE_CXX_STANDARD 17)
# 需要自行安装openssl库,并且提前编译workflow工程
set(OPENSSL_ROOT_DIR "/opt/homebrew/opt/[email protected]/")
set(OPENSSL_LIB_DIR "${OPENSSL_ROOT_DIR}/lib/")
set(OPENSSL_INC_DIR "${OPENSSL_ROOT_DIR}/include/")
set(WORKFLOW_INC_DIR "/usr/local/include/workflow/")
set(LOCAL_LIB_DIR "/usr/local/lib/")
# 引入CGraph哭
include(3rd-party/CGraph/cmake/CGraph-env-include.cmake)
# 添加 workflow 相关内容
include_directories(${OPENSSL_INC_DIR})
include_directories(${WORKFLOW_INC_DIR})
add_executable(CGraph-NIO
$<TARGET_OBJECTS:CGraph> # 通过这一行,添加CGraph的所有功能
main.cpp
)
# 引入编译好的workflow库和ssl库的内容
TARGET_LINK_LIBRARIES(CGraph-NIO "${OPENSSL_LIB_DIR}/libssl.a") # 连接ssl库相关内容
TARGET_LINK_LIBRARIES(CGraph-NIO "${OPENSSL_LIB_DIR}/libcrypto.a")
TARGET_LINK_LIBRARIES(CGraph-NIO "${LOCAL_LIB_DIR}/libworkflow.a")