backends/virtual: Provide own logging.h file

target_sources() doesn't work as expected with generated source files.
This commit is contained in:
Vlad Zahorodnii 2022-07-22 17:18:24 +03:00
parent acd5bf9a6e
commit 0fbd5fa377
3 changed files with 21 additions and 7 deletions

View file

@ -1,18 +1,12 @@
add_library(KWinWaylandVirtualBackend MODULE)
target_sources(KWinWaylandVirtualBackend PRIVATE
egl_gbm_backend.cpp
logging.cpp
scene_qpainter_virtual_backend.cpp
virtual_backend.cpp
virtual_output.cpp
)
ecm_qt_declare_logging_category(KWinWaylandVirtualBackend
HEADER logging.h
IDENTIFIER KWIN_VIRTUAL
CATEGORY_NAME kwin_platform_virtual
DEFAULT_SEVERITY Critical
)
set_target_properties(KWinWaylandVirtualBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/")
target_link_libraries(KWinWaylandVirtualBackend kwin)

View file

@ -0,0 +1,9 @@
/*
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "logging.h"
Q_LOGGING_CATEGORY(KWIN_VIRTUAL, "kwin_platform_virtual", QtWarningMsg)

View file

@ -0,0 +1,11 @@
/*
SPDX-FileCopyrightText: 2022 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KWIN_VIRTUAL)