From 372f1d331730302fa7664eb33d8189146942c690 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Fri, 13 Oct 2023 13:23:25 +0200 Subject: [PATCH] Say hello to AuroraGlobalPrivate This is a module that contains configure information and it's shared by the other Aurora modules. Closes: #45 --- CMakeLists.txt | 1 + src/compositor/CMakeLists.txt | 10 +++----- src/global/CMakeLists.txt | 23 +++++++++++++++++++ src/global/README | 9 -------- src/global/README.md | 2 ++ .../aurorafeatures.h.in} | 13 ++++------- 6 files changed, 34 insertions(+), 24 deletions(-) create mode 100644 src/global/CMakeLists.txt delete mode 100644 src/global/README create mode 100644 src/global/README.md rename src/{compositor/global/liriauroracompositorfeatures.h.in => global/aurorafeatures.h.in} (70%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 043ac7b71..955118457 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,7 @@ if(NOT LIRI_SUPERBUILD) endif() ## Add subdirectories: +add_subdirectory(src/global) if(FEATURE_aurora_xkbcommon) add_subdirectory(src/platformsupport/xkbcommon) endif() diff --git a/src/compositor/CMakeLists.txt b/src/compositor/CMakeLists.txt index 8bea581f4..8d72d1035 100644 --- a/src/compositor/CMakeLists.txt +++ b/src/compositor/CMakeLists.txt @@ -64,7 +64,6 @@ liri_add_module(AuroraCompositor extensions/aurorawlqtkey.cpp extensions/aurorawlqtkey_p.h extensions/aurorawlqttouch.cpp extensions/aurorawlqttouch_p.h global/aurorawaylandcompositorextension.cpp global/aurorawaylandcompositorextension.h global/aurorawaylandcompositorextension_p.h - global/liriauroracompositorfeatures.h.in global/aurorawaylandutils_p.h global/aurorawaylandqmlinclude.h wayland_wrapper/aurorawlbuffermanager.cpp wayland_wrapper/aurorawlbuffermanager_p.h @@ -90,18 +89,15 @@ liri_add_module(AuroraCompositor Wayland::Server LIBRARIES Qt::GuiPrivate + Liri::AuroraGlobalPrivate PKGCONFIG_DEPENDENCIES Qt${QT_DEFAULT_MAJOR_VERSION}Core Qt${QT_DEFAULT_MAJOR_VERSION}Gui wayland-server ) -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/global/liriauroracompositorfeatures.h.in" - "${CMAKE_CURRENT_BINARY_DIR}/liriauroracompositorfeatures.h" - @ONLY -) -set(_global_header_features "#include +set(_global_header_features "#include +#include #include ") liri_extend_target(AuroraCompositor SOURCES diff --git a/src/global/CMakeLists.txt b/src/global/CMakeLists.txt new file mode 100644 index 000000000..245bc6270 --- /dev/null +++ b/src/global/CMakeLists.txt @@ -0,0 +1,23 @@ +liri_add_module(AuroraGlobalPrivate + DESCRIPTION + "Contains configure features shared by Aurora modules" + SOURCES + aurorafeatures.h.in + STATIC + NO_PKGCONFIG +) + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/aurorafeatures.h.in" + "${CMAKE_CURRENT_BINARY_DIR}/aurorafeatures.h" + @ONLY +) +set(_global_header_features "#include ") +liri_extend_target(AuroraGlobalPrivate + SOURCES + "${CMAKE_CURRENT_BINARY_DIR}/aurorafeatures.h" + GLOBAL_HEADER_CONTENT + "${_global_header_features}" +) + +liri_finalize_module(AuroraGlobalPrivate) diff --git a/src/global/README b/src/global/README deleted file mode 100644 index 9b045d4d2..000000000 --- a/src/global/README +++ /dev/null @@ -1,9 +0,0 @@ -The WaylandGlobalPrivate module is a module that contains configure -features, shared by the modules of the qtwayland repository. - -The actual definition of this module is in src/CMakeLists.txt, -because we need to have the qt_find_package calls in a directory scope -above src/client and src/compositor. - -This file here mostly exists to make the otherwise empty src/global -directory known to git. diff --git a/src/global/README.md b/src/global/README.md new file mode 100644 index 000000000..db046a99e --- /dev/null +++ b/src/global/README.md @@ -0,0 +1,2 @@ +The AuroraGlobalPrivate module is a module that contains configure +features, shared by the modules of Aurora. diff --git a/src/compositor/global/liriauroracompositorfeatures.h.in b/src/global/aurorafeatures.h.in similarity index 70% rename from src/compositor/global/liriauroracompositorfeatures.h.in rename to src/global/aurorafeatures.h.in index 555b0bd18..81e1ba1e7 100644 --- a/src/compositor/global/liriauroracompositorfeatures.h.in +++ b/src/global/aurorafeatures.h.in @@ -1,9 +1,8 @@ -// SPDX-FileCopyrightText: 2021 Pier Luigi Fiorini -// -// SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-FileCopyrightText: 2023 Pier Luigi Fiorini +// SPDX-License-Identifier: LGPL-3.0-or-later -#ifndef LIRIAURORACOMPOSITORFEATURES_H -#define LIRIAURORACOMPOSITORFEATURES_H +#ifndef AURORAFEATURES_H +#define AURORAFEATURES_H #cmakedefine01 LIRI_FEATURE_aurora_datadevice #cmakedefine01 LIRI_FEATURE_aurora_xkbcommon @@ -18,6 +17,4 @@ #cmakedefine01 LIRI_FEATURE_aurora_shm_emulation_server #cmakedefine01 LIRI_FEATURE_aurora_xwayland -#include - -#endif // LIRIAURORACOMPOSITORFEATURES_H +#endif // AURORAFEATURES_H