22# Distributed under the MIT software license, see the accompanying
33# file COPYING or https://opensource.org/license/mit/.
44
5- include (GNUInstallDirs)
65include (AddWindowsResources)
76
87configure_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
170169 $<$<PLATFORM_ID:Windows>:ws2_32>
171170)
172171
172+ include (InstallBinaryComponent)
173173
174- set (installable_targets)
175174if (ENABLE_WALLET)
176175 add_subdirectory (wallet)
177176
@@ -189,7 +188,7 @@ if(ENABLE_WALLET)
189188 bitcoin_util
190189 Boost::headers
191190 )
192- list ( APPEND installable_targets bitcoin-wallet)
191+ install_binary_component( bitcoin-wallet HAS_MANPAGE )
193192 endif ()
194193endif ()
195194
@@ -318,7 +317,7 @@ if(BUILD_DAEMON)
318317 bitcoin_node
319318 $<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
320319 )
321- list ( APPEND installable_targets bitcoind)
320+ install_binary_component( bitcoind HAS_MANPAGE )
322321endif ()
323322if (WITH_MULTIPROCESS AND BUILD_DAEMON)
324323 add_executable (bitcoin-node
@@ -331,7 +330,7 @@ if(WITH_MULTIPROCESS AND BUILD_DAEMON)
331330 bitcoin_ipc
332331 $<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
333332 )
334- list ( APPEND installable_targets bitcoin-node)
333+ install_binary_component( bitcoin-node)
335334endif ()
336335
337336if (WITH_MULTIPROCESS AND BUILD_TESTS)
@@ -374,7 +373,7 @@ if(BUILD_CLI)
374373 libevent::core
375374 libevent::extra
376375 )
377- list ( APPEND installable_targets bitcoin-cli)
376+ install_binary_component( bitcoin-cli HAS_MANPAGE )
378377endif ()
379378
380379
@@ -387,7 +386,7 @@ if(BUILD_TX)
387386 bitcoin_util
388387 univalue
389388 )
390- list ( APPEND installable_targets bitcoin-tx)
389+ install_binary_component( bitcoin-tx HAS_MANPAGE )
391390endif ()
392391
393392
@@ -399,7 +398,7 @@ if(BUILD_UTIL)
399398 bitcoin_common
400399 bitcoin_util
401400 )
402- list ( APPEND installable_targets bitcoin-util)
401+ install_binary_component( bitcoin-util HAS_MANPAGE )
403402endif ()
404403
405404
@@ -445,17 +444,3 @@ endif()
445444if (BUILD_FUZZ_BINARY)
446445 add_subdirectory (test /fuzz)
447446endif ()
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