Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FetchContent to get qtextpad rather than keeping it in a submodule. #85

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,25 @@ jobs:
generator: Visual Studio 16 2019
cmake-arch: Win32
triplet: x86-windows-static-md
kf5: v5.106.0
kf5: v5.116.0
qt: 5.15.2
kf5_cmake_args: ""
qt-arch: win32_msvc2019
- os: windows-2019
generator: Visual Studio 16 2019
cmake-arch: x64
triplet: x64-windows-static-md
kf5: v5.106.0
kf5: v5.116.0
kf5_cmake_args: ""
qt: 5.15.2
qt_arch: win64_msvc2019_64
- os: windows-2019
generator: Visual Studio 16 2019
cmake-arch: x64
triplet: x64-windows-static-md
kf5: v5.106.0
kf5: v6.6.0
kf5_cmake_args: "-DBUILD_WITH_QT6=ON"
qt: 6.5.1
qt: 6.5.3
qt_arch: win64_msvc2019_64

steps:
Expand Down Expand Up @@ -108,14 +108,14 @@ jobs:

# Qt5 takes roughly a thousand years to build, so we download it from elsewhere...
- name: Install Qt
uses: jurplel/install-qt-action@v3
uses: jurplel/install-qt-action@v4
with:
arch: ${{ matrix.cfg.qt-arch }}
version: ${{ matrix.cfg.qt }}
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:
Expand All @@ -134,16 +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 }}

- uses: shogo82148/actions-setup-perl@v1
- name: Build KF5SyntaxHighlighting
- name: Build KSyntaxHighlighting
run: |
cd syntax-highlighting
mkdir build && cd build
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "pycdc"]
path = pycdc
url = https://github.com/zrax/pycdc
[submodule "qtextpad"]
path = qtextpad
url = https://github.com/zrax/qtextpad
21 changes: 13 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.14)
project(PlasmaShop)

set(CMAKE_CXX_STANDARD 14)
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -74,8 +74,13 @@ endif()
add_definitions(-DPLASMASHOP_VERSION="${PlasmaShop_VERSION}")

set(QTEXTPAD_WIDGET_ONLY ON)
add_subdirectory(qtextpad)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/qtextpad/lib")
include(FetchContent)
FetchContent_Declare(qtextpad
GIT_REPOSITORY https://github.com/zrax/qtextpad.git
GIT_TAG 1.11
)
FetchContent_MakeAvailable(qtextpad)
include_directories("${qtextpad_SOURCE_DIR}/lib")

add_subdirectory(src)

Expand Down
1 change: 0 additions & 1 deletion qtextpad
Submodule qtextpad deleted from c8e282