2014-04-13 12:13:06 +01:00
|
|
|
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}")
|
2013-08-21 17:25:44 +01:00
|
|
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR})
|
|
|
|
|
2014-04-12 20:54:37 +01:00
|
|
|
add_definitions(-DKDECONNECT_LIBRARY)
|
|
|
|
|
2013-08-21 17:25:44 +01:00
|
|
|
set(libkdeconnect_SRC
|
|
|
|
dbusinterfaces.cpp
|
|
|
|
devicesmodel.cpp
|
|
|
|
notificationsmodel.cpp
|
2013-08-22 02:21:08 +01:00
|
|
|
modeltest.cpp
|
2013-11-06 21:16:55 +00:00
|
|
|
kdebugnamespace.cpp
|
2013-08-21 17:25:44 +01:00
|
|
|
)
|
|
|
|
|
2014-04-12 21:24:12 +01:00
|
|
|
set(libkdeconnect_public_HEADERS
|
|
|
|
KDEConnect/DevicesModel
|
|
|
|
KDEConnect/NotificationsModel
|
|
|
|
)
|
|
|
|
|
|
|
|
set(libkdeconnect_HEADERS
|
|
|
|
devicesmodel.h
|
|
|
|
notificationsmodel.h
|
|
|
|
dbusinterfaces.h
|
|
|
|
kdeconnect_export.h
|
|
|
|
${CMAKE_BINARY_DIR}/libkdeconnect/daemoninterface.h
|
|
|
|
${CMAKE_BINARY_DIR}/libkdeconnect/deviceinterface.h
|
|
|
|
${CMAKE_BINARY_DIR}/libkdeconnect/devicebatteryinterface.h
|
|
|
|
${CMAKE_BINARY_DIR}/libkdeconnect/devicesftpinterface.h
|
|
|
|
${CMAKE_BINARY_DIR}/libkdeconnect/devicenotificationsinterface.h
|
|
|
|
${CMAKE_BINARY_DIR}/libkdeconnect/notificationinterface.h
|
|
|
|
)
|
|
|
|
|
2013-08-21 17:25:44 +01:00
|
|
|
set_source_files_properties(
|
2013-09-04 15:40:57 +01:00
|
|
|
${CMAKE_BINARY_DIR}/kded/org.kde.kdeconnect.daemon.xml
|
|
|
|
${CMAKE_BINARY_DIR}/kded/org.kde.kdeconnect.device.xml
|
|
|
|
${CMAKE_BINARY_DIR}/kded/plugins/battery/org.kde.kdeconnect.device.battery.xml
|
2014-01-06 20:56:51 +00:00
|
|
|
${CMAKE_BINARY_DIR}/kded/plugins/sftp/org.kde.kdeconnect.device.sftp.xml
|
2013-09-04 15:40:57 +01:00
|
|
|
${CMAKE_BINARY_DIR}/kded/plugins/notifications/org.kde.kdeconnect.device.notifications.xml
|
|
|
|
${CMAKE_BINARY_DIR}/kded/plugins/notifications/org.kde.kdeconnect.device.notifications.notification.xml
|
2013-08-21 17:25:44 +01:00
|
|
|
PROPERTIES NO_NAMESPACE true
|
|
|
|
)
|
2013-09-04 15:40:57 +01:00
|
|
|
qt4_add_dbus_interface(libkdeconnect_SRC ${CMAKE_BINARY_DIR}/kded/org.kde.kdeconnect.daemon.xml daemoninterface)
|
|
|
|
qt4_add_dbus_interface(libkdeconnect_SRC ${CMAKE_BINARY_DIR}/kded/org.kde.kdeconnect.device.xml deviceinterface)
|
|
|
|
qt4_add_dbus_interface(libkdeconnect_SRC ${CMAKE_BINARY_DIR}/kded/plugins/battery/org.kde.kdeconnect.device.battery.xml devicebatteryinterface )
|
2014-01-06 20:56:51 +00:00
|
|
|
qt4_add_dbus_interface(libkdeconnect_SRC ${CMAKE_BINARY_DIR}/kded/plugins/sftp/org.kde.kdeconnect.device.sftp.xml devicesftpinterface )
|
2013-09-04 15:40:57 +01:00
|
|
|
qt4_add_dbus_interface(libkdeconnect_SRC ${CMAKE_BINARY_DIR}/kded/plugins/notifications/org.kde.kdeconnect.device.notifications.xml devicenotificationsinterface )
|
|
|
|
qt4_add_dbus_interface(libkdeconnect_SRC ${CMAKE_BINARY_DIR}/kded/plugins/notifications/org.kde.kdeconnect.device.notifications.notification.xml notificationinterface )
|
2013-08-21 17:25:44 +01:00
|
|
|
|
|
|
|
kde4_add_library(kdeconnect SHARED ${libkdeconnect_SRC})
|
|
|
|
set_target_properties(kdeconnect PROPERTIES
|
2014-04-13 12:13:06 +01:00
|
|
|
VERSION ${KDECONNECT_VERSION}
|
|
|
|
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
2013-08-21 17:25:44 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
add_dependencies(kdeconnect
|
|
|
|
org.kde.kdeconnect.daemon.xml
|
|
|
|
org.kde.kdeconnect.device.xml
|
|
|
|
org.kde.kdeconnect.device.battery.xml
|
2014-01-06 20:56:51 +00:00
|
|
|
org.kde.kdeconnect.device.sftp.xml
|
2013-08-21 17:25:44 +01:00
|
|
|
org.kde.kdeconnect.device.notifications.xml
|
|
|
|
org.kde.kdeconnect.device.notifications.notification.xml
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(kdeconnect
|
|
|
|
${KDE4_KDEUI_LIBS}
|
|
|
|
${QT_QTCORE_LIBRARY}
|
|
|
|
${QT_QTDBUS_LIBRARY}
|
|
|
|
${KDE4_KDECORE_LIBS}
|
|
|
|
${QJSON_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2014-04-13 12:48:32 +01:00
|
|
|
configure_file(KDEConnectConfig.cmake.in ${CMAKE_BINARY_DIR}/libkdeconnect/KDEConnectConfig.cmake @ONLY)
|
|
|
|
|
|
|
|
macro_write_basic_cmake_version_file(${CMAKE_BINARY_DIR}/libkdeconnect/KDEConnectConfigVersion.cmake
|
|
|
|
${KDECONNECT_VERSION_MAJOR} ${KDECONNECT_VERSION_MINOR} ${KDECONNECT_VERSION_PATCH})
|
|
|
|
|
2013-08-21 17:25:44 +01:00
|
|
|
install(TARGETS kdeconnect EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
|
2014-04-13 12:48:32 +01:00
|
|
|
|
|
|
|
#Install header files
|
|
|
|
install(FILES ${libkdeconnect_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/kdeconnect COMPONENT Devel)
|
|
|
|
install(FILES ${libkdeconnect_public_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/KDEConnect COMPONENT Devel)
|
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/libkdeconnect/KDEConnectConfig.cmake
|
|
|
|
${CMAKE_BINARY_DIR}/libkdeconnect/KDEConnectConfigVersion.cmake
|
|
|
|
DESTINATION ${LIB_INSTALL_DIR}/cmake/KDEConnect)
|