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)
|
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
|
|
|
|
|
|
|
ecm_add_qtwayland_client_protocol(wayland_SRCS
|
|
|
|
PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/fake-input.xml
|
|
|
|
BASENAME fake-input
|
|
|
|
)
|
|
|
|
|
|
|
|
target_sources(kdeconnect_mousepad PRIVATE ${wayland_SRCS})
|
|
|
|
target_link_libraries(kdeconnect_mousepad Wayland::Client Qt5::WaylandClient)
|
|
|
|
target_sources(kdeconnect_mousepad PUBLIC waylandremoteinput.cpp)
|
|
|
|
set(HAVE_WAYLAND TRUE)
|
|
|
|
|
2018-04-02 19:20:24 +01:00
|
|
|
if (LibFakeKey_FOUND)
|
2018-04-08 18:20:51 +01:00
|
|
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras)
|
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})
|
2015-07-03 08:25:34 +01:00
|
|
|
configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h )
|
2014-06-27 14:41:47 +01:00
|
|
|
|
2018-04-02 19:20:24 +01:00
|
|
|
target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt5::Gui KF5::I18n)
|
|
|
|
|
|
|
|
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)
|
2016-05-31 16:16:01 +01:00
|
|
|
target_link_libraries(kdeconnect_mousepad Qt5::X11Extras ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES})
|
|
|
|
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()
|