From 98678dea5d395e08de5bf28d3c9b4f48ea6f6589 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Nov 2015 21:37:35 -0500 Subject: [PATCH] cmake: clean up installation rules --- CMakeLists.txt | 32 ++++++++++++++++---------------- swaybg/CMakeLists.txt | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 236a3667..3f33a3f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,15 +60,14 @@ target_link_libraries(sway ${JSONC_LIBRARIES} ) -INSTALL( - TARGETS sway - RUNTIME DESTINATION bin -) - -INSTALL( - FILES ${PROJECT_SOURCE_DIR}/config - DESTINATION /etc/sway/ -) +install( + TARGETS sway + RUNTIME DESTINATION bin + COMPONENT runtime) +install( + FILES "${CMAKE_CURRENT_SOURCE_DIR}/config" + DESTINATION /etc/sway/ + COMPONENT configuration) add_custom_target(man ALL) @@ -99,10 +98,11 @@ endfunction () add_manpage(sway 1) add_manpage(sway 5) -INSTALL( - FILES ${PROJECT_SOURCE_DIR}/sway.desktop - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/wayland-sessions/) - -INSTALL( - FILES ${PROJECT_SOURCE_DIR}/sway-xorg.desktop - DESTINATION ${CMAKE_INSTALL_PREFIX}/share/xsessions/) +install( + FILES "${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop" + DESTINATION share/wayland-sessions + COMPONENT data) +install( + FILES "${CMAKE_CURRENT_SOURCE_DIR}/sway-xorg.desktop" + DESTINATION share/xsessions + COMPONENT data) diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt index 20aff980..e86cf656 100644 --- a/swaybg/CMakeLists.txt +++ b/swaybg/CMakeLists.txt @@ -26,7 +26,7 @@ add_executable(swaybg TARGET_LINK_LIBRARIES(swaybg ${WAYLAND_CLIENT_LIBRARIES} ${CAIRO_LIBRARIES} ${PANGO_LIBRARIES}) -INSTALL( - TARGETS swaybg - RUNTIME DESTINATION bin -) +install( + TARGETS swaybg + RUNTIME DESTINATION bin + COMPONENT runtime)