Use CMAKE_INSTALL_FULL_DATA{,ROOT}DIR

Exherbo installs architecture dependent data in a different place than architecture
independent data. More concretely: binaries go in /usr/$chost/{bin,lib},
data goes in /usr/share and configs in /etc, /etc is already configurable
through CMAKE_INSTALL_FULL_SYSCONFDIR but the datadir was not. This
patch fixes it so that things can be pushed in the right places.
master
Wouter van Kesteren 8 years ago
parent 6c0fc20936
commit 09b9106550

@ -25,7 +25,7 @@ function(add_manpage name section)
install( install(
FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section} FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}.${section}
DESTINATION share/man/man${section} DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/man/man${section}
COMPONENT documentation COMPONENT documentation
) )
endfunction() endfunction()

@ -129,14 +129,14 @@ if(zsh-completions)
endif() endif()
install( install(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop FILES ${CMAKE_CURRENT_SOURCE_DIR}/sway.desktop
DESTINATION share/wayland-sessions DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/wayland-sessions
COMPONENT data COMPONENT data
) )
if(default-wallpaper) if(default-wallpaper)
install( install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/
DESTINATION share/sway DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/sway
COMPONENT data COMPONENT data
FILES_MATCHING PATTERN "*Wallpaper*" FILES_MATCHING PATTERN "*Wallpaper*"
) )

@ -1,4 +1,4 @@
install( install(
FILES _sway _swaymsg _swaygrab _swaylock FILES _sway _swaymsg _swaygrab _swaylock
DESTINATION share/zsh/site-functions/ DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/zsh/site-functions/
) )

@ -20,8 +20,8 @@ set $menu dmenu_run
### Output configuration ### Output configuration
# #
# Default wallpaper (more resolutions are available in /usr/share/sway/) # Default wallpaper (more resolutions are available in __DATADIR__/sway/)
output * bg /usr/share/sway/Sway_Wallpaper_Blue_1920x1080.png fill output * bg __DATADIR__/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# #
# Example configuration: # Example configuration:
# #

@ -74,7 +74,7 @@ function(add_config name source destination)
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
COMMAND sed -r COMMAND sed -r
's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g' 's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g\; s?__DATADIR__?${CMAKE_INSTALL_FULL_DATADIR}?g'
${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name} ${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in
COMMENT "Generating config file ${source}" COMMENT "Generating config file ${source}"

Loading…
Cancel
Save