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 f759877336
commit 3effb006f3

View file

@ -60,7 +60,13 @@ geninterface(${PROJECT_SOURCE_DIR}/plugins/virtualmonitor/virtualmonitorplugin.h
geninterface(${PROJECT_SOURCE_DIR}/plugins/photo/photoplugin.h photointerface)
geninterface(${PROJECT_SOURCE_DIR}/plugins/clipboard/clipboardplugin.h deviceclipboardinterface)
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}