aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-12-17 14:56:51 -0500
committerLibravatar GitHub <noreply@github.com>2016-12-17 14:56:51 -0500
commit14d9200e4e51c7c4597df65cbf0fb5347ef80caa (patch)
tree4dac5642f1a62276b17811f4fe0708c8bf236c58
parentAdd libcap dependency to readme (diff)
parentUse CMAKE_INSTALL_FULL_DATA{,ROOT}DIR (diff)
downloadsway-14d9200e4e51c7c4597df65cbf0fb5347ef80caa.tar.gz
sway-14d9200e4e51c7c4597df65cbf0fb5347ef80caa.tar.zst
sway-14d9200e4e51c7c4597df65cbf0fb5347ef80caa.zip
Merge pull request #996 from woutershep/datadir
Use CMAKE_INSTALL_FULL_DATA{,ROOT}DIR
-rw-r--r--CMake/Manpage.cmake2
-rw-r--r--CMakeLists.txt4
-rw-r--r--completions/zsh/CMakeLists.txt2
-rw-r--r--config.in4
-rw-r--r--sway/CMakeLists.txt2
5 files changed, 7 insertions, 7 deletions
diff --git a/CMake/Manpage.cmake b/CMake/Manpage.cmake
index e5503760..d9780bc4 100644
--- a/CMake/Manpage.cmake
+++ b/CMake/Manpage.cmake
@@ -25,7 +25,7 @@ function(add_manpage name section)
25 25
26 install( 26 install(
27 FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} 27 FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
28 DESTINATION share/man/man${section} 28 DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section}
29 COMPONENT documentation 29 COMPONENT documentation
30 ) 30 )
31endfunction() 31endfunction()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f55fadae..d1c38ce3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,14 +129,14 @@ if(zsh-completions)
129endif() 129endif()
130install( 130install(
131 FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop 131 FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop
132 DESTINATION share/wayland-sessions 132 DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/wayland-sessions
133 COMPONENT data 133 COMPONENT data
134 ) 134 )
135 135
136if(default-wallpaper) 136if(default-wallpaper)
137 install( 137 install(
138 DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/ 138 DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/
139 DESTINATION share/sway 139 DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/sway
140 COMPONENT data 140 COMPONENT data
141 FILES_MATCHING PATTERN "*Wallpaper*" 141 FILES_MATCHING PATTERN "*Wallpaper*"
142 ) 142 )
diff --git a/completions/zsh/CMakeLists.txt b/completions/zsh/CMakeLists.txt
index ac307d7d..62c85090 100644
--- a/completions/zsh/CMakeLists.txt
+++ b/completions/zsh/CMakeLists.txt
@@ -1,4 +1,4 @@
1install( 1install(
2 FILES _sway _swaymsg _swaygrab _swaylock 2 FILES _sway _swaymsg _swaygrab _swaylock
3 DESTINATION share/zsh/site-functions/ 3 DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/zsh/site-functions/
4) 4)
diff --git a/config.in b/config.in
index 3cb0525e..a262fc82 100644
--- a/config.in
+++ b/config.in
@@ -20,8 +20,8 @@ set $menu dmenu_run
20 20
21### Output configuration 21### Output configuration
22# 22#
23# Default wallpaper (more resolutions are available in /usr/share/sway/) 23# Default wallpaper (more resolutions are available in __DATADIR__/sway/)
24output * bg /usr/share/sway/Sway_Wallpaper_Blue_1920x1080.png fill 24output * bg __DATADIR__/sway/Sway_Wallpaper_Blue_1920x1080.png fill
25# 25#
26# Example configuration: 26# Example configuration:
27# 27#
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt
index 4532a6c3..448335cc 100644
--- a/sway/CMakeLists.txt
+++ b/sway/CMakeLists.txt
@@ -74,7 +74,7 @@ function(add_config name source destination)
74 add_custom_command( 74 add_custom_command(
75 OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} 75 OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
76 COMMAND sed -r 76 COMMAND sed -r
77 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g' 77 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g\; s?__DATADIR__?${CMAKE_INSTALL_FULL_DATADIR}?g'
78 ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} 78 ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
79 DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in 79 DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in
80 COMMENT "Generating config file ${source}" 80 COMMENT "Generating config file ${source}"