From a3d40aaafaf8b52d916a4f4d03615a4b6013c215 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 9 Oct 2024 14:30:53 -0700 Subject: [PATCH] Use KF6 with Qt6, to match what qtextpad expects --- .github/workflows/ci.yml | 8 ++++---- CMakeLists.txt | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2090c3..e2a99ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,7 +115,7 @@ jobs: dir: ${{ github.workspace }}\qt cache: true - # KF5SyntaxHighlighting and ecm release in lock-step + # KSyntaxHighlighting and ecm release in lock-step - name: Checkout ECM uses: actions/checkout@v4 with: @@ -134,15 +134,15 @@ jobs: cmake --build . --config Release -j 2 cmake --build . --config Release --target INSTALL - # Build KF5SyntaxHighlighting manually due to Qt dependency... - - name: Checkout KF5SyntaxHighlighting + # Build KSyntaxHighlighting manually due to Qt dependency... + - name: Checkout KSyntaxHighlighting uses: actions/checkout@v4 with: repository: KDE/syntax-highlighting path: syntax-highlighting ref: ${{ matrix.cfg.kf5 }} - - name: Build KF5SyntaxHighlighting + - name: Build KSyntaxHighlighting run: | cd syntax-highlighting mkdir build && cd build diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e03114..c8571f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,11 +30,11 @@ if(Qt5_FOUND AND NOT TARGET Qt::Core) endforeach() endif() -find_package(KF5SyntaxHighlighting REQUIRED) -if(KF5SyntaxHighlighting_VERSION VERSION_LESS "5.39.0") - message(WARNING "KF5SyntaxHighlighting version 5.39.0 or later is required \ -in order to use custom highlighting rules. KF5SyntaxHighlighting version \ -${KF5SyntaxHighlighting_VERSION} was detected, so these rules will be unavailable.") +find_package(KF${QT_VERSION_MAJOR}SyntaxHighlighting REQUIRED) +if(KF${QT_VERSION_MAJOR}SyntaxHighlighting_VERSION VERSION_LESS "5.39.0") + message(WARNING "KSyntaxHighlighting version 5.39.0 or later is required \ +in order to use custom highlighting rules. KSyntaxHighlighting version \ +${KFSyntaxHighlighting_VERSION} was detected, so these rules will be unavailable.") add_definitions("-DKSYN_NO_CUSTOM_RULES_SUPPORT") endif()