2021-06-28 19:33:52 +01:00
|
|
|
kdeconnect_add_plugin(kdeconnect_mousepad SOURCES mousepadplugin.cpp abstractremoteinput.cpp)
|
2020-11-16 00:16:03 +00:00
|
|
|
|
2019-07-21 23:49:07 +01:00
|
|
|
if(UNIX AND NOT APPLE)
|
2023-04-15 11:57:52 +01:00
|
|
|
qt_add_dbus_interface(
|
2020-01-23 15:57:08 +00:00
|
|
|
SRCS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/xdp_dbus_remotedesktop_interface.xml
|
|
|
|
xdp_dbus_remotedesktop_interface
|
|
|
|
)
|
|
|
|
|
|
|
|
target_sources(kdeconnect_mousepad PUBLIC waylandremoteinput.cpp ${SRCS})
|
2018-04-08 18:20:51 +01:00
|
|
|
|
2022-04-12 15:31:08 +01:00
|
|
|
target_sources(kdeconnect_mousepad PRIVATE ${wayland_SRCS})
|
2020-01-23 15:57:08 +00:00
|
|
|
target_link_libraries(kdeconnect_mousepad Wayland::Client Qt::WaylandClient PkgConfig::XkbCommon)
|
2022-04-12 15:31:08 +01:00
|
|
|
target_sources(kdeconnect_mousepad PUBLIC waylandremoteinput.cpp)
|
|
|
|
|
2023-07-19 18:08:03 +01:00
|
|
|
if (WITH_X11)
|
|
|
|
find_package(LibFakeKey REQUIRED)
|
|
|
|
set_package_properties(LibFakeKey PROPERTIES DESCRIPTION "fake key events"
|
|
|
|
URL "https://github.com/dtapuska/fakekey"
|
|
|
|
TYPE REQUIRED
|
|
|
|
PURPOSE "Needed for the remote mouse input plugin"
|
|
|
|
)
|
|
|
|
|
2022-10-29 15:51:41 +01:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras)
|
|
|
|
endif()
|
2018-04-02 19:20:24 +01:00
|
|
|
find_package(XTest REQUIRED)
|
|
|
|
find_package(X11 REQUIRED)
|
2020-11-17 13:34:20 +00:00
|
|
|
target_include_directories(kdeconnect_mousepad PRIVATE ${XTEST_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${LibFakeKey_INCLUDE_DIRS})
|
2018-04-02 19:20:24 +01:00
|
|
|
endif()
|
2016-05-31 16:16:01 +01:00
|
|
|
endif()
|
2015-07-03 08:25:34 +01:00
|
|
|
|
2020-01-23 15:57:08 +00:00
|
|
|
configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h)
|
2014-06-27 14:41:47 +01:00
|
|
|
|
2023-04-15 11:57:52 +01:00
|
|
|
target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt::Gui KF${QT_MAJOR_VERSION}::I18n)
|
2018-04-02 19:20:24 +01:00
|
|
|
|
2023-07-19 18:08:03 +01:00
|
|
|
if (WIN32)
|
2018-04-02 19:20:24 +01:00
|
|
|
target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp)
|
2016-05-31 16:16:01 +01:00
|
|
|
endif()
|
2014-06-27 14:41:47 +01:00
|
|
|
|
2023-07-19 18:08:03 +01:00
|
|
|
if(WITH_X11)
|
2018-04-02 19:20:24 +01:00
|
|
|
target_sources(kdeconnect_mousepad PUBLIC x11remoteinput.cpp)
|
2022-10-29 15:51:41 +01:00
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
target_link_libraries(kdeconnect_mousepad Qt5::X11Extras)
|
2023-04-16 08:57:30 +01:00
|
|
|
elseif(QT_MAJOR_VERSION EQUAL "6")
|
|
|
|
target_link_libraries(kdeconnect_mousepad Qt6::GuiPrivate)
|
2022-10-29 15:51:41 +01:00
|
|
|
endif()
|
|
|
|
target_link_libraries(kdeconnect_mousepad ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES})
|
2016-05-31 16:16:01 +01:00
|
|
|
endif()
|
2019-07-21 23:49:07 +01:00
|
|
|
|
2023-07-19 18:08:03 +01:00
|
|
|
if (APPLE)
|
2019-07-21 23:49:07 +01:00
|
|
|
target_sources(kdeconnect_mousepad PUBLIC macosremoteinput.mm)
|
|
|
|
target_link_libraries(kdeconnect_mousepad "-framework CoreGraphics" "-framework ApplicationServices" "-framework Cocoa")
|
|
|
|
endif()
|