-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
113 lines (87 loc) · 2.78 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
cmake_minimum_required(VERSION 2.8)
project(mymonero)
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++11")
# find boost
find_package(Boost COMPONENTS
system
filesystem
thread
date_time
chrono
regex
serialization
program_options
REQUIRED)
# include boost headers
include_directories(${Boost_INCLUDE_DIRS})
# set location of monero static libraries
set(MONERO_LIBS_DIR
/opt/monero-dev/libs)
# set location of moneroheaders
set(MONERO_HEADERS_DIR
/opt/monero-dev/headers)
# include monero headers
include_directories(
${MONERO_HEADERS_DIR}/src
${MONERO_HEADERS_DIR}/external
${MONERO_HEADERS_DIR}/contrib/epee/include
${MONERO_HEADERS_DIR}/external/db_drivers/liblmdb)
# get individual monero static libraries
# that are needed in this project
add_library(common STATIC IMPORTED)
set_property(TARGET common PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libcommon.a)
add_library(blocks STATIC IMPORTED)
set_property(TARGET blocks PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libblocks.a)
add_library(cryptoxmr STATIC IMPORTED)
set_property(TARGET cryptoxmr
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libcrypto.a)
add_library(cryptonote_core STATIC IMPORTED)
set_property(TARGET cryptonote_core
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libcryptonote_core.a)
add_library(cryptonote_protocol STATIC IMPORTED)
set_property(TARGET cryptonote_protocol
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libcryptonote_protocol.a)
add_library(mnemonics STATIC IMPORTED)
set_property(TARGET mnemonics
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libmnemonics.a)
add_library(blockchain_db STATIC IMPORTED)
set_property(TARGET blockchain_db
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libblockchain_db.a)
add_library(lmdb STATIC IMPORTED)
set_property(TARGET lmdb
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/liblmdb.a)
add_library(ringct STATIC IMPORTED)
set_property(TARGET ringct
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libringct.a)
add_library(wallet STATIC IMPORTED)
set_property(TARGET wallet
PROPERTY IMPORTED_LOCATION ${MONERO_LIBS_DIR}/libwallet.a)
# add src/ subfolder
add_subdirectory(src/)
# speficie source files
set(SOURCE_FILES
main.cpp)
# make executable called xmreg01
add_executable(mymonerowallet
${SOURCE_FILES})
# link our exexutable xmreg01 against
# libraries
target_link_libraries(mymonerowallet
myxrm
wallet
cryptonote_core
cryptonote_protocol
blockchain_db
cryptoxmr
blocks
lmdb
ringct
common
mnemonics
${Boost_LIBRARIES}
pthread
unbound
unwind
dl
crypto)