Skip to content

Commit 0ce1103

Browse files
committed
Migrate to CMake 3.10
1 parent dad977b commit 0ce1103

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ on:
99
- main
1010

1111
jobs:
12-
install-dependencies:
12+
13+
14+
build-qt5:
1315
runs-on: ubuntu-latest
1416
steps:
1517
- name: Checkout repository
@@ -20,18 +22,6 @@ jobs:
2022
sudo apt-get update
2123
sudo apt-get install -y build-essential cmake qtcreator qtbase5-dev libqt5serialport5 libqt5serialport5-dev
2224
23-
- name: Install Qt6 dependencies
24-
run: |
25-
sudo apt-get update
26-
sudo apt-get install -y qt6-base-dev qt6-declarative-dev qt6-serialport-dev
27-
28-
build-qt5:
29-
runs-on: ubuntu-latest
30-
needs: install-dependencies
31-
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@v3
34-
3525
- name: Configure CMake for Qt5
3626
run: cmake -B build_qt5 -DQT_VERSION=5
3727

@@ -61,6 +51,11 @@ jobs:
6151
- name: Checkout repository
6252
uses: actions/checkout@v3
6353

54+
- name: Install Qt5 runtime dependencies
55+
run: |
56+
sudo apt-get update
57+
sudo apt-get install -y libqt5core5a libqt5gui5 libqt5network5 libqt5serialport5 libqt5widgets5 python3
58+
6459
- name: Download Qt5 build artifacts
6560
uses: actions/download-artifact@v3
6661
with:
@@ -92,11 +87,15 @@ jobs:
9287

9388
build-qt6:
9489
runs-on: ubuntu-latest
95-
needs: install-dependencies
9690
steps:
9791
- name: Checkout repository
9892
uses: actions/checkout@v3
9993

94+
- name: Install Qt6 dependencies
95+
run: |
96+
sudo apt-get update
97+
sudo apt-get install -y build-essential cmake qtcreator qt6-base-dev qt6-declarative-dev qt6-serialport-dev
98+
10099
- name: Configure CMake for Qt6
101100
run: cmake -B build_qt6 -DQT_VERSION=6
102101

@@ -126,6 +125,11 @@ jobs:
126125
- name: Checkout repository
127126
uses: actions/checkout@v3
128127

128+
- name: Install Qt6 runtime dependencies
129+
run: |
130+
sudo apt-get update
131+
sudo apt-get install -y libqt6core6 libqt6gui6 libqt6network6 libqt6serialport6 libqt6widgets6 python3
132+
129133
- name: Download Qt6 build artifacts
130134
uses: actions/download-artifact@v3
131135
with:

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.10)
22

33
project(qCommTest LANGUAGES CXX)
44

@@ -12,11 +12,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1212

1313
# Find Qt
1414
if(QT_VERSION EQUAL 6)
15-
find_package(Qt6 COMPONENTS Core Gui Network SerialPort Widgets)
15+
find_package(Qt6 COMPONENTS Core Gui Network SerialPort Widgets REQUIRED)
1616
set(QT_LIBS Qt6::Core Qt6::Gui Qt6::Network Qt6::SerialPort Qt6::Widgets)
1717
message(STATUS "Using Qt 6")
1818
elseif(QT_VERSION EQUAL 5)
19-
find_package(Qt5 COMPONENTS Core Gui Network SerialPort Widgets)
19+
find_package(Qt5 COMPONENTS Core Gui Network SerialPort Widgets REQUIRED)
2020
set(QT_LIBS Qt5::Core Qt5::Gui Qt5::Network Qt5::SerialPort Qt5::Widgets)
2121
message(STATUS "Using Qt 5")
2222
else()

0 commit comments

Comments
 (0)