chore(cpn): upgrade to Ubuntu 22.04 and Qt 6.9.0 (#5986)

Co-authored-by: elecpower <elecpower@users.noreply.github.com>
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
This commit is contained in:
Neil Horne
2025-07-23 14:04:19 +02:00
committed by GitHub
co-authored by elecpower raphaelcoeffic
parent 7264b28e62
commit 9e86a3ea84
117 changed files with 4221 additions and 5155 deletions
+16 -18
View File
@@ -1,29 +1,27 @@
if(APPLE AND DEFINED ENV{HOMEBREW_PREFIX} AND EXISTS $ENV{HOMEBREW_PREFIX}/opt/qt@5)
if(APPLE AND DEFINED ENV{HOMEBREW_PREFIX})
# If Homebrew is used, HOMEBREW_PREFIX should be defined
list(APPEND CMAKE_PREFIX_PATH "$ENV{HOMEBREW_PREFIX}/opt/qt@5")
if(EXISTS $ENV{HOMEBREW_PREFIX}/opt/qt@6)
list(APPEND CMAKE_PREFIX_PATH "$ENV{HOMEBREW_PREFIX}/opt/qt@6")
endif()
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt6 REQUIRED COMPONENTS Core)
find_package(Qt5Core QUIET)
find_package(Qt5Widgets QUIET)
find_package(Qt5Xml QUIET)
find_package(Qt5LinguistTools QUIET)
find_package(Qt5PrintSupport QUIET)
find_package(Qt5Multimedia QUIET)
find_package(Qt5Svg QUIET)
find_package(Qt5SerialPort QUIET)
if(Qt6_FOUND)
message(STATUS "Qt Version: ${Qt6_VERSION}")
if(Qt5Core_FOUND)
message(STATUS "Qt Version: ${Qt5Core_VERSION}")
# call after Qt6Core package is found
qt_standard_project_setup()
find_package(Qt6 REQUIRED COMPONENTS Widgets LinguistTools Multimedia PrintSupport SerialPort Svg Xml)
### Get locations of Qt binary executables & libs (libs are for distros, not for linking)
# first set up some hints
get_target_property(QtCore_LOCATION Qt5::Core LOCATION)
get_filename_component(qt_core_path ${QtCore_LOCATION} PATH)
get_target_property(QtCore_LOCATION Qt::Core LOCATION)
cmake_path(GET QtCore_LOCATION ROOT_PATH qt_core_path)
if(APPLE)
get_filename_component(qt_core_path "${qt_core_path}/.." ABSOLUTE)
set(qt_core_path "${qt_core_path}/..")
cmake_path(ABSOLUTE_PATH qt_core_path OUTPUT_VARIABLE qt_core_path)
endif()
set(QT_LIB_DIR ${qt_core_path} CACHE PATH "Path to Qt libraries (.dll|.framework|.so).")
@@ -63,5 +61,5 @@ if(Qt5Core_FOUND)
list(APPEND APP_COMMON_DEFINES -DAPP_DBG_HANDLER_ENABLE=0)
endif()
else()
message(WARNING "Qt not found! Companion and Simulator builds disabled.")
message(WARNING "Required Qt version not found! Companion, Simulator and libsim builds disabled.")
endif()