-
Notifications
You must be signed in to change notification settings - Fork 58
/
CMakeLists.txt
63 lines (55 loc) · 2.3 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
54
55
56
57
58
59
60
61
62
63
cmake_minimum_required(VERSION 3.1)
project (mmbot)
EXEC_PROGRAM(uname OUTPUT_VARIABLE SYSTEM_NAME)
SET(SYSTEM_NAME "${SYSTEM_NAME}" CACHE INTERNAL "")
IF(SYSTEM_NAME STREQUAL "Linux")
MESSAGE("-- Detected Linux system")
LINK_LIBRARIES( stdc++fs)
ENDIF(SYSTEM_NAME STREQUAL "Linux")
IF(SYSTEM_NAME STREQUAL "FreeBSD")
MESSAGE("-- Detected FreeBSD system")
LINK_LIBRARIES(execinfo)
ENDIF(SYSTEM_NAME STREQUAL "FreeBSD")
LINK_LIBRARIES(ssl crypto pthread)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin/)
include_directories(BEFORE src/server/src src )
add_compile_options(-std=c++17)
add_compile_options(-DOPENSSL_API_COMPAT=10101)
add_compile_options(-Wall -Wno-noexcept-type)
include(src/imtjson/library.cmake)
add_subdirectory (src/server/src/simpleServer EXCLUDE_FROM_ALL)
add_subdirectory (src/brokers EXCLUDE_FROM_ALL)
add_subdirectory (src/main)
add_subdirectory (src/brokers/rptbroker)
add_subdirectory (src/brokers/binance)
add_subdirectory (src/brokers/bitfinex)
add_subdirectory (src/brokers/bybit)
add_subdirectory (src/brokers/bybit_v5)
add_subdirectory (src/brokers/bitmex)
add_subdirectory (src/brokers/coinbase)
add_subdirectory (src/brokers/coinmate)
add_subdirectory (src/brokers/deribit)
add_subdirectory (src/brokers/datasrc)
add_subdirectory (src/brokers/kraken)
add_subdirectory (src/brokers/kucoin)
add_subdirectory (src/brokers/okx)
add_subdirectory (src/brokers/simplefx)
add_subdirectory (src/brokers/xtb)
add_subdirectory (src/brokers/tradeogre)
add_subdirectory (src/brokers/trainer)
add_subdirectory (src/brokers/couchdb_storage)
add_subdirectory (src/brokers/replay)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "/opt/mmbot" CACHE PATH "Default path to install" FORCE)
endif()
install(PROGRAMS bin/mmbot DESTINATION bin)
install(DIRECTORY bin/brokers DESTINATION bin USE_SOURCE_PERMISSIONS)
install(FILES conf/mmbot.conf conf/brokers.conf DESTINATION "conf")
install(FILES conf/mmbot.pkg.conf DESTINATION "conf" RENAME "local.conf")
install(FILES www/index.html www/manifest.json www/sw.js DESTINATION "www")
install(DIRECTORY www/admin DESTINATION "www")
install(DIRECTORY www/res DESTINATION "www")
install(DIRECTORY DESTINATION "data")
install(DIRECTORY DESTINATION "secure_data")
install(DIRECTORY DESTINATION "run")
install(DIRECTORY DESTINATION "log")