Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ CMakeLists.txt.user

#ccls
.ccls-cache

# emacs
*~
#*#
100 changes: 24 additions & 76 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ include(FeatureSummary)
# Options
option(BUILD_MAN_PAGES "Build man pages" OFF)
option(ENABLE_JOURNALD "Enable logging to journald" ON)
option(NO_SYSTEMD "Disable systemd support" OFF)
option(USE_ELOGIND "Use elogind instead of logind" OFF)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -67,15 +65,12 @@ find_package(PkgConfig)
# PAM
find_package(PAM REQUIRED)

# Systemd
pkg_check_modules(Systemd REQUIRED systemd)

# XAU
pkg_check_modules(LIBXAU REQUIRED "xau")

# XCB
find_package(XCB REQUIRED)

# XKB
find_package(XKB REQUIRED)

# TreelandProtocols
find_package(TreelandProtocols 0.5.0 REQUIRED)

Expand All @@ -90,83 +85,39 @@ if ("${ECM_VERSION}" VERSION_LESS "1.7.0")
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
endif()

# systemd
if(NOT NO_SYSTEMD AND NOT USE_ELOGIND)
pkg_check_modules(SYSTEMD "systemd")
endif()
add_definitions(-DHAVE_SYSTEMD)
set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_SYSTEMD)

if(SYSTEMD_FOUND)
add_definitions(-DHAVE_SYSTEMD)
set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_SYSTEMD)
# libsystemd-journal was merged into libsystemd in 209
pkg_check_modules(JOURNALD "libsystemd")

# libsystemd-journal was merged into libsystemd in 209
if(${SYSTEMD_VERSION} VERSION_LESS 209)
pkg_check_modules(JOURNALD "libsystemd-journal")
if(ENABLE_JOURNALD)
if(JOURNALD_FOUND)
add_definitions(-DHAVE_JOURNALD)
set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_JOURNALD)
else()
pkg_check_modules(JOURNALD "libsystemd")
endif()

if(ENABLE_JOURNALD)
if(JOURNALD_FOUND)
add_definitions(-DHAVE_JOURNALD)
set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_JOURNALD)
else()
message(WARNING "Disable journald support for lack of libsystemd-journal")
endif()
endif()

if (NOT DEFINED SYSTEMD_SYSTEM_UNIT_DIR)
pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)
endif()

if (NOT DEFINED SYSTEMD_SYSUSERS_DIR)
pkg_get_variable(SYSTEMD_SYSUSERS_DIR systemd sysusersdir)
message(WARNING "Disable journald support for lack of libsystemd-journal")
endif()
endif()

if (NOT DEFINED SYSTEMD_TMPFILES_DIR)
pkg_get_variable(SYSTEMD_TMPFILES_DIR systemd tmpfilesdir)
endif()
if (NOT DEFINED SYSTEMD_SYSTEM_UNIT_DIR)
pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)
endif()

set(HALT_COMMAND "/usr/bin/systemctl poweroff")
set(REBOOT_COMMAND "/usr/bin/systemctl reboot")
else()
set(SYSTEMD_FOUND 0)
if (NOT DEFINED SYSTEMD_SYSUSERS_DIR)
pkg_get_variable(SYSTEMD_SYSUSERS_DIR systemd sysusersdir)
endif()
add_feature_info("systemd" SYSTEMD_FOUND "systemd support")
add_feature_info("journald" JOURNALD_FOUND "journald support")

# elogind
if(NO_SYSTEMD AND USE_ELOGIND)
pkg_check_modules(ELOGIND "libelogind")
if (NOT DEFINED SYSTEMD_TMPFILES_DIR)
pkg_get_variable(SYSTEMD_TMPFILES_DIR systemd tmpfilesdir)
endif()

if(ELOGIND_FOUND)
add_definitions(-DHAVE_ELOGIND)
set(CMAKE_AUTOMOC_MOC_OPTIONS -DHAVE_ELOGIND)
set(HALT_COMMAND "/usr/bin/systemctl poweroff")
set(REBOOT_COMMAND "/usr/bin/systemctl reboot")

set(HALT_COMMAND "/usr/bin/loginctl poweroff")
set(REBOOT_COMMAND "/usr/bin/loginctl reboot")
endif()
add_feature_info("elogind" ELOGIND_FOUND "elogind support")

