Meson: init in all plugins and fix include paths

This commit is contained in:
Mihai Fufezan 2023-04-27 01:44:12 +03:00
parent daab9e07e5
commit c6b1928fac
No known key found for this signature in database
GPG key ID: 5899325F2F120900
9 changed files with 88 additions and 11 deletions

View file

@ -1,7 +1,7 @@
#include "borderDeco.hpp" #include "borderDeco.hpp"
#include <src/Compositor.hpp> #include <hyprland/src/Compositor.hpp>
#include <src/Window.hpp> #include <hyprland/src/Window.hpp>
#include "globals.hpp" #include "globals.hpp"

View file

@ -2,7 +2,7 @@
#define WLR_USE_UNSTABLE #define WLR_USE_UNSTABLE
#include <src/render/decorations/IHyprWindowDecoration.hpp> #include <hyprland/src/render/decorations/IHyprWindowDecoration.hpp>
class CBordersPlusPlus : public IHyprWindowDecoration { class CBordersPlusPlus : public IHyprWindowDecoration {
public: public:

View file

@ -1,5 +1,5 @@
#pragma once #pragma once
#include <src/plugins/PluginAPI.hpp> #include <hyprland/src/plugins/PluginAPI.hpp>
inline HANDLE PHANDLE = nullptr; inline HANDLE PHANDLE = nullptr;

View file

@ -3,9 +3,9 @@
#include <unistd.h> #include <unistd.h>
#include <any> #include <any>
#include <src/Compositor.hpp> #include <hyprland/src/Compositor.hpp>
#include <src/Window.hpp> #include <hyprland/src/Window.hpp>
#include <src/config/ConfigManager.hpp> #include <hyprland/src/config/ConfigManager.hpp>
#include "borderDeco.hpp" #include "borderDeco.hpp"
#include "globals.hpp" #include "globals.hpp"

View file

@ -0,0 +1,25 @@
project('borders-plus-plus', 'cpp',
version: '0.1',
default_options: ['buildtype=release'],
)
cpp_compiler = meson.get_compiler('cpp')
if cpp_compiler.has_argument('-std=c++23')
add_global_arguments('-std=c++23', language: 'cpp')
elif cpp_compiler.has_argument('-std=c++2b')
add_global_arguments('-std=c++2b', language: 'cpp')
else
error('Could not configure current C++ compiler (' + cpp_compiler.get_id() + ' ' + cpp_compiler.version() + ') with required C++ standard (C++23)')
endif
globber = run_command('find', '.', '-name', '*.cpp', check: true)
src = globber.stdout().strip().split('\n')
shared_module(meson.project_name(), src,
dependencies: [
dependency('hyprland'),
dependency('pixman-1'),
dependency('libdrm'),
],
install: true,
)

View file

@ -1,5 +1,5 @@
#pragma once #pragma once
#include <src/plugins/PluginAPI.hpp> #include <hyprland/src/plugins/PluginAPI.hpp>
inline HANDLE PHANDLE = nullptr; inline HANDLE PHANDLE = nullptr;

View file

@ -2,9 +2,9 @@
#include <unistd.h> #include <unistd.h>
#include <src/Compositor.hpp> #include <hyprland/src/Compositor.hpp>
#include <src/Window.hpp> #include <hyprland/src/Window.hpp>
#include <src/config/ConfigManager.hpp> #include <hyprland/src/config/ConfigManager.hpp>
#include "globals.hpp" #include "globals.hpp"

View file

@ -0,0 +1,25 @@
project('csgo-vulkan-fix', 'cpp',
version: '0.1',
default_options: ['buildtype=release'],
)
cpp_compiler = meson.get_compiler('cpp')
if cpp_compiler.has_argument('-std=c++23')
add_global_arguments('-std=c++23', language: 'cpp')
elif cpp_compiler.has_argument('-std=c++2b')
add_global_arguments('-std=c++2b', language: 'cpp')
else
error('Could not configure current C++ compiler (' + cpp_compiler.get_id() + ' ' + cpp_compiler.version() + ') with required C++ standard (C++23)')
endif
globber = run_command('find', '.', '-name', '*.cpp', check: true)
src = globber.stdout().strip().split('\n')
shared_module(meson.project_name(), src,
dependencies: [
dependency('hyprland'),
dependency('pixman-1'),
dependency('libdrm'),
],
install: true,
)

27
hyprbars/meson.build Normal file
View file

@ -0,0 +1,27 @@
project('hyprbars', 'cpp',
version: '0.1',
default_options: ['buildtype=release'],
)
cpp_compiler = meson.get_compiler('cpp')
if cpp_compiler.has_argument('-std=c++23')
add_global_arguments('-std=c++23', language: 'cpp')
elif cpp_compiler.has_argument('-std=c++2b')
add_global_arguments('-std=c++2b', language: 'cpp')
else
error('Could not configure current C++ compiler (' + cpp_compiler.get_id() + ' ' + cpp_compiler.version() + ') with required C++ standard (C++23)')
endif
globber = run_command('find', '.', '-name', '*.cpp', check: true)
src = globber.stdout().strip().split('\n')
hyprland = dependency('hyprland')
shared_module(meson.project_name(), src,
dependencies: [
dependency('hyprland'),
dependency('pixman-1'),
dependency('libdrm'),
],
install: true,
)