Fix dbus API moc with Qt6

This commit is contained in:
Nicolas Werner 2022-04-17 03:39:09 +02:00
parent 2f71422d2a
commit 27a8dc25f1
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -495,11 +495,6 @@ add_subdirectory(third_party/SingleApplication-3.3.2/)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) 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 set(MOC_HEADERS
# Dialogs # Dialogs
src/dialogs/FallbackAuth.h src/dialogs/FallbackAuth.h
@ -603,7 +598,7 @@ else ()
src/dbus/NhekoDBusBackend.cpp src/dbus/NhekoDBusBackend.cpp
src/notifications/ManagerLinux.cpp src/notifications/ManagerLinux.cpp
) )
qt5_wrap_cpp(MOC_HEADERS set(MOC_HEADERS ${MOC_HEADERS}
src/dbus/NhekoDBusApi.h src/dbus/NhekoDBusApi.h
src/dbus/NhekoDBusBackend.h src/dbus/NhekoDBusBackend.h
) )
@ -626,6 +621,10 @@ if(WIN32)
else() else()
add_executable (nheko ${OS_BUNDLE} ${NHEKO_DEPS}) 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") if (HAVE_BACKTRACE_SYMBOLS_FD AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
set_target_properties(nheko PROPERTIES ENABLE_EXPORTS ON) set_target_properties(nheko PROPERTIES ENABLE_EXPORTS ON)
endif() endif()