diff --git a/cmake/FindMtdev.cmake b/cmake/FindMtdev.cmake new file mode 100644 index 0000000000..39d9823207 --- /dev/null +++ b/cmake/FindMtdev.cmake @@ -0,0 +1,3 @@ +find_package(PkgConfig) + +pkg_check_modules(Mtdev mtdev IMPORTED_TARGET) diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index f3a439a862..e5888cc1d7 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -54,6 +54,8 @@ find_package(JPEG) set_package_properties(JPEG PROPERTIES TYPE OPTIONAL) find_package(PNG) set_package_properties(PNG PROPERTIES TYPE OPTIONAL) +find_package(Mtdev) +set_package_properties(Mtdev PROPERTIES TYPE OPTIONAL) find_package(Tslib) set_package_properties(Tslib PROPERTIES TYPE OPTIONAL) find_package(Vulkan) @@ -531,7 +533,7 @@ qt_feature("mirclient" PRIVATE ) qt_feature("mtdev" PRIVATE LABEL "mtdev" - CONDITION libs.mtdev OR FIXME + CONDITION Mtdev_FOUND ) qt_feature("opengles2" PUBLIC LABEL "OpenGL ES 2.0" diff --git a/src/platformsupport/input/CMakeLists.txt b/src/platformsupport/input/CMakeLists.txt index dc5b25c9ce..43fb26d303 100644 --- a/src/platformsupport/input/CMakeLists.txt +++ b/src/platformsupport/input/CMakeLists.txt @@ -9,6 +9,9 @@ set_package_properties(XKB PROPERTIES TYPE OPTIONAL) find_package(Tslib) set_package_properties(Tslib PROPERTIES TYPE OPTIONAL) +find_package(Mtdev) +set_package_properties(Mtdev PROPERTIES TYPE OPTIONAL) + ##################################################################### ## InputSupport Module: ##################################################################### @@ -61,7 +64,7 @@ extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_libudev extend_target(InputSupport CONDITION QT_FEATURE_evdev AND QT_FEATURE_mtdev LIBRARIES - mtdev + PkgConfig::Mtdev ) extend_target(InputSupport CONDITION QT_FEATURE_tslib diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 4bfe023c2a..870c56d4d6 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -73,6 +73,7 @@ def map_library(lib: str) -> Union[str, LibraryMapping, List[str]]: 'librt': 'WrapRt', 'libudev': 'Libudev', 'lttng-ust': LibraryMapping(package='LTTngUST', resultVariable="LTTNGUST"), + 'mtdev': 'Mtdev', 'opengl': LibraryMapping(package="OpenGL", resultVariable="OpenGL_OpenGL"), 'openssl': 'OpenSSL', 'openssl_headers': LibraryMapping(package="OpenSSL", resultVariable="OPENSSL_INCLUDE_DIR", appendFoundSuffix=False),