Skip to content

Commit 0264c5d

Browse files
committed
cmake: use per-target components for bitcoin-qt and bitcoin-gui
This makes the usage consistent with the next commit, which will add a per-target component for each binary.
1 parent fb0546b commit 0264c5d

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

cmake/module/Maintenance.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function(add_macos_deploy_target)
103103

104104
add_custom_command(
105105
OUTPUT ${PROJECT_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
106-
COMMAND ${CMAKE_COMMAND} --install ${PROJECT_BINARY_DIR} --config $<CONFIG> --component GUI --prefix ${macos_app}/Contents/MacOS --strip
106+
COMMAND ${CMAKE_COMMAND} --install ${PROJECT_BINARY_DIR} --config $<CONFIG> --component bitcoin-qt --prefix ${macos_app}/Contents/MacOS --strip
107107
COMMAND ${CMAKE_COMMAND} -E rename ${macos_app}/Contents/MacOS/bin/$<TARGET_FILE_NAME:bitcoin-qt> ${macos_app}/Contents/MacOS/Bitcoin-Qt
108108
COMMAND ${CMAKE_COMMAND} -E rm -rf ${macos_app}/Contents/MacOS/bin
109109
VERBATIM

src/qt/CMakeLists.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ target_link_libraries(bitcoin-qt
236236
)
237237

238238
import_plugins(bitcoin-qt)
239-
set(installable_targets bitcoin-qt)
239+
install(TARGETS bitcoin-qt
240+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
241+
COMPONENT bitcoin-qt
242+
)
240243
if(WIN32)
241244
set_target_properties(bitcoin-qt PROPERTIES WIN32_EXECUTABLE TRUE)
242245
endif()
@@ -253,17 +256,15 @@ if(WITH_MULTIPROCESS)
253256
bitcoin_ipc
254257
)
255258
import_plugins(bitcoin-gui)
256-
list(APPEND installable_targets bitcoin-gui)
259+
install(TARGETS bitcoin-gui
260+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
261+
COMPONENT bitcoin-gui
262+
)
257263
if(WIN32)
258264
set_target_properties(bitcoin-gui PROPERTIES WIN32_EXECUTABLE TRUE)
259265
endif()
260266
endif()
261267

262-
install(TARGETS ${installable_targets}
263-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
264-
COMPONENT GUI
265-
)
266-
267268
if(BUILD_GUI_TESTS)
268269
add_subdirectory(test)
269270
endif()

0 commit comments

Comments
 (0)