From 6dab24bc7467e58df1d537af35153e9a74d7b674 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Fri, 24 Sep 2021 17:03:51 +0200 Subject: [PATCH] Search for syntax-highlighting qml module It's an optional part of syntax-highlighting so just searching for the it is not enough we need to make sure to have the qml module. Also don't link to it, we only need it at runtime. --- CMakeLists.txt | 3 ++- src/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8a9a1d65..d48fbe46d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,10 +72,11 @@ if(ANDROID) ) else() find_package(Qt5 ${QT_MIN_VERSION} COMPONENTS Widgets) - find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle ConfigWidgets KIO WindowSystem Sonnet SyntaxHighlighting) + find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle ConfigWidgets KIO WindowSystem Sonnet) set_package_properties(KF5QQC2DesktopStyle PROPERTIES TYPE RUNTIME ) + ecm_find_qmlmodule(org.kde.syntaxhighlighting 1.0) endif() if (NOT ANDROID AND NOT WIN32 AND NOT APPLE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8774c8b26..b88b757e5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -60,7 +60,7 @@ if(NOT ANDROID) endif() target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR}) -target_link_libraries(neochat PRIVATE Qt::Quick Qt::Qml Qt::Gui Qt::Network Qt::QuickControls2 KF5::I18n KF5::Kirigami2 KF5::Notifications KF5::ConfigCore KF5::ConfigGui KF5::CoreAddons KF5::SyntaxHighlighting Quotient cmark::cmark ${QTKEYCHAIN_LIBRARIES}) +target_link_libraries(neochat PRIVATE Qt::Quick Qt::Qml Qt::Gui Qt::Network Qt::QuickControls2 KF5::I18n KF5::Kirigami2 KF5::Notifications KF5::ConfigCore KF5::ConfigGui KF5::CoreAddons Quotient cmark::cmark ${QTKEYCHAIN_LIBRARIES}) kconfig_add_kcfg_files(neochat GENERATE_MOC neochatconfig.kcfgc) if(NEOCHAT_FLATPAK)