mirror of
https://github.com/swaywm/sway.git
synced 2025-12-15 08:56:30 -05:00
Can customize config fallback directory
CMake takes a `FALLBACK_CONFIG_DIR` flag which is the directory where the standard configuration file `config` is copied at installation. If loading from typical configuration directories fails, sway loads FALLBACK_CONFIG_DIR/config (/etc/sway/config by default).
This commit is contained in:
parent
44d0f731c3
commit
09feef89ee
4 changed files with 16 additions and 9 deletions
|
|
@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.1.0)
|
|||
|
||||
project(sway C)
|
||||
|
||||
set(FALLBACK_CONFIG_DIR "/etc/sway/")
|
||||
add_definitions('-DFALLBACK_CONFIG_DIR=\"${FALLBACK_CONFIG_DIR}\"')
|
||||
|
||||
set(CMAKE_C_FLAGS "-g")
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
SET(CMAKE_C_EXTENSIONS OFF)
|
||||
|
|
@ -80,7 +83,7 @@ install(
|
|||
COMPONENT runtime)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_SOURCE_DIR}/config"
|
||||
DESTINATION /etc/sway/
|
||||
DESTINATION "${FALLBACK_CONFIG_DIR}"
|
||||
COMPONENT configuration)
|
||||
|
||||
add_custom_target(man ALL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue