mirror of
https://github.com/sddm/sddm.git
synced 2024-11-23 01:54:21 +08:00
Introduce utmps support (#1962)
utmps library can be used to provide utmp functionality on systems whose libcs do not implement it, e.g. musl. For more details, see https://skarnet.org/software/utmps/. Signed-off-by: Peter Shkenev <petershh@disroot.org>
This commit is contained in:
parent
5c7af4e5c0
commit
b704e2ee35
@ -168,6 +168,9 @@ else()
|
||||
set(RUNTIME_DIR_DEFAULT "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/sddm")
|
||||
endif()
|
||||
|
||||
# utmps
|
||||
find_package(utmps)
|
||||
add_feature_info("utmps" UTMPS_FOUND "utmps support")
|
||||
|
||||
# Set constants
|
||||
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/sddm" CACHE PATH "System application data install directory")
|
||||
|
12
cmake/Findutmps.cmake
Normal file
12
cmake/Findutmps.cmake
Normal file
@ -0,0 +1,12 @@
|
||||
# - Try to find utmps and its dependencies
|
||||
# Once done this will define
|
||||
# UTMPS_FOUND - system has utmps and dependencies
|
||||
# UTMPS_INCLUDE_DIR - the utmps include dir
|
||||
# UTMPS_LIBRARIES - libutmps
|
||||
|
||||
find_path(UTMPS_INCLUDE_DIR NAMES utmps/utmpx.h)
|
||||
find_library(UTMPS_LIBRARIES utmps)
|
||||
|
||||
if (UTMPS_INCLUDE_DIR AND UTMPS_LIBRARIES)
|
||||
set(UTMPS_FOUND TRUE)
|
||||
endif (UTMPS_INCLUDE_DIR AND UTMPS_LIBRARIES)
|
@ -53,6 +53,11 @@ else()
|
||||
target_link_libraries(sddm-helper crypt)
|
||||
endif()
|
||||
|
||||
if (UTMPS_FOUND)
|
||||
target_include_directories(sddm-helper SYSTEM PRIVATE ${UTMPS_INCLUDE_DIR})
|
||||
target_link_libraries(sddm-helper ${UTMPS_LIBRARIES})
|
||||
endif (UTMPS_FOUND)
|
||||
|
||||
install(TARGETS sddm-helper RUNTIME DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}")
|
||||
|
||||
add_executable(sddm-helper-start-wayland HelperStartWayland.cpp waylandsocketwatcher.cpp waylandhelper.cpp ${CMAKE_SOURCE_DIR}/src/common/SignalHandler.cpp)
|
||||
|
Loading…
Reference in New Issue
Block a user