-
Notifications
You must be signed in to change notification settings - Fork 40
/
CMakeLists.txt
47 lines (41 loc) · 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
cmake_minimum_required(VERSION 2.8.12)
project(Pandanite)
if (WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++latest")
set(CONAN_DISABLE_CHECK_COMPILER TRUE)
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
include(${CMAKE_BINARY_DIR}/build/conanbuildinfo.cmake)
conan_basic_setup()
file(GLOB CORE_SOURCES "src/core/*.cpp")
file(GLOB SERVER_SOURCES "src/server/*.cpp")
file(GLOB EXTERNAL_SOURCES "src/external/ed25519/*.c" "src/external/murmurhash3/*.cpp" "src/external/sha256/*.cpp" "src/external/bigint/*.cpp")
if (UNIX)
add_executable(tests ${CORE_SOURCES} ${SERVER_SOURCES} ${EXTERNAL_SOURCES} ./src/tests/tests.cpp)
add_executable(server ${CORE_SOURCES} ${SERVER_SOURCES} ${EXTERNAL_SOURCES} ./src/tools/server.cpp)
add_executable(cli ${CORE_SOURCES} ${SERVER_SOURCES} ${EXTERNAL_SOURCES} ./src/tools/cli.cpp)
add_executable(loader ${CORE_SOURCES} ${SERVER_SOURCES} ${EXTERNAL_SOURCES} ./src/tools/loader.cpp)
add_executable(tx ${CORE_SOURCES} ${SERVER_SOURCES} ${EXTERNAL_SOURCES} ./src/tools/tx.cpp)
add_executable(miner ${CORE_SOURCES} ${SERVER_SOURCES} ${EXTERNAL_SOURCES} ./src/tools/miner.cpp)
add_executable(keygen ${CORE_SOURCES} ${SERVER_SOURCES} ${EXTERNAL_SOURCES} ./src/tools/keygen.cpp)
if (APPLE)
target_link_libraries(tests ${CONAN_LIBS} /usr/local/Cellar/leveldb/1.23/lib/libleveldb.a /usr/local/Cellar/snappy/1.1.9/lib/libsnappy.a)
target_link_libraries(server ${CONAN_LIBS} /usr/local/Cellar/leveldb/1.23/lib/libleveldb.a /usr/local/Cellar/snappy/1.1.9/lib/libsnappy.a)
target_link_libraries(cli ${CONAN_LIBS} /usr/local/Cellar/leveldb/1.23/lib/libleveldb.a /usr/local/Cellar/snappy/1.1.9/lib/libsnappy.a)
target_link_libraries(loader ${CONAN_LIBS} /usr/local/Cellar/leveldb/1.23/lib/libleveldb.a /usr/local/Cellar/snappy/1.1.9/lib/libsnappy.a)
target_link_libraries(tx ${CONAN_LIBS} /usr/local/Cellar/leveldb/1.23/lib/libleveldb.a /usr/local/Cellar/snappy/1.1.9/lib/libsnappy.a)
target_link_libraries(miner ${CONAN_LIBS} /usr/local/Cellar/leveldb/1.23/lib/libleveldb.a /usr/local/Cellar/snappy/1.1.9/lib/libsnappy.a)
target_link_libraries(keygen ${CONAN_LIBS} /usr/local/Cellar/leveldb/1.23/lib/libleveldb.a /usr/local/Cellar/snappy/1.1.9/lib/libsnappy.a)
else()
target_link_libraries(tests ${CONAN_LIBS} -lleveldb -lstdc++fs -lssl -lcrypto)
target_link_libraries(server ${CONAN_LIBS} -lleveldb -lstdc++fs -lssl -lcrypto)
target_link_libraries(cli ${CONAN_LIBS} -lleveldb -lstdc++fs -lssl -lcrypto)
target_link_libraries(loader ${CONAN_LIBS} -lleveldb -lstdc++fs -lssl -lcrypto)
target_link_libraries(tx ${CONAN_LIBS} -lleveldb -lstdc++fs -lssl -lcrypto)
target_link_libraries(miner ${CONAN_LIBS} -lleveldb -lstdc++fs -lssl -lcrypto)
target_link_libraries(keygen ${CONAN_LIBS} -lleveldb -lstdc++fs -lssl -lcrypto)
endif()
endif()