bb3ab8b631
Summary: * cmake 2.8.12 is really outdated, 3.0 is minimum in plasma & kf5 * cmake_minimum_required should be at begin of toplevel CMakeLists.txt * bump qt version to 5.7, matching the min Qt version of kf5 5.42 * with ecm being part of kf5 since early versions, share ${KF5_MIN_VERSION} * use QT_MIN_VERSION & KF5_MIN_VERSION also for separate find_package calls * deduplicate all KF5 components searched for in unconditionally included subdirs Test Plan: Still configures and builds with all options OFF & ON Reviewers: #kde_connect, nicolasfella Reviewed By: #kde_connect, nicolasfella Subscribers: nicolasfella Differential Revision: https://phabricator.kde.org/D11418
32 lines
1.2 KiB
CMake
32 lines
1.2 KiB
CMake
find_package(LibFakeKey)
|
|
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"
|
|
)
|
|
|
|
if (LibFakeKey_FOUND)
|
|
find_package(XTest REQUIRED)
|
|
find_package(X11 REQUIRED)
|
|
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS X11Extras)
|
|
endif()
|
|
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Wayland)
|
|
|
|
set(HAVE_X11 ${LibFakeKey_FOUND})
|
|
set(HAVE_WAYLAND ${KF5Wayland_FOUND})
|
|
configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h )
|
|
|
|
kdeconnect_add_plugin(kdeconnect_mousepad JSON kdeconnect_mousepad.json SOURCES mousepadplugin.cpp)
|
|
|
|
if (HAVE_X11)
|
|
include_directories(${XTEST_INCLUDE_DIRS} ${X11_INCLUDE_DIR} ${LibFakeKey_INCLUDE_DIRS})
|
|
endif()
|
|
|
|
target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt5::Gui KF5::I18n)
|
|
|
|
if(HAVE_WAYLAND)
|
|
target_link_libraries(kdeconnect_mousepad KF5::WaylandClient)
|
|
endif()
|
|
if(HAVE_X11)
|
|
target_link_libraries(kdeconnect_mousepad Qt5::X11Extras ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES})
|
|
endif()
|