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)
|
2020-01-23 15:57:08 +00:00
|
|
|
qt5_add_dbus_interface(
|
|
|
|
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
|
|
|
|
|
|
|
find_package(LibFakeKey QUIET)
|
2018-04-02 19:20:24 +01:00
|
|
|
set_package_properties(LibFakeKey PROPERTIES DESCRIPTION "fake key events"
|
|
|
|
URL "https://www.yoctoproject.org/tools-resources/projects/matchbox"
|
|
|
|
TYPE OPTIONAL
|
|
|
|
PURPOSE "Needed for the remote mousepad plugin"
|
|
|
|
)
|
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)
|
|
|
|
set(HAVE_WAYLAND TRUE)
|
|
|
|
|
2018-04-02 19:20:24 +01:00
|
|
|
if (LibFakeKey_FOUND)
|
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
|
|
|
|
2018-04-02 19:20:24 +01:00
|
|
|
set(HAVE_WINDOWS ${WIN32})
|
2016-05-31 16:16:01 +01:00
|
|
|
set(HAVE_X11 ${LibFakeKey_FOUND})
|
2019-07-21 23:49:07 +01:00
|
|
|
set(HAVE_MACOS ${APPLE})
|
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
|
|
|
|
2022-10-29 15:51:41 +01:00
|
|
|
target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt::Gui KF5::I18n)
|
2018-04-02 19:20:24 +01:00
|
|
|
|
|
|
|
if (HAVE_WINDOWS)
|
|
|
|
target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp)
|
2016-05-31 16:16:01 +01:00
|
|
|
endif()
|
2014-06-27 14:41:47 +01:00
|
|
|
|
2016-05-31 16:16:01 +01:00
|
|
|
if(HAVE_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)
|
|
|
|
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
|
|
|
|
|
|
|
if (HAVE_MACOS)
|
|
|
|
target_sources(kdeconnect_mousepad PUBLIC macosremoteinput.mm)
|
|
|
|
target_link_libraries(kdeconnect_mousepad "-framework CoreGraphics" "-framework ApplicationServices" "-framework Cocoa")
|
|
|
|
endif()
|