-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
53 lines (46 loc) · 1.07 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 3.16)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "Do not build in-source. Please remove CMakeCache.txt and the CMakeFiles/ directory. Then build out-of-source.")
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
project(
"trader"
VERSION 0.0.1
LANGUAGES CXX
)
add_definitions(-DPROJECT_LOG_PATH="${CMAKE_BINARY_DIR}/log")
find_package(Threads REQUIRED)
find_package(jsoncpp REQUIRED)
add_library(
${PROJECT_NAME}
SHARED
include/invest.hpp
src/invest.cpp
src/main.cpp
)
target_link_libraries(
${PROJECT_NAME}
PUBLIC
Threads::Threads
curl
jsoncpp_lib
)
target_include_directories(
${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
)
set_target_properties(
${PROJECT_NAME}
PROPERTIES
PREFIX "lib-"
OUTPUT_NAME "invest"
DEBUG_POSTFIX d
)
add_library(
hslee::invest
ALIAS ${PROJECT_NAME}
)
add_subdirectory(apps)