# Default behaviour if neither systemd nor elogind is used
if (NOT ELOGIND_FOUND AND NOT SYSTEMD_FOUND)
# Set the VT on which ddm will normally appear, and the
# commands for shutdown and reboot. On FreeBSD, there are
# normally more getty's running than on Linux.
if("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
set(HALT_COMMAND "/sbin/shutdown -p now")
else()
set(HALT_COMMAND "/sbin/shutdown -h -P now")
endif()
set(REBOOT_COMMAND "/sbin/shutdown -r now")
endif()
add_feature_info("journald" JOURNALD_FOUND "journald support")

if (SYSTEMD_FOUND)
set(RUNTIME_DIR_DEFAULT "/run/ddm")
else()
set(RUNTIME_DIR_DEFAULT "${CMAKE_INSTALL_LOCALSTATEDIR}/run/ddm")
endif()
set(RUNTIME_DIR_DEFAULT "/run/ddm")

# Set constants
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/ddm" CACHE PATH "System application data install directory")
Expand Down Expand Up @@ -224,9 +175,6 @@ add_subdirectory(data)
add_subdirectory(services)
add_subdirectory(src)

# enable_testing()
# add_subdirectory(test)

# Display feature summary
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)

Expand Down
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "GPL-2.0-or-later"

[[annotations]]
path = ["releng/prepare-relnotes", "src/daemon/Auth.cpp", "src/daemon/Auth.h", "src/common/ConfigReader.cpp", "src/common/ConfigReader.h", "src/common/Configuration.cpp", "src/common/Configuration.h", "src/common/MessageHandler.h", "src/common/Messages.h", "src/common/SafeDataStream.cpp", "src/common/SafeDataStream.h", "src/common/Session.cpp", "src/common/Session.h", "src/common/SignalHandler.cpp", "src/common/SignalHandler.h", "src/common/SocketWriter.cpp", "src/common/SocketWriter.h", "src/common/ThemeConfig.cpp", "src/common/ThemeConfig.h", "src/common/ThemeMetadata.cpp", "src/common/ThemeMetadata.h", "src/common/VirtualTerminal.cpp", "src/common/VirtualTerminal.h", "src/common/XAuth.cpp", "src/common/XAuth.h", "src/daemon/DaemonApp.cpp", "src/daemon/DaemonApp.h", "src/daemon/Display.cpp", "src/daemon/Display.h", "src/daemon/DisplayManager.cpp", "src/daemon/DisplayManager.h", "src/daemon/PowerManager.cpp", "src/daemon/PowerManager.h", "src/daemon/Seat.cpp", "src/daemon/Seat.h", "src/daemon/SeatManager.cpp", "src/daemon/SeatManager.h", "src/daemon/SocketServer.cpp", "src/daemon/SocketServer.h", "src/daemon/TreelandConnector.cpp", "src/daemon/TreelandConnector.h", "src/daemon/Utils.h", "src/daemon/XorgDisplayServer.cpp", "src/daemon/XorgDisplayServer.h", "src/greeter/GreeterApp.h", "src/greeter/GreeterProxy.cpp", "src/greeter/GreeterProxy.h", "src/greeter/SessionModel.cpp", "src/greeter/SessionModel.h", "src/greeter/UserModel.cpp", "src/greeter/UserModel.h", "src/daemon/Pam.cpp", "src/daemon/Pam.h", "src/daemon/UserSession.cpp", "src/daemon/UserSession.h", "src/common/LogindDBusTypes.cpp", "src/common/LogindDBusTypes.h", "src/greeter/GreeterApp.cpp"]
path = ["releng/prepare-relnotes", "src/daemon/Auth.cpp", "src/daemon/Auth.h", "src/common/ConfigReader.cpp", "src/common/ConfigReader.h", "src/common/Configuration.cpp", "src/common/Configuration.h", "src/common/MessageHandler.h", "src/common/Messages.h", "src/common/Session.cpp", "src/common/Session.h", "src/common/SignalHandler.cpp", "src/common/SignalHandler.h", "src/common/SocketWriter.cpp", "src/common/SocketWriter.h", "src/common/VirtualTerminal.cpp", "src/common/VirtualTerminal.h", "src/common/XAuth.cpp", "src/common/XAuth.h", "src/daemon/DaemonApp.cpp", "src/daemon/DaemonApp.h", "src/daemon/Display.cpp", "src/daemon/Display.h", "src/daemon/DisplayManager.cpp", "src/daemon/DisplayManager.h", "src/daemon/PowerManager.cpp", "src/daemon/PowerManager.h", "src/daemon/SeatManager.cpp", "src/daemon/SeatManager.h", "src/daemon/SocketServer.cpp", "src/daemon/SocketServer.h", "src/daemon/TreelandConnector.cpp", "src/daemon/TreelandConnector.h", "src/daemon/Utils.h", "src/daemon/XorgDisplayServer.cpp", "src/daemon/XorgDisplayServer.h", "src/greeter/GreeterApp.h", "src/greeter/GreeterProxy.cpp", "src/greeter/GreeterProxy.h", "src/greeter/SessionModel.cpp", "src/greeter/SessionModel.h", "src/greeter/UserModel.cpp", "src/greeter/UserModel.h", "src/daemon/Pam.cpp", "src/daemon/Pam.h", "src/daemon/UserSession.cpp", "src/daemon/UserSession.h", "src/common/LogindDBusTypes.cpp", "src/common/LogindDBusTypes.h", "src/greeter/GreeterApp.cpp"]
precedence = "aggregate"
SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "GPL-2.0-or-later"
54 changes: 0 additions & 54 deletions cmake/FindXCB.cmake

