Skip to content

Commit

Permalink
shared/icon-label: Prevent moc from being appended to global file
Browse files Browse the repository at this point in the history
Like described in 5eb04cd, 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.
  • Loading branch information
gxalpha committed Oct 6, 2024
1 parent 641d651 commit 2501daa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shared/qt/icon-label/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
18 changes: 18 additions & 0 deletions shared/qt/icon-label/icon-label.cpp
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
******************************************************************************/

#include "moc_icon-label.cpp"

0 comments on commit 2501daa

Please sign in to comment.