Skip to content

Commit ef9c27b

Browse files
committed
Remove Qt5 from build and test environment
1 parent 2c5bafd commit ef9c27b

File tree

5 files changed

+6
-99
lines changed

5 files changed

+6
-99
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,7 @@ on:
66
release:
77

88
jobs:
9-
qt5:
10-
name: Build with Qt 5
11-
runs-on: ubuntu-22.04
12-
steps:
13-
14-
- uses: actions/checkout@v2
15-
with:
16-
submodules: true
17-
fetch-depth: 0
18-
19-
- uses: actions/checkout@v2
20-
with:
21-
repository: happycube/ld-decode-testdata
22-
path: testdata
23-
24-
- name: Install dependencies
25-
timeout-minutes: 10
26-
run: |
27-
sudo apt-get update
28-
# Based on: https://github.com/happycube/ld-decode/wiki/Installation
29-
# Added: cmake libqt5opengl5-dev libqt5svg5-dev
30-
sudo apt-get install -y --no-install-recommends git cmake make python3-setuptools python3-numpy python3-scipy python3-matplotlib git libqt5opengl5-dev libqt5svg5-dev libqwt-qt5-dev libfftw3-dev python3-numba libavformat-dev libavcodec-dev libavutil-dev ffmpeg libsqlite3-dev libqt5sql5-sqlite
31-
32-
- name: Set up build dir
33-
timeout-minutes: 1
34-
run: mkdir obj
35-
36-
- name: Configure
37-
timeout-minutes: 5
38-
run: cd obj && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_QT_VERSION=5 ..
39-
40-
- name: Build
41-
timeout-minutes: 15
42-
run: make -C obj VERBOSE=1
43-
44-
- name: Install
45-
timeout-minutes: 5
46-
run: make -C obj install DESTDIR=/tmp/staging && ls -lR /tmp/staging
47-
48-
- name: Run tests
49-
timeout-minutes: 10
50-
run: cd obj && ctest --output-on-failure
51-
529
qt6:
53-
# XXX This builds without Qwt as Ubuntu 22.04 doesn't have it for Qt 6
5410
name: Build with Qt 6
5511
runs-on: ubuntu-22.04
5612
steps:
@@ -79,7 +35,7 @@ jobs:
7935

8036
- name: Configure
8137
timeout-minutes: 5
82-
run: cd obj && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_QT_VERSION=6 -DUSE_QWT=OFF ..
38+
run: cd obj && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
8339

8440
- name: Build
8541
timeout-minutes: 15

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ DartConfiguration.tcl
7373
Makefile
7474
Testing/
7575
build-*/
76+
obj/
7677
cmake_install.cmake
7778
compile_commands.json
7879
install_manifest.txt

CMakeLists.txt

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ if(MSVC)
1818
add_compile_options(/permissive-)
1919
endif()
2020

21-
set(USE_QT_VERSION "" CACHE STRING
22-
"Version of Qt to use, 5 or 6 (Which is used by default can vary due to how cmake find functions work, but will often default to Qt6)"
23-
)
24-
2521
option(BUILD_LDF_READER
2622
"build ld_ldf_reader"
2723
ON
@@ -39,28 +35,9 @@ set(CMAKE_AUTOMOC ON)
3935
include(GNUInstallDirs)
4036
set(CMAKE_AUTOUIC ON)
4137

42-
set(QT_PACKAGE_NAMES Qt5 Qt6)
43-
if(USE_QT_VERSION)
44-
set(QT_PACKAGE_NAMES Qt${USE_QT_VERSION})
45-
endif()
46-
find_package(QT NAMES ${QT_PACKAGE_NAMES} REQUIRED COMPONENTS Core)
47-
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Gui Widgets Sql)
38+
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Sql)
4839
message(STATUS "Qt Version: ${QT_VERSION}")
4940

50-
# For Qt < 5.15, emulate 5.15's Qt5CoreConfig.cmake, so we don't have to
51-
# specify Qt5/Qt6 elsewhere.
52-
if(QT_VERSION VERSION_LESS 5.15)
53-
function(qt_add_resources outfiles)
54-
qt5_add_resources("${outfiles}" ${ARGN})
55-
set("${outfiles}" "${${outfiles}}" PARENT_SCOPE)
56-
endfunction()
57-
foreach(library Core Gui Widgets)
58-
add_library(Qt::${library} INTERFACE IMPORTED)
59-
set_target_properties(Qt::${library} PROPERTIES
60-
INTERFACE_LINK_LIBRARIES "Qt5::${library}")
61-
endforeach()
62-
endif()
63-
6441
find_package(PkgConfig REQUIRED)
6542

6643
if(NOT MSVC)

prototypes/ld-process-efm/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 3.16)
22

33
project(ld-process-efm)
44

5-
# Find Qt5
6-
find_package(Qt5 REQUIRED COMPONENTS Core)
5+
find_package(Qt6 REQUIRED COMPONENTS Core)
76

87
add_executable(ld-process-efm
98
efmprocess.cpp
@@ -35,6 +34,6 @@ target_compile_definitions(ld-process-efm PRIVATE
3534
APP_COMMIT="unknown"
3635
)
3736

38-
target_link_libraries(ld-process-efm PRIVATE Qt5::Core)
37+
target_link_libraries(ld-process-efm PRIVATE Qt6::Core)
3938

4039
install(TARGETS ld-process-efm)

tools/efm-decoder/CMakeLists.txt

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,7 @@ cmake_minimum_required(VERSION 3.10)
33
# Set the project name
44
project(efm-tools)
55

6-
# Handle Qt version selection - default to Qt5 for backward compatibility
7-
if(NOT DEFINED USE_QT_VERSION)
8-
set(USE_QT_VERSION 5)
9-
endif()
10-
11-
# Find Qt components based on version
12-
if(USE_QT_VERSION EQUAL 6)
13-
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
14-
# Create aliases for compatibility
15-
if(NOT TARGET Qt::Core AND TARGET Qt6::Core)
16-
add_library(Qt::Core ALIAS Qt6::Core)
17-
endif()
18-
if(NOT TARGET Qt::Widgets AND TARGET Qt6::Widgets)
19-
add_library(Qt::Widgets ALIAS Qt6::Widgets)
20-
endif()
21-
set(QT_VERSION_MAJOR 6)
22-
else()
23-
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
24-
# Create aliases for modern CMake target names
25-
if(NOT TARGET Qt::Core AND TARGET Qt5::Core)
26-
add_library(Qt::Core ALIAS Qt5::Core)
27-
endif()
28-
if(NOT TARGET Qt::Widgets AND TARGET Qt5::Widgets)
29-
add_library(Qt::Widgets ALIAS Qt5::Widgets)
30-
endif()
31-
set(QT_VERSION_MAJOR 5)
32-
endif()
6+
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
337

348
# Get the Git branch and revision
359
execute_process(

0 commit comments

Comments
 (0)