From 124760e1a38338bcc35dd515ea6335f2a1fad085 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 3 Apr 2019 17:32:17 +0200 Subject: [PATCH] Allow building without UDev on Linux Summary: Flatpak has been patching this for a while, there doesn't seem to be a way to use it there, so we better offer the option upstream. Test Plan: Been building and using solid on flatpak runtimes for a while. Reviewers: #frameworks, davidedmundson Reviewed By: davidedmundson Subscribers: asturmlechner, davidedmundson, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D20230 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db618ac..dcf43a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,8 @@ set_package_properties(BISON PROPERTIES PURPOSE "Required for the Predicate parser" ) -if (CMAKE_SYSTEM_NAME MATCHES Linux) +option(UDEV_DISABLED "Allows disabling UDev usage on Linux builds" OFF) +if (CMAKE_SYSTEM_NAME MATCHES Linux AND NOT UDEV_DISABLED) find_package( UDev ) if (UDev_FOUND) set(UDEV_FOUND TRUE) # for config-solid.h -- GitLab