-
Notifications
You must be signed in to change notification settings - Fork 135
/
CMakeLists.txt
executable file
·54 lines (36 loc) · 1.16 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
cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME
openmonero)
project(${PROJECT_NAME})
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Debug)
if(CMAKE_SIZEOF_VOID_P EQUAL "4")
add_definitions(-DMDB_VL32)
endif()
option(BUILD_TESTS "Build tests for the project" OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/src/xmregcore/cmake")
include(MyUtils)
find_package(MySQL++ REQUIRED)
find_package(Restbed REQUIRED)
create_git_version()
configure_files(${CMAKE_CURRENT_SOURCE_DIR}/config
${CMAKE_CURRENT_BINARY_DIR}/config)
# add XMREGCORE submodule
set(BUILD_XMREGCORE_TESTS OFF CACHE INTERNAL "")
add_subdirectory(src/xmregcore)
# add src/ subfolder
add_subdirectory(src/)
# add ext/ subfolder
add_subdirectory(ext/)
add_executable(${PROJECT_NAME}
main.cpp)
target_link_libraries(${PROJECT_NAME}
PRIVATE myxmr)
configure_files(${CMAKE_CURRENT_SOURCE_DIR}/sql
${CMAKE_CURRENT_BINARY_DIR}/sql)
if (${BUILD_TESTS})
enable_testing()
add_subdirectory(src/xmregcore/ext/googletest)
add_subdirectory(tests)
endif()