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