Newer
Older
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
project(dap_chain_common_python_module C)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_COLOR_MAKEFILE ON)
set(CMAKE_C_STANDARD 11)
add_definitions("-fpic")
if(UNIX)
add_definitions("-DDAP_OS_UNIX")
endif()
if (NOT (${SUBMODULES_NO_BUILD} MATCHES ON))
set (SUBMODULES_NO_BUILD ON)
if (NOT (TARGET dap_core))
add_subdirectory(libdap)
target_compile_options(
dap_core PRIVATE
"-fpic"
)
endif()
if (NOT (TARGET dap_crypto))
add_subdirectory(libdap-crypto)
target_compile_options(
dap_crypto PRIVATE
"-fpic"
)
endif()
if (NOT (TARGET dap_chain_common))
add_subdirectory(libdap-chain-common)
target_compile_options(
dap_chain_common PRIVATE
"-fpic"
)
endif()
#if (NOT (TARGET dap_chain_coommon))
# add_subdirectory(libdap-chain-common)
# target_compile_options(
# dap_chain_common PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain))
# add_subdirectory(libdap-chain)
# target_compile_options(
# dap_chain PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain_crypto))
# add_subdirectory(libdap-chain-crypto)
# target_compile_options(
# dap_chain_crypto PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain_mempool))
# add_subdirectory(libdap-chain-mempool)
# target_compile_options(
# dap_chain_mempool PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain_net))
# add_subdirectory(libdap-chain-net)
# target_compile_options(
# dap_chain_net PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_server_core))
# add_subdirectory(libdap-server-core)
# target_compile_options(
# dap_server_core PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain_global_db))
# add_subdirectory(libdap-chain-global-db)
# target_compile_options(
# dap_chain_global_db PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_client))
# add_subdirectory(libdap-client)
# target_compile_options(
# dap_client PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET libdap-server))
# add_subdirectory(libdap-server)
# # target_compile_options(
# # libdap-server PRIVATE
# # "-fpic"
# # )
#endif()
#if (NOT (TARGET dap_stream))
# add_subdirectory(libdap-stream)
# target_compile_options(
# dap_stream PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_stream_ch))
# add_subdirectory(libdap-stream-ch)
# target_compile_options(
# dap_stream_ch PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_stream_ch_chain))
# add_subdirectory(libdap-stream-ch-chain)
# target_compile_options(
# dap_stream_ch_chain PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_stream_ch_chain_net))
# add_subdirectory(libdap-stream-ch-chain-net)
# target_compile_options(
# dap_stream_ch_chain_net PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_udp_server))
# add_subdirectory(libdap-server-udp)
# target_compile_options(
# dap_udp_server PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain_wallet))
# add_subdirectory(libdap-chain-wallet)
# target_compile_options(
# dap_chain_wallet PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain_net_srv))
# add_subdirectory(libdap-chain-net-srv)
# target_compile_options(
# dap_chain_net_srv PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_server_http_db_auth))
# add_subdirectory(libdap-server-http-db-auth)
# target_compile_options(
# dap_server_http_db_auth PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_chain_gdb))
# add_subdirectory(libdap-chain-gdb)
# target_compile_options(
# dap_chain_gdb PRIVATE
# "-fpic"
# )
#endif()
# if (NOT (TARGET dap_chain_net_srv_vpn))
# add_subdirectory(libdap-chain-net-srv-vpn)
# target_compile_options(
# dap_chain_net_srv_vpn PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET dap_server_http_db))
# add_subdirectory(libdap-server-http-db)
# target_compile_options(
# dap_server_http_db PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET (dap_python_module)))
# add_subdirectory(libdap-python)
# target_compile_options(
# dap_python_module PRIVATE
# "-fpic"
# )
#endif()
#if (NOT (TARGET (dap_chain_python_module)))
# add_subdirectory(libdap-chain-python)
# target_compile_options(
# dap_chain_python_module PRIVATE
# "-fpic"
# )
#endif()
if (NOT (TARGET (dap_crypto_python_module)))
add_subdirectory(libdap-crypto-python)
target_compile_options(
dap_crypto_python_module PRIVATE
"-fpic"
)
endif()
endif()
file(GLOB CHAIN_COMMON_PYTHON_SRCS src/*.c)
file(GLOB CHAIN_COMMON_PYTHON_HEADERS include/*.h)
set(Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4)
find_package (PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIR} include/)
add_library(${PROJECT_NAME} STATIC ${CHAIN_COMMON_PYTHON_SRCS} ${CHAIN_COMMON_PYTHON_HEADERS})
target_link_libraries(${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} dap_chain_common dap_core dap_crypto dap_crypto_python_module)
target_include_directories(${PROJECT_NAME} PUBLIC include/ )