forked from btccom/btcpool-ABANDONED
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
489 lines (398 loc) · 15.7 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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
cmake_minimum_required (VERSION 2.6)
project (BTCPOOL)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
###################################### Options ######################################
message("") # empty line
message("------------------------------- Options -------------------------------")
# packname postfix will be different with some optional feature enabled
set(POOL__DEB_PACKNAME_POSTFIX "")
#
# Build Type: -DCMAKE_BUILD_TYPE=Debug|Release
# Default: Release
#
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
message("-- Build Type: ${CMAKE_BUILD_TYPE} (-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})")
IF(CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_CXX_FLAGS "-g -O0 -Wall")
ELSEIF(CMAKE_BUILD_TYPE MATCHES Release)
set(CMAKE_CXX_FLAGS "-g -O2 -Wall")
ELSE()
set(CMAKE_CXX_FLAGS "-g -Wall")
ENDIF()
# compiler options
set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER_ARG1 "-std=c++0x")
# The number of concurrent jobs when compiling a third-party library
if(JOBS)
message("-- Concurrent Jobs: ${JOBS} (-DJOBS=${JOBS})")
set(MAKE_JOBS "-j${JOBS}")
else()
message("-- Concurrent Jobs: 1 (-DJOBS=1)")
set(MAKE_JOBS "")
endif()
#
# Chain Type
#
if(NOT CHAIN_TYPE)
message(FATAL_ERROR "Chain type not defined! (-DCHAIN_TYPE=BTC|BCH|UBTC|SBTC)")
endif()
# Bitcoin
if (CHAIN_TYPE STREQUAL "BTC")
set(CHAIN_NAME "Bitcoin Core")
set(POOL__DEB_PACKNAME_POSTFIX "${POOL__DEB_PACKNAME_POSTFIX}-bitcoin")
set(POOL__DEFAULT_INSTALL_PREFIX "/work/btcpool.btc")
if (HAVE_KEY_IO_H)
add_definitions(-DINCLUDE_BTC_KEY_IO_H)
endif()
add_definitions(-DCHAIN_TYPE_BTC)
add_definitions(-DCHAIN_TYPE_STR="BTC")
add_definitions(-DKAFKA_TOPIC_PREFIX="") # for compatibility with old deployments, let it empty.
add_definitions(-DZOOKEEPER_NODE_POSTFIX="") # for compatibility with old deployments, let it empty.
# BitcoinCash
elseif(CHAIN_TYPE STREQUAL "BCH")
set(CHAIN_NAME "Bitcoin ABC")
set(POOL__DEB_PACKNAME_POSTFIX "${POOL__DEB_PACKNAME_POSTFIX}-bitcoincash")
set(POOL__DEFAULT_INSTALL_PREFIX "/work/btcpool.bcc") # for compatibility with old deployments, use bcc instead of bch.
add_definitions(-DCHAIN_TYPE_BCH)
add_definitions(-DCHAIN_TYPE_STR="BCH")
add_definitions(-DKAFKA_TOPIC_PREFIX="") # for compatibility with old deployments, let it empty.
add_definitions(-DZOOKEEPER_NODE_POSTFIX="") # for compatibility with old deployments, let it empty.
# UnitiedBitcoin
elseif(CHAIN_TYPE STREQUAL "UBTC")
set(CHAIN_NAME "United Bitcoin")
set(POOL__DEB_PACKNAME_POSTFIX "${POOL__DEB_PACKNAME_POSTFIX}-unitedbitcoin")
set(POOL__DEFAULT_INSTALL_PREFIX "/work/btcpool.ubtc")
add_definitions(-DCHAIN_TYPE_UBTC)
add_definitions(-DCHAIN_TYPE_STR="UBTC")
add_definitions(-DKAFKA_TOPIC_PREFIX="UBTC_")
add_definitions(-DZOOKEEPER_NODE_POSTFIX="_ubtc")
# SuperBitcoin
elseif(CHAIN_TYPE STREQUAL "SBTC")
set(CHAIN_NAME "Super Bitcoin")
set(POOL__DEB_PACKNAME_POSTFIX "${POOL__DEB_PACKNAME_POSTFIX}-superbitcoin")
set(POOL__DEFAULT_INSTALL_PREFIX "/work/btcpool.sbtc")
add_definitions(-DCHAIN_TYPE_SBTC)
add_definitions(-DCHAIN_TYPE_STR="SBTC")
add_definitions(-DKAFKA_TOPIC_PREFIX="SBTC_")
add_definitions(-DZOOKEEPER_NODE_POSTFIX="_sbtc")
# Unknown
else()
message("Unknown chain type! (-DCHAIN_TYPE=${CHAIN_TYPE})")
message(FATAL_ERROR "Supported chain type: BTC|BCH|UBTC|SBTC")
endif()
message("-- Chain Type: ${CHAIN_NAME} (-DCHAIN_TYPE=${CHAIN_TYPE})")
# add a macro that needed by chain's source code
add_definitions(-DHAVE_CONFIG_H)
#
# Root Dir of Chain's Source Code
#
if(NOT CHAIN_SRC_ROOT)
message(FATAL_ERROR "Root dir of chain's source code not defined! (-DCHAIN_SRC_ROOT=<path>)")
endif()
message("-- Root Dir of ${CHAIN_NAME}: ${CHAIN_SRC_ROOT} (-DCHAIN_SRC_ROOT=${CHAIN_SRC_ROOT})")
if (NOT EXISTS "${CHAIN_SRC_ROOT}/src/version.h")
message(FATAL_ERROR "The source code of ${CHAIN_NAME} not exists!")
endif()
###
# work with stratum switcher
###
option(POOL__WORK_WITH_STRATUM_SWITCHER "Work with Stratum Switcher" OFF)
if(POOL__WORK_WITH_STRATUM_SWITCHER)
message("-- Work with Stratum Switcher: Enabled (-DPOOL__WORK_WITH_STRATUM_SWITCHER=ON)")
add_definitions(-DWORK_WITH_STRATUM_SWITCHER)
set(POOL__DEB_PACKNAME_POSTFIX "${POOL__DEB_PACKNAME_POSTFIX}-withswitcher")
else()
message("-- Work with Stratum Switcher: Disabled (-DPOOL__WORK_WITH_STRATUM_SWITCHER=OFF)")
endif()
###
# user defined coinbase info
###
option(POOL__USER_DEFINED_COINBASE "User Defined Coinbase" OFF)
# the size of user defined coinbase, default is 10 bytes
if (NOT POOL__USER_DEFINED_COINBASE_SIZE)
set(POOL__USER_DEFINED_COINBASE_SIZE 10)
endif()
if (POOL__USER_DEFINED_COINBASE)
message("-- User Defined Coinbase: Enabled (-DPOOL__USER_DEFINED_COINBASE=ON)")
message("-- The Size of User Defined Coinbase: ${POOL__USER_DEFINED_COINBASE_SIZE} Bytes (-DPOOL__USER_DEFINED_COINBASE_SIZE=${POOL__USER_DEFINED_COINBASE_SIZE})")
add_definitions(-DUSER_DEFINED_COINBASE)
add_definitions(-DUSER_DEFINED_COINBASE_SIZE=${POOL__USER_DEFINED_COINBASE_SIZE})
set(POOL__DEB_PACKNAME_POSTFIX "${POOL__DEB_PACKNAME_POSTFIX}-usercoinbase${POOL__USER_DEFINED_COINBASE_SIZE}")
else()
message("-- User Defined Coinbase: Disabled (-DPOOL__USER_DEFINED_COINBASE=OFF)")
endif()
###
# options for install & package
###
# install prefix
if(NOT POOL__INSTALL_PREFIX)
set(POOL__INSTALL_PREFIX ${POOL__DEFAULT_INSTALL_PREFIX})
endif()
message("-- Install Prefix: ${POOL__INSTALL_PREFIX} (-DPOOL__INSTALL_PREFIX=${POOL__INSTALL_PREFIX})")
set(CMAKE_INSTALL_PREFIX ${POOL__INSTALL_PREFIX})
# Debian/Ubuntu software package
if(POOL__GENERATE_DEB_PACKAGE)
message("-- Generate Debian/Ubuntu software package: Enabled (-DPOOL__GENERATE_DEB_PACKAGE=ON)")
else()
message("-- Generate Debian/Ubuntu software package: Disabled (-DPOOL__GENERATE_DEB_PACKAGE=OFF)")
endif()
###################################### Libs ######################################
message("") # empty line
message("------------------------------- Libs -------------------------------")
#
# chain's libs
#
set(BITCOIN_LIBRARIES
"${CHAIN_SRC_ROOT}/src/libbitcoin_common.a"
"${CHAIN_SRC_ROOT}/src/libbitcoin_consensus.a"
"${CHAIN_SRC_ROOT}/src/libbitcoin_util.a"
"${CHAIN_SRC_ROOT}/src/crypto/libbitcoin_crypto.a")
list(GET BITCOIN_LIBRARIES 0 BITCOIN_LIBRARIE)
if (NOT EXISTS ${BITCOIN_LIBRARIE})
message(STATUS "building ${CHAIN_NAME}...")
execute_process(WORKING_DIRECTORY "${CHAIN_SRC_ROOT}" COMMAND ./autogen.sh)
execute_process(WORKING_DIRECTORY "${CHAIN_SRC_ROOT}" COMMAND ./configure --with-gui=no --disable-wallet --disable-tests --disable-bench)
execute_process(WORKING_DIRECTORY "${CHAIN_SRC_ROOT}" COMMAND make ${MAKE_JOBS})
endif()
foreach(BITCOIN_LIBRARIE ${BITCOIN_LIBRARIES})
if (NOT EXISTS ${BITCOIN_LIBRARIE})
message(FATAL_ERROR "${BITCOIN_LIBRARIE} not exists!")
endif()
endforeach()
#
# libsecp256k1
#
set(secp256k1_DIR "${CHAIN_SRC_ROOT}/src/secp256k1")
set(secp256k1_LIBRARIES "${secp256k1_DIR}/.libs/libsecp256k1.a")
if (NOT EXISTS ${secp256k1_LIBRARIES})
message(STATUS "build secp256k1...")
execute_process(WORKING_DIRECTORY "${secp256k1_DIR}" COMMAND ./autogen.sh)
execute_process(WORKING_DIRECTORY "${secp256k1_DIR}" COMMAND ./configure --enable-module-recovery)
execute_process(WORKING_DIRECTORY "${secp256k1_DIR}" COMMAND make ${MAKE_JOBS})
endif()
if (NOT EXISTS ${secp256k1_LIBRARIES})
message(FATAL_ERROR "build secp256k1 failed!")
endif()
find_package(OpenSSL)
if(NOT OPENSSL_FOUND)
message(FATAL_ERROR "OpenSSL not found!")
endif()
find_package(LibConfig)
if(NOT LIBCONFIG_FOUND)
message(FATAL_ERROR "LibConfig not found!")
endif()
find_package(Glog)
if(NOT GLOG_FOUND)
message(FATAL_ERROR "Glog not found!")
endif()
find_package(libzmq)
if(NOT LIBZMQ_FOUND)
message(FATAL_ERROR "libzmq not found!")
endif()
find_package(CURL)
if(NOT CURL_FOUND)
message(FATAL_ERROR "libcurl not found!")
endif()
find_package(LibEvent)
if(NOT LibEvent_FOUND)
message(FATAL_ERROR "libevent2 not found!")
endif()
find_package(Boost 1.36.0 COMPONENTS thread filesystem system regex program_options)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost not found!")
endif()
find_package(ZookeeperC)
if(NOT ZOOKEEPER_FOUND)
message(FATAL_ERROR "libzookeeper-mt not found!")
endif()
find_package(LibGMP)
if(NOT GMP_FOUND)
message(FATAL_ERROR "libgmp not found!")
endif()
find_package(LibPthread)
if(NOT PTHREAD_FOUND)
message(FATAL_ERROR "libpthread not found!")
endif()
find_package(KafkaC)
if(NOT KAFKA_FOUND)
message(FATAL_ERROR "librdkafka not found!")
endif()
message("") # add an empty line
execute_process(COMMAND mysql_config --libs_r OUTPUT_VARIABLE MYSQL_LIB OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND mysql_config --include OUTPUT_VARIABLE MYSQL_INCLUDE OUTPUT_STRIP_TRAILING_WHITESPACE)
message("-- MySQL include: ${MYSQL_INCLUDE}")
message("-- MySQL library: ${MYSQL_LIB}")
if(NOT MYSQL_LIB)
message(FATAL_ERROR "MySQL library not found!")
endif()
if(NOT MYSQL_INCLUDE)
message(FATAL_ERROR "MySQL header not found!")
endif()
###################################### Building Tools ######################################
# Find binutils
message("-- CMAKE_OBJCOPY: ${CMAKE_OBJCOPY}")
if(NOT CMAKE_OBJCOPY)
message("-- CMAKE_OBJCOPY not found, debug info will not separated from targets")
mark_as_advanced(CMAKE_OBJCOPY)
endif()
# Get the current abbreviated commit hash of the working branch
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(GIT_COMMIT_HASH)
message("-- GIT commit hash: ${GIT_COMMIT_HASH}")
else()
set(GIT_COMMIT_HASH "0")
endif()
########################## Generate configuration files #############################
configure_file(${CMAKE_SOURCE_DIR}/src/config/bpool-version.h.in ${CMAKE_SOURCE_DIR}/src/config/bpool-version.h)
###################################### Targets ######################################
include_directories(src test ${CHAIN_SRC_ROOT}/src ${CHAIN_SRC_ROOT}/src/config ${CHAIN_SRC_ROOT}/src/secp256k1/include
${OPENSSL_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${LIBZMQ_INCLUDE_DIR} ${GLOG_INCLUDE_DIRS}
${LIBEVENT_INCLUDE_DIR} ${MYSQL_INCLUDE})
set(THIRD_LIBRARIES ${BITCOIN_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} ${Boost_LIBRARIES} ${LIBCONFIGPP_LIBRARY}
${LIBZMQ_LIBRARIES} ${GLOG_LIBRARIES} ${CURL_LIBRARIES} ${ZOOKEEPER_LIBRARIES} ${KAFKA_LIBRARIES} ${LIBEVENT_LIB}
${LIBEVENT_PTHREADS_LIB} ${secp256k1_LIBRARIES} ${PTHREAD_LIBRARIES} ${MYSQL_LIB} ${GMP_LIBRARIES})
file(GLOB LIB_SOURCES src/*.cc src/rsk/*.cc)
add_library(btcpool STATIC ${LIB_SOURCES})
file(GLOB_RECURSE TEST_SOURCES test/*.cc)
add_executable(unittest ${TEST_SOURCES})
target_link_libraries(unittest btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE GBTMAKER_SOURCES src/gbtmaker/*.cc)
add_executable(gbtmaker ${GBTMAKER_SOURCES})
target_link_libraries(gbtmaker btcpool ${THIRD_LIBRARIES})
set(GWMAKER_SOURCES src/gwmaker/GwMakerMain.cc)
add_executable(gwmaker ${GWMAKER_SOURCES})
target_link_libraries(gwmaker btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE NMC_AUXBLOCK_MAKER_SOURCES src/nmcauxmaker/*.cc)
add_executable(nmcauxmaker ${NMC_AUXBLOCK_MAKER_SOURCES})
target_link_libraries(nmcauxmaker btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE JOBMAKER_SOURCES src/jobmaker/*.cc)
add_executable(jobmaker ${JOBMAKER_SOURCES})
target_link_libraries(jobmaker btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE SSERVER_SOURCES src/sserver/*.cc)
add_executable(sserver ${SSERVER_SOURCES})
target_link_libraries(sserver btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE STATSHTTPD_SOURCES src/statshttpd/*.cc)
add_executable(statshttpd ${STATSHTTPD_SOURCES})
target_link_libraries(statshttpd btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE SHARELOGGER_SOURCES src/sharelogger/*.cc)
add_executable(sharelogger ${SHARELOGGER_SOURCES})
target_link_libraries(sharelogger btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE SLPARSER_SOURCES src/slparser/*.cc)
add_executable(slparser ${SLPARSER_SOURCES})
target_link_libraries(slparser btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE BLKMAKER_SOURCES src/blkmaker/*.cc)
add_executable(blkmaker ${BLKMAKER_SOURCES})
target_link_libraries(blkmaker btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE SIMULATOR_SOURCES src/simulator/*.cc)
add_executable(simulator ${SIMULATOR_SOURCES})
target_link_libraries(simulator btcpool ${THIRD_LIBRARIES})
file(GLOB_RECURSE POOLWATCHER_SOURCES src/poolwatcher/*.cc)
add_executable(poolwatcher ${POOLWATCHER_SOURCES})
target_link_libraries(poolwatcher btcpool ${THIRD_LIBRARIES})
###################################### Install & Package ######################################
message("") # empty line
message("------------------------------- Install & Package -------------------------------")
###
# `make install` support
###
# targets
set(INSTALL_TARGETS
blkmaker
gbtmaker
gwmaker
jobmaker
nmcauxmaker
poolwatcher
sharelogger
simulator
slparser
sserver
statshttpd)
# testcase
set(INSTALL_TEST_TARGETS
unittest)
# tmp dir for install & packet
set(PACKAGE_TMP_DIR ${CMAKE_BINARY_DIR}/package_tmp)
# init folders & copy configure files
install(CODE "execute_process(WORKING_DIRECTORY ${CMAKE_BINARY_DIR} COMMAND bash ${CMAKE_SOURCE_DIR}/install/init_package_folders.sh)"
COMPONENT main)
# separate debug info from targets
if(CMAKE_OBJCOPY)
foreach(tgt ${INSTALL_TARGETS} ${INSTALL_TEST_TARGETS})
add_custom_command(TARGET ${tgt} POST_BUILD
COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $<TARGET_FILE:${tgt}> $<TARGET_FILE:${tgt}>.dbg
COMMAND ${CMAKE_OBJCOPY} --strip-debug $<TARGET_FILE:${tgt}>
COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:${tgt}>.dbg $<TARGET_FILE:${tgt}>)
endforeach()
endif()
# install targets , dirs & files
foreach(tgt ${INSTALL_TARGETS})
# binary
install(PROGRAMS ${CMAKE_BINARY_DIR}/${tgt}
COMPONENT main
DESTINATION ${POOL__INSTALL_PREFIX}/build)
# running dir
install(DIRECTORY ${PACKAGE_TMP_DIR}/run_${tgt}
COMPONENT main
DESTINATION ${POOL__INSTALL_PREFIX}/build)
endforeach()
# test targets
foreach(tgt ${INSTALL_TEST_TARGETS})
# binary
install(PROGRAMS ${CMAKE_BINARY_DIR}/${tgt}
COMPONENT main
DESTINATION ${POOL__INSTALL_PREFIX}/build)
endforeach()
# documents
install(FILES
LICENSE
README.md
COMPONENT
main
DESTINATION
${POOL__INSTALL_PREFIX})
# document dirss
install(DIRECTORY
docs
install
docker
COMPONENT
main
DESTINATION
${POOL__INSTALL_PREFIX})
# install debug info
if(CMAKE_OBJCOPY)
foreach(tgt ${INSTALL_TARGETS} ${INSTALL_TEST_TARGETS})
install(FILES ${CMAKE_BINARY_DIR}/${tgt}.dbg
COMPONENT dbginfo
DESTINATION ${POOL__INSTALL_PREFIX}/build)
endforeach()
endif()
# generate deb package by CPack
if(POOL__GENERATE_DEB_PACKAGE)
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_NAME "btcpool${POOL__DEB_PACKNAME_POSTFIX}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "YihaoPeng [email protected]")
message("-- Package Name: ${CPACK_PACKAGE_NAME}")
# version
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(CPACK_PACKAGE_VERSION_PATCH "0-${GIT_COMMIT_HASH}")
# components
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEB_USE_DISPLAY_NAME_IN_FILENAME ON)
set(CPACK_DEBIAN_MAIN_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_DEBIAN_DBGINFO_PACKAGE_NAME ${CPACK_PACKAGE_NAME}-dbg)
# dependencies
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "librdkafka1 (>= 0.9.1-1)")
include(CPack)
endif()