Activate the target graphical session instead of rebooting, so a KDE or GNOME session stays alive while another one is used. Switching relies on logind VT activation, which needs no root privileges and never restarts the display manager.
28 lines
722 B
CMake
28 lines
722 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
project(FWS-DeskManager VERSION 0.1.0 LANGUAGES CXX)
|
|
|
|
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
message(FATAL_ERROR "FWS-DeskManager targets Linux with systemd-logind.")
|
|
endif()
|
|
|
|
add_executable(fws-deskmanager
|
|
src/main.cpp
|
|
src/process.cpp
|
|
src/session-catalog.cpp
|
|
src/session-switcher.cpp
|
|
src/user-interface.cpp
|
|
)
|
|
|
|
set_target_properties(fws-deskmanager PROPERTIES
|
|
OUTPUT_NAME "fws-deskmanager"
|
|
CXX_STANDARD 17
|
|
CXX_STANDARD_REQUIRED ON
|
|
CXX_EXTENSIONS OFF
|
|
)
|
|
|
|
target_include_directories(fws-deskmanager PRIVATE src)
|
|
target_compile_options(fws-deskmanager PRIVATE -Wall -Wextra -Wpedantic)
|
|
|
|
install(TARGETS fws-deskmanager RUNTIME DESTINATION bin)
|