From 3effb006f3e4c3bd4ee011ac95678cf3b8ee186b Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Tue, 18 Apr 2023 16:00:15 +0200 Subject: [PATCH] interfaces: Build lib in Qt6 STATIC Otherwise, the Q_OBJECT stuff is not properly exported and will result in linker errors --- interfaces/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index d0de3b5d9..fa40f3361 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -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}