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:
co-authored by
elecpower
raphaelcoeffic
parent
7264b28e62
commit
9e86a3ea84
@@ -5,7 +5,7 @@ include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
maxLibQt
|
||||
GIT_REPOSITORY https://github.com/edgetx/maxLibQt
|
||||
GIT_TAG ac1988ffd005cd15a8449b92150ce6c08574a4f1
|
||||
GIT_TAG 6dfbfc41e258cd2446e1fd1f547e6c5d742aa2c0
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(maxLibQt)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# - try to find libssl-1 library
|
||||
|
||||
if (DEFINED ENV{LIBSSL1_ROOT_DIR})
|
||||
set(LIBSSL1_ROOT_DIR "$ENV{LIBSSL1_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
find_library(LIBSSL1_LIBRARY
|
||||
NAMES
|
||||
libssl.so.1.1
|
||||
libssl-1_1.dll
|
||||
libssl-1_1.dylib
|
||||
HINTS
|
||||
"${LIBSSL1_ROOT_DIR}")
|
||||
|
||||
get_filename_component(LIBSSL1_LIBRARY_PATH ${LIBSSL1_LIBRARY} PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBSSL1
|
||||
DEFAULT_MSG
|
||||
LIBSSL1_LIBRARY_PATH)
|
||||
|
||||
if(LIBSSL1_FOUND)
|
||||
set(LIBSSL1_LIBRARY_DIR "${LIBSSL1_LIBRARY_PATH}")
|
||||
mark_as_advanced(LIBSSL1_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBSSL1_LIBRARY_PATH)
|
||||
@@ -16,16 +16,9 @@ find_library(LIBUSB1_LIBRARY
|
||||
HINTS
|
||||
"${LIBUSB1_ROOT_DIR}")
|
||||
|
||||
get_filename_component(LIBUSB1_LIBRARY_PATH ${LIBUSB1_LIBRARY} PATH)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LIBUSB1
|
||||
DEFAULT_MSG
|
||||
LIBUSB1_LIBRARY_PATH)
|
||||
LIBUSB1_LIBRARY)
|
||||
|
||||
if(LIBUSB1_FOUND)
|
||||
set(LIBUSB1_LIBRARY_DIR "${LIBUSB1_LIBRARY_PATH}")
|
||||
mark_as_advanced(LIBUSB1_ROOT_DIR)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(LIBUSB1_LIBRARY_PATH)
|
||||
mark_as_advanced(LIBUSB1_LIBRARY)
|
||||
|
||||
@@ -24,19 +24,20 @@ else()
|
||||
message(STATUS "SDL not found! Simulator audio, and joystick inputs, will not work.")
|
||||
endif()
|
||||
|
||||
if(Qt5Core_FOUND AND NOT DISABLE_COMPANION)
|
||||
if(Qt6Core_FOUND AND NOT DISABLE_COMPANION)
|
||||
# environment variable set in github workflows and build-edgetx Dockerfile
|
||||
if(DEFINED ENV{LIBUSB1_ROOT_DIR})
|
||||
set(LIBUSB1_ROOT_DIR "$ENV{LIBUSB1_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
find_package(Libusb1)
|
||||
|
||||
if(LIBUSB1_FOUND)
|
||||
find_package(Dfuutil)
|
||||
endif()
|
||||
|
||||
if(LINUX)
|
||||
find_package(Libssl1)
|
||||
endif()
|
||||
|
||||
# OpenSSL
|
||||
# environment variable set in github workflows and build-edgetx Dockerfile
|
||||
if (DEFINED ENV{OPENSSL_ROOT_DIR})
|
||||
if(DEFINED ENV{OPENSSL_ROOT_DIR})
|
||||
set(OPENSSL_ROOT_DIR "$ENV{OPENSSL_ROOT_DIR}")
|
||||
endif()
|
||||
|
||||
@@ -61,7 +62,7 @@ add_custom_target(tests-radio
|
||||
DEPENDS gtests-radio
|
||||
)
|
||||
|
||||
if(Qt5Core_FOUND AND NOT DISABLE_COMPANION)
|
||||
if(Qt6Core_FOUND AND NOT DISABLE_COMPANION)
|
||||
add_subdirectory(${COMPANION_SRC_DIRECTORY})
|
||||
add_custom_target(tests-companion
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gtests-companion
|
||||
|
||||
+16
-18
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user