dbea3171bd
This meant to add a lot of dependencies to each plugin since we had KDELibs4support as PUBLIC link meaning that anything linking against kdeconnectcore was linking at the same time to mostly all frameworks. Now each plugin has more or less its dependencies in the CMake some still depend on KDELibs4Support. For the mousepad plugin I needed to add a fixX11.h file that basically undefines/defines again some stuff xlib has that conflcits with normal C++ and Qt. Before it was not conflicting because some lib within KDELibs4Support was including this file, but now we have to do it ourselves.
72 lines
1.6 KiB
CMake
72 lines
1.6 KiB
CMake
project(KDEConnectCore)
|
|
|
|
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-core\")
|
|
|
|
set(KDECONNECT_VERSION_MAJOR 1)
|
|
set(KDECONNECT_VERSION_MINOR 0)
|
|
set(KDECONNECT_VERSION_PATCH 1)
|
|
set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}")
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${QCA2_INCLUDE_DIR}
|
|
)
|
|
|
|
add_subdirectory(backends/lan)
|
|
add_subdirectory(backends/loopback)
|
|
|
|
set(kded_kdeconnect_SRCS
|
|
${kded_kdeconnect_SRCS}
|
|
|
|
backends/linkprovider.cpp
|
|
backends/devicelink.cpp
|
|
|
|
kdeconnectplugin.cpp
|
|
pluginloader.cpp
|
|
|
|
networkpackage.cpp
|
|
filetransferjob.cpp
|
|
daemon.cpp
|
|
device.cpp
|
|
)
|
|
|
|
add_library(kdeconnectcore SHARED ${kded_kdeconnect_SRCS})
|
|
target_link_libraries(kdeconnectcore
|
|
PUBLIC
|
|
Qt5::Network
|
|
PRIVATE
|
|
${QCA2_LIBRARIES}
|
|
Qt5::DBus
|
|
Qt5::Gui
|
|
KF5::KIOWidgets
|
|
KF5::KCMUtils
|
|
KF5::I18n
|
|
KF5::ConfigCore
|
|
KF5::Notifications
|
|
)
|
|
|
|
set_target_properties(kdeconnectcore PROPERTIES
|
|
VERSION ${KDECONNECT_VERSION}
|
|
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
|
)
|
|
|
|
target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
|
generate_export_header(kdeconnectcore EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectcore_export.h BASE_NAME KDEConnectCore)
|
|
|
|
include(macros)
|
|
|
|
generate_and_install_dbus_interface(
|
|
kdeconnectcore
|
|
../core/daemon.h
|
|
org.kde.kdeconnect.daemon.xml
|
|
OPTIONS -a
|
|
)
|
|
|
|
generate_and_install_dbus_interface(
|
|
kdeconnectcore
|
|
../core/device.h
|
|
org.kde.kdeconnect.device.xml
|
|
OPTIONS -a
|
|
)
|
|
|
|
install(TARGETS kdeconnectcore EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
|