Allow to configure the QML installation directory

This is needed for example for Yocto cross-compilation, where we want to
install into the package destination directory, not the Qt staging folder.
This commit is contained in:
Volker Krause 2019-01-26 11:16:06 +01:00 committed by Pier Luigi Fiorini
parent cd1aa8689d
commit 6c23c7e9ad
3 changed files with 5 additions and 4 deletions

View File

@ -178,6 +178,7 @@ set(DATA_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/sddm"
set(DBUS_CONFIG_DIR "${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d" CACHE PATH "DBus config files directory")
set(STATE_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/sddm" CACHE PATH "State directory")
set(RUNTIME_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/sddm" CACHE PATH "Runtime data storage directory")
set(QML_INSTALL_DIR "${QT_IMPORTS_DIR}" CACHE PATH "QML component installation directory")
set(SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/Xsession" CACHE PATH "Script to execute when starting the X11 desktop session")
set(WAYLAND_SESSION_COMMAND "${DATA_INSTALL_DIR}/scripts/wayland-session" CACHE PATH "Script to execute when starting the Wayland desktop session")

View File

@ -1,5 +1,5 @@
configure_file("2.0/LayoutBox.qml" "2.0/LayoutBox.qml")
install(DIRECTORY "2.0/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
install(DIRECTORY "common/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/2.0/" DESTINATION "${QT_IMPORTS_DIR}/SddmComponents")
install(DIRECTORY "2.0/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
install(DIRECTORY "common/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/2.0/" DESTINATION "${QML_INSTALL_DIR}/SddmComponents")

View File

@ -24,7 +24,7 @@
#define LIBEXEC_INSTALL_DIR "@CMAKE_INSTALL_FULL_LIBEXECDIR@"
#define DATA_INSTALL_DIR "@DATA_INSTALL_DIR@"
#define SYS_CONFIG_DIR "@CMAKE_INSTALL_FULL_SYSCONFDIR@"
#define IMPORTS_INSTALL_DIR "@QT_IMPORTS_DIR@"
#define IMPORTS_INSTALL_DIR "@QML_INSTALL_DIR@"
#define COMPONENTS_TRANSLATION_DIR "@COMPONENTS_TRANSLATION_DIR@"
#define RUNTIME_DIR "@RUNTIME_DIR@"
#define STATE_DIR "@STATE_DIR@"