From 2501daae4338ed3c9f734f7e164bcff6233bd423 Mon Sep 17 00:00:00 2001 From: gxalpha Date: Sun, 6 Oct 2024 14:37:36 +0200 Subject: [PATCH] shared/icon-label: Prevent moc from being appended to global file Like described in 5eb04cdf9dc29a8ee9238da3a2e46dbfacacf9ec, this prevents the "moc_icon-label.cpp" from being included in the global "mocs_compilation.cpp" file. Looks a bit ridiculous to create a new file for this, but that's just because content-wise icon-label is only a header. --- shared/qt/icon-label/CMakeLists.txt | 2 +- shared/qt/icon-label/icon-label.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 shared/qt/icon-label/icon-label.cpp diff --git a/shared/qt/icon-label/CMakeLists.txt b/shared/qt/icon-label/CMakeLists.txt index c5325d158f105f..65678b746d2112 100644 --- a/shared/qt/icon-label/CMakeLists.txt +++ b/shared/qt/icon-label/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(Qt6 REQUIRED Core Widgets) add_library(qt-icon-label INTERFACE) add_library(OBS::qt-icon-label ALIAS qt-icon-label) -target_sources(qt-icon-label INTERFACE icon-label.hpp) +target_sources(qt-icon-label INTERFACE icon-label.cpp icon-label.hpp) target_include_directories(qt-icon-label INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") target_link_libraries(qt-icon-label INTERFACE Qt::Core Qt::Widgets) diff --git a/shared/qt/icon-label/icon-label.cpp b/shared/qt/icon-label/icon-label.cpp new file mode 100644 index 00000000000000..237ef680b6bb73 --- /dev/null +++ b/shared/qt/icon-label/icon-label.cpp @@ -0,0 +1,18 @@ +/****************************************************************************** + Copyright (C) 2024 by Sebastian Beckmann + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +******************************************************************************/ + +#include "moc_icon-label.cpp"