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
|
|
|
target_sources(kdeconnect_mousepad PUBLIC waylandremoteinput.cpp ${SRCS})
|
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
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
|
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-12-28 16:37:31 +00:00
|
|
|
target_link_libraries(kdeconnect_mousepad kdeconnectcore kdeconnectinterfaces Qt::Gui KF6::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)
|
2023-12-28 16:37:31 +00:00
|
|
|
target_link_libraries(kdeconnect_mousepad Qt6::GuiPrivate ${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()
|