bbf00fdd98
Summary: The main reason for not having it as a mandatory dependency was that BSD doesn't support it. But as I learned recently it is available on our CI system. So BSDs have support now. Even more it showed that the code doesn't compile if the dependency is missing. And there's one thing I hate: broken build configuration options. So let's make UDEV and libinput a required dependency and get rid of the problems. Test Plan: Compiles Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #plasma Differential Revision: https://phabricator.kde.org/D10057
52 lines
2.3 KiB
CMake
52 lines
2.3 KiB
CMake
if (XCB_ICCCM_FOUND)
|
|
set(normalhintsbasesizetest_SRCS normalhintsbasesizetest.cpp)
|
|
add_executable(normalhintsbasesizetest ${normalhintsbasesizetest_SRCS})
|
|
target_link_libraries(normalhintsbasesizetest XCB::XCB XCB::ICCCM KF5::WindowSystem)
|
|
endif()
|
|
|
|
# next target
|
|
set(screenedgeshowtest_SRCS screenedgeshowtest.cpp)
|
|
add_executable(screenedgeshowtest ${screenedgeshowtest_SRCS})
|
|
target_link_libraries(screenedgeshowtest Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem KF5::WaylandClient ${XCB_XCB_LIBRARY})
|
|
|
|
if (KF5Wayland_FOUND)
|
|
add_definitions(-DSOURCE_DIR="${KWIN_SOURCE_DIR}")
|
|
set(waylandclienttest_SRCS
|
|
waylandclienttest.cpp
|
|
)
|
|
add_executable(waylandclienttest ${waylandclienttest_SRCS})
|
|
target_link_libraries(waylandclienttest Qt5::Core Qt5::Gui KF5::WaylandClient)
|
|
endif()
|
|
|
|
set(libinputtest_SRCS
|
|
libinputtest.cpp
|
|
${KWIN_SOURCE_DIR}/libinput/context.cpp
|
|
${KWIN_SOURCE_DIR}/libinput/connection.cpp
|
|
${KWIN_SOURCE_DIR}/libinput/device.cpp
|
|
${KWIN_SOURCE_DIR}/libinput/events.cpp
|
|
${KWIN_SOURCE_DIR}/libinput/libinput_logging.cpp
|
|
${KWIN_SOURCE_DIR}/logind.cpp
|
|
${KWIN_SOURCE_DIR}/udev.cpp
|
|
)
|
|
add_executable(libinputtest ${libinputtest_SRCS})
|
|
add_definitions(-DKWIN_BUILD_TESTING)
|
|
target_link_libraries(libinputtest Qt5::Core Qt5::DBus Libinput::Libinput ${UDEV_LIBS} KF5::ConfigCore KF5::GlobalAccel KF5::WindowSystem)
|
|
|
|
add_executable(x11shadowreader x11shadowreader.cpp)
|
|
target_link_libraries(x11shadowreader XCB::XCB Qt5::Widgets Qt5::X11Extras KF5::ConfigCore KF5::WindowSystem)
|
|
|
|
add_executable(pointergestures pointergesturestest.cpp)
|
|
add_definitions(-DDIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
|
target_link_libraries(pointergestures Qt5::Gui Qt5::Quick KF5::WaylandClient)
|
|
|
|
add_executable(cursorhotspottest cursorhotspottest.cpp)
|
|
target_link_libraries(cursorhotspottest Qt5::Widgets)
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
set( orientationtest_SRCS
|
|
orientationtest.cpp
|
|
../orientation_sensor.cpp
|
|
)
|
|
qt5_add_dbus_adaptor( orientationtest_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../org.kde.kwin.OrientationSensor.xml ${CMAKE_CURRENT_SOURCE_DIR}/../orientation_sensor.h KWin::OrientationSensor)
|
|
add_executable(orientationtest ${orientationtest_SRCS})
|
|
target_link_libraries(orientationtest Qt5::DBus Qt5::Widgets Qt5::Sensors KF5::ConfigCore KF5::Notifications KF5::I18n)
|