diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index dda19398b..1e304b88e 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -39,7 +39,10 @@ if(NOT SAILFISHOS) add_subdirectory(virtualmonitor) if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - add_subdirectory(mmtelephony) + find_package(KF5ModemManagerQt ${KF5_MIN_VERSION}) + if (TARGET KF5::ModemManagerQt) + add_subdirectory(mmtelephony) + endif() endif() if(NOT WIN32) diff --git a/plugins/mmtelephony/CMakeLists.txt b/plugins/mmtelephony/CMakeLists.txt index 1fd9afe1e..c792b4c7c 100644 --- a/plugins/mmtelephony/CMakeLists.txt +++ b/plugins/mmtelephony/CMakeLists.txt @@ -1,4 +1,3 @@ -find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS ModemManagerQt) set(debug_file_SRCS) ecm_qt_declare_logging_category( debug_file_SRCS HEADER plugin_mmtelephony_debug.h