|
|
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
|
|
|
|
|
|
|
project(lxqt-session)
|
|
|
|
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
|
|
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
|
|
|
|
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
|
|
|
option(WITH_LIBUDEV "Build with libudev support" ON)
|
|
|
|
|
|
|
|
find_package(X11 REQUIRED)
|
|
|
|
|
|
|
|
find_package(Qt5DBus REQUIRED)
|
|
|
|
find_package(Qt5LinguistTools REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
find_package(Qt5X11Extras REQUIRED)
|
|
|
|
message(STATUS "Building with Qt${Qt5Core_VERSION}")
|
|
|
|
|
|
|
|
find_package(KF5WindowSystem REQUIRED)
|
|
|
|
|
|
|
|
find_package(lxqt REQUIRED)
|
|
|
|
|
|
|
|
# Please don't move, must be after lxqt
|
|
|
|
find_package(XdgUserDirs REQUIRED)
|
|
|
|
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Patch Version
|
|
|
|
set(LXQT_SESSION_PATCH_VERSION 0)
|
|
|
|
|
|
|
|
set(LXQT_SESSION_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_SESSION_PATCH_VERSION})
|
|
|
|
add_definitions("-DLXQT_SESSION_VERSION=\"${LXQT_SESSION_VERSION}\"")
|
|
|
|
|
|
|
|
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
|
|
|
|
|
|
|
# Translations **********************************
|
|
|
|
include(LXQtTranslate)
|
|
|
|
|
|
|
|
add_subdirectory(lxqt-session)
|
|
|
|
add_subdirectory(lxqt-config-session)
|
|
|
|
add_subdirectory(lxqt-leave)
|
|
|
|
|
|
|
|
# merged from lxqt-common
|
|
|
|
include(LXQtConfigVars)
|
|
|
|
|
|
|
|
# startlxqt script
|
|
|
|
set(PREDEF_XDG_DATA_DIRS "$XDG_DATA_HOME")
|
|
|
|
if(NOT("${LXQT_DATA_DIR}" MATCHES "^/usr(/local)?/share$"))
|
|
|
|
set(PREDEF_XDG_DATA_DIRS "${PREDEF_XDG_DATA_DIRS}:${LXQT_DATA_DIR}")
|
|
|
|
endif()
|
|
|
|
set(PREDEF_XDG_DATA_DIRS "${PREDEF_XDG_DATA_DIRS}:/usr/local/share:/usr/share")
|
|
|
|
configure_file(startlxqt.in startlxqt @ONLY)
|
|
|
|
install(PROGRAMS
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/startlxqt"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
|
|
COMPONENT Runtime
|
|
|
|
)
|
|
|
|
install(FILES
|
|
|
|
startlxqt.1
|
|
|
|
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
|
|
|
COMPONENT Runtime
|
|
|
|
)
|
|
|
|
|
|
|
|
# default config files
|
|
|
|
add_subdirectory(config)
|
|
|
|
add_subdirectory(autostart)
|
|
|
|
|
|
|
|
# xsession *.desktop file for display managers
|
|
|
|
add_subdirectory(xsession)
|
|
|
|
|