interfaces: Build lib in Qt6 STATIC

Otherwise, the Q_OBJECT stuff is not properly exported and will result in linker errors
This commit is contained in:
Alexander Lohnau 2023-04-18 16:00:15 +02:00
parent 7ee3feaa2e
commit 50ce331d40

View file

@ -59,7 +59,13 @@ geninterface(${PROJECT_SOURCE_DIR}/plugins/bigscreen/bigscreenplugin.h bigscreen
geninterface(${PROJECT_SOURCE_DIR}/plugins/virtualmonitor/virtualmonitorplugin.h virtualmonitorinterface)
geninterface(${PROJECT_SOURCE_DIR}/plugins/photo/photoplugin.h photointerface)
add_library(kdeconnectinterfaces ${libkdeconnect_SRC})
if ("${QT_MAJOR_VERSION}" STREQUAL "6")
add_library(kdeconnectinterfaces STATIC)
else()
add_library(kdeconnectinterfaces)
endif()
target_sources(kdeconnectinterfaces PRIVATE ${libkdeconnect_SRC})
set_target_properties(kdeconnectinterfaces PROPERTIES
VERSION ${KDECONNECT_VERSION}
SOVERSION ${KDECONNECT_VERSION_MAJOR}