2015-02-24 06:12:45 +00:00
|
|
|
project(KDEConnectInterfaces)
|
2013-08-21 17:25:44 +01:00
|
|
|
|
2015-06-18 18:06:14 +01:00
|
|
|
function(geninterface source_h output_h)
|
|
|
|
set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/${output_h}.xml)
|
|
|
|
qt5_generate_dbus_interface( ${source_h} ${xml_file})
|
2013-08-21 17:25:44 +01:00
|
|
|
|
2015-06-18 18:06:14 +01:00
|
|
|
list(APPEND libkdeconnect_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/${output_h})
|
|
|
|
set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true)
|
|
|
|
|
|
|
|
get_filename_component(basename ${output_h} NAME_WE)
|
|
|
|
qt5_add_dbus_interface(libkdeconnect_SRC ${xml_file} ${basename})
|
|
|
|
set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE)
|
|
|
|
endfunction()
|
2014-04-12 20:54:37 +01:00
|
|
|
|
2013-08-21 17:25:44 +01:00
|
|
|
set(libkdeconnect_SRC
|
|
|
|
dbusinterfaces.cpp
|
|
|
|
devicesmodel.cpp
|
|
|
|
notificationsmodel.cpp
|
2015-06-11 15:09:27 +01:00
|
|
|
devicessortproxymodel.cpp
|
2015-03-09 02:16:06 +00:00
|
|
|
# modeltest.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
|
2014-06-14 14:22:40 +01:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h
|
2014-04-12 21:24:12 +01:00
|
|
|
)
|
|
|
|
|
2015-06-18 18:06:14 +01:00
|
|
|
geninterface(${CMAKE_SOURCE_DIR}/core/daemon.h daemoninterface.h)
|
|
|
|
geninterface(${CMAKE_SOURCE_DIR}/core/device.h deviceinterface.h)
|
|
|
|
geninterface(${CMAKE_SOURCE_DIR}/plugins/battery/batterydbusinterface.h devicebatteryinterface.h)
|
|
|
|
geninterface(${CMAKE_SOURCE_DIR}/plugins/sftp/sftpplugin.h devicesftpinterface.h)
|
|
|
|
geninterface(${CMAKE_SOURCE_DIR}/plugins/notifications/notificationsdbusinterface.h devicenotificationsinterface.h)
|
|
|
|
geninterface(${CMAKE_SOURCE_DIR}/plugins/notifications/notification.h notificationinterface.h)
|
|
|
|
geninterface(${CMAKE_SOURCE_DIR}/plugins/mprisremote/mprisremoteplugin.h mprisremoteinterface)
|
|
|
|
|
2013-08-21 17:25:44 +01:00
|
|
|
|
2014-06-16 19:02:07 +01:00
|
|
|
add_library(kdeconnectinterfaces SHARED ${libkdeconnect_SRC})
|
2014-06-14 14:22:40 +01:00
|
|
|
set_target_properties(kdeconnectinterfaces PROPERTIES
|
2014-04-13 12:13:06 +01:00
|
|
|
VERSION ${KDECONNECT_VERSION}
|
|
|
|
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
2013-08-21 17:25:44 +01:00
|
|
|
)
|
|
|
|
|
2014-06-14 14:22:40 +01:00
|
|
|
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
|
|
|
|
|
|
|
|
target_link_libraries(kdeconnectinterfaces
|
2014-07-01 01:11:55 +01:00
|
|
|
LINK_PUBLIC
|
2014-09-21 23:16:39 +01:00
|
|
|
Qt5::Gui
|
2014-11-04 18:12:29 +00:00
|
|
|
Qt5::DBus
|
2014-07-01 01:11:55 +01:00
|
|
|
LINK_PRIVATE
|
2014-09-21 23:16:39 +01:00
|
|
|
KF5::ConfigCore
|
2015-05-18 02:47:31 +01:00
|
|
|
KF5::I18n
|
2013-08-21 17:25:44 +01:00
|
|
|
)
|
|
|
|
|
2014-06-14 15:56:41 +01:00
|
|
|
configure_file(KDEConnectConfig.cmake.in ${CMAKE_BINARY_DIR}/interfaces/KDEConnectConfig.cmake @ONLY)
|
2014-04-13 12:48:32 +01:00
|
|
|
|
2014-06-16 19:02:07 +01:00
|
|
|
ecm_setup_version( "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}" VARIABLE_PREFIX KDECONNECTINTERFACES
|
|
|
|
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_version.h"
|
|
|
|
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KDEConnectConfigVersion.cmake"
|
|
|
|
SOVERSION ${KDECONNECT_VERSION_MAJOR})
|
2014-04-13 12:48:32 +01:00
|
|
|
|
2015-03-12 11:42:10 +00:00
|
|
|
install(TARGETS kdeconnectinterfaces EXPORT kdeconnectLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
|
|
|
|
|
|
|
|
## Don't install header files until API/ABI policy is defined
|
|
|
|
#
|
|
|
|
# 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}/interfaces/KDEConnectConfig.cmake
|
|
|
|
# ${CMAKE_BINARY_DIR}/interfaces/KDEConnectConfigVersion.cmake
|
|
|
|
# DESTINATION ${LIB_INSTALL_DIR}/cmake/KDEConnect)
|