From 27a8dc25f14f1c6e5450f7e782654443c05f996e Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 17 Apr 2022 03:39:09 +0200 Subject: [PATCH] Fix dbus API moc with Qt6 --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e10b0e95..c24e19e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -495,11 +495,6 @@ add_subdirectory(third_party/SingleApplication-3.3.2/) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) -# this must be defined here to make the moc work properly -if (NOT APPLE AND NOT WIN32) - add_compile_definitions(NHEKO_DBUS_SYS) -endif() - set(MOC_HEADERS # Dialogs src/dialogs/FallbackAuth.h @@ -603,7 +598,7 @@ else () src/dbus/NhekoDBusBackend.cpp src/notifications/ManagerLinux.cpp ) - qt5_wrap_cpp(MOC_HEADERS + set(MOC_HEADERS ${MOC_HEADERS} src/dbus/NhekoDBusApi.h src/dbus/NhekoDBusBackend.h ) @@ -626,6 +621,10 @@ if(WIN32) else() add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS}) + if (NOT APPLE) + target_compile_definitions(nheko PRIVATE NHEKO_DBUS_SYS) + endif() + if (HAVE_BACKTRACE_SYMBOLS_FD AND NOT CMAKE_BUILD_TYPE STREQUAL "Release") set_target_properties(nheko PROPERTIES ENABLE_EXPORTS ON) endif()