2
2
# Distributed under the MIT software license, see the accompanying
3
3
# file COPYING or https://opensource.org/license/mit/.
4
4
5
- include (GNUInstallDirs)
6
5
include (AddWindowsResources)
7
6
8
7
configure_file (${PROJECT_SOURCE_DIR} /cmake/bitcoin-build -config.h.in bitcoin-build -config.h USE_SOURCE_PERMISSIONS @ONLY)
@@ -170,8 +169,8 @@ target_link_libraries(bitcoin_common
170
169
$<$<PLATFORM_ID:Windows>:ws2_32>
171
170
)
172
171
172
+ include (InstallBinaryComponent)
173
173
174
- set (installable_targets)
175
174
if (ENABLE_WALLET)
176
175
add_subdirectory (wallet)
177
176
@@ -189,7 +188,7 @@ if(ENABLE_WALLET)
189
188
bitcoin_util
190
189
Boost::headers
191
190
)
192
- list ( APPEND installable_targets bitcoin-wallet)
191
+ install_binary_component( bitcoin-wallet HAS_MANPAGE )
193
192
endif ()
194
193
endif ()
195
194
@@ -318,7 +317,7 @@ if(BUILD_DAEMON)
318
317
bitcoin_node
319
318
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
320
319
)
321
- list ( APPEND installable_targets bitcoind)
320
+ install_binary_component( bitcoind HAS_MANPAGE )
322
321
endif ()
323
322
if (WITH_MULTIPROCESS AND BUILD_DAEMON)
324
323
add_executable (bitcoin-node
@@ -331,8 +330,7 @@ if(WITH_MULTIPROCESS AND BUILD_DAEMON)
331
330
bitcoin_ipc
332
331
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
333
332
)
334
- list (APPEND installable_targets bitcoin-node)
335
- endif ()
333
+ install_binary_component(bitcoin-node HAS_MANPAGE)
336
334
337
335
if (WITH_MULTIPROCESS AND BUILD_TESTS)
338
336
# bitcoin_ipc_test library target is defined here in src/CMakeLists.txt
@@ -374,7 +372,7 @@ if(BUILD_CLI)
374
372
libevent::core
375
373
libevent::extra
376
374
)
377
- list ( APPEND installable_targets bitcoin-cli)
375
+ install_binary_component( bitcoin-cli HAS_MANPAGE )
378
376
endif ()
379
377
380
378
@@ -387,7 +385,7 @@ if(BUILD_TX)
387
385
bitcoin_util
388
386
univalue
389
387
)
390
- list ( APPEND installable_targets bitcoin-tx)
388
+ install_binary_component( bitcoin-tx HAS_MANPAGE )
391
389
endif ()
392
390
393
391
@@ -399,7 +397,7 @@ if(BUILD_UTIL)
399
397
bitcoin_common
400
398
bitcoin_util
401
399
)
402
- list ( APPEND installable_targets bitcoin-util)
400
+ install_binary_component( bitcoin-util HAS_MANPAGE )
403
401
endif ()
404
402
405
403
@@ -445,17 +443,3 @@ endif()
445
443
if (BUILD_FUZZ_BINARY)
446
444
add_subdirectory (test /fuzz)
447
445
endif ()
448
-
449
-
450
- install (TARGETS ${installable_targets}
451
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
452
- )
453
- unset (installable_targets)
454
-
455
- if (INSTALL_MAN)
456
- # TODO: these stubs are no longer needed. man pages should be generated at install time.
457
- install (DIRECTORY ../doc /man/
458
- DESTINATION ${CMAKE_INSTALL_MANDIR} /man1
459
- FILES_MATCHING PATTERN *.1
460
- )
461
- endif ()
0 commit comments