This file was deleted.

135 changes: 0 additions & 135 deletions cmake/FindXKB.cmake

This file was deleted.

16 changes: 0 additions & 16 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
install(DIRECTORY "flags" DESTINATION "${DATA_INSTALL_DIR}")

install(FILES
"org.freedesktop.DisplayManager.conf"
DESTINATION "${DBUS_CONFIG_DIR}"
Expand All @@ -11,18 +9,6 @@ install(FILES
DESTINATION "${DBUS_CONFIG_DIR}"
)

install(FILES
"faces/root.face.icon.png"
DESTINATION "${DATA_INSTALL_DIR}/faces"
RENAME "root.face.icon"
)

install(FILES
"faces/default.face.icon.png"
DESTINATION "${DATA_INSTALL_DIR}/faces"
RENAME ".face.icon"
)

install(FILES
"scripts/Xsession"
"scripts/Xsetup"
Expand All @@ -35,8 +21,6 @@ install(FILES
WORLD_READ WORLD_EXECUTE
)

add_subdirectory(systemd)

if(BUILD_MAN_PAGES)
add_subdirectory(man)
endif()
2 changes: 0 additions & 2 deletions data/faces/README

This file was deleted.

Binary file removed data/faces/default.face.icon.png
Binary file not shown.
Binary file removed data/faces/root.face.icon.png
Binary file not shown.
Binary file removed data/flags/ae.png
Binary file not shown.
Binary file removed data/flags/am.png
Binary file not shown.
Binary file removed data/flags/ar.png
Binary file not shown.
Binary file removed data/flags/at.png
Binary file not shown.
Binary file removed data/flags/az.png
Binary file not shown.
Binary file removed data/flags/bd.png
Binary file not shown.
Binary file removed data/flags/be.png
Binary file not shown.
Binary file removed data/flags/bg.png
Binary file not shown.
Binary file removed data/flags/bh.png
Binary file not shown.
Binary file removed data/flags/br.png
Binary file not shown.
Binary file removed data/flags/by.png
Binary file not shown.
Binary file removed data/flags/ca.png
Binary file not shown.
Binary file removed data/flags/ch.png
Binary file not shown.
Binary file removed data/flags/cu.png
Binary file not shown.
Binary file removed data/flags/cz.png
Binary file not shown.
Binary file removed data/flags/de.png
Binary file not shown.
Binary file removed data/flags/dj.png
Binary file not shown.
Binary file removed data/flags/dk.png
Binary file not shown.
Binary file removed data/flags/dz.png
Binary file not shown.
Binary file removed data/flags/ee.png
Binary file not shown.
Binary file removed data/flags/eg.png
Binary file not shown.
Binary file removed data/flags/es.png
Binary file not shown.
Binary file removed data/flags/eu.png
Binary file not shown.
Binary file removed data/flags/fi.png
Diff not rendered.
Binary file removed data/flags/fr.png
Diff not rendered.
Binary file removed data/flags/gb.png
Diff not rendered.
Binary file removed data/flags/ge.png
Diff not rendered.
Binary file removed data/flags/gr.png
Diff not rendered.
Binary file removed data/flags/hr.png
Diff not rendered.
Binary file removed data/flags/hu.png
Diff not rendered.
Binary file removed data/flags/il.png
Diff not rendered.
Binary file removed data/flags/in.png
Diff not rendered.
Binary file removed data/flags/iq.png
Diff not rendered.
Binary file removed data/flags/is.png
Diff not rendered.
Binary file removed data/flags/it.png
Diff not rendered.
Binary file removed data/flags/jo.png
Diff not rendered.
Binary file removed data/flags/jp.png
Diff not rendered.
Binary file removed data/flags/km.png
Diff not rendered.
Binary file removed data/flags/kr.png
Diff not rendered.
Binary file removed data/flags/kw.png
Diff not rendered.
Binary file removed data/flags/la.png
Diff not rendered.
Binary file removed data/flags/lb.png
Diff not rendered.
Binary file removed data/flags/lt.png
Diff not rendered.
Binary file removed data/flags/lv.png
Diff not rendered.
Binary file removed data/flags/ly.png
Diff not rendered.
Binary file removed data/flags/ma.png
Diff not rendered.
Binary file removed data/flags/mk.png
Diff not rendered.
Binary file removed data/flags/mn.png
Diff not rendered.
Binary file removed data/flags/mx.png
Diff not rendered.
Binary file removed data/flags/nl.png
Diff not rendered.
Binary file removed data/flags/no.png
Diff not rendered.
Binary file removed data/flags/om.png
Diff not rendered.
Binary file removed data/flags/pl.png
Diff not rendered.
Binary file removed data/flags/ps.png
Diff not rendered.
Binary file removed data/flags/pt.png
Diff not rendered.
Binary file removed data/flags/qa.png
Diff not rendered.
Binary file removed data/flags/qc.png
Diff not rendered.
Binary file removed data/flags/ro.png
Diff not rendered.
Binary file removed data/flags/ru.png
Diff not rendered.
Binary file removed data/flags/sa.png
Diff not rendered.
Binary file removed data/flags/sd.png
Diff not rendered.
Binary file removed data/flags/se.png
Diff not rendered.
Binary file removed data/flags/si.png
Diff not rendered.
Binary file removed data/flags/sk.png
Diff not rendered.
Binary file removed data/flags/so.png
Diff not rendered.
Binary file removed data/flags/sr.png
Diff not rendered.
Binary file removed data/flags/sy.png
Diff not rendered.
Binary file removed data/flags/th.png
Diff not rendered.
Binary file removed data/flags/tn.png
Diff not rendered.
Binary file removed data/flags/tr.png
Diff not rendered.
Binary file removed data/flags/ua.png
Diff not rendered.
Binary file removed data/flags/uk.png
Diff not rendered.
Binary file removed data/flags/un.png
Diff not rendered.
Binary file removed data/flags/us.png
Diff not rendered.
Binary file removed data/flags/uy.png
Diff not rendered.
Binary file removed data/flags/vn.png
Diff not rendered.
Binary file removed data/flags/ye.png
Diff not rendered.
Binary file removed data/flags/yu.png
Diff not rendered.
Binary file removed data/flags/zz.png
Diff not rendered.
1 change: 0 additions & 1 deletion data/man/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function(BUILD_MAN_PAGE _sources _src _dst)
endfunction()

build_man_page(MAN1_OUTPUT "ddm.rst" "ddm.1")
build_man_page(MAN1_OUTPUT "ddm-greeter.rst" "ddm-greeter.1")
build_man_page(MAN5_OUTPUT "ddm.conf.rst" "ddm.conf.5")
build_man_page(MAN5_OUTPUT "ddm-state.conf.rst" "ddm-state.conf.5")

Expand Down
Loading