Get rid of DESKTOP_APP_QT6
This commit is contained in:
parent
4b36e46448
commit
0702ef4cdd
4 changed files with 9 additions and 24 deletions
15
external/qt/package.cmake
vendored
15
external/qt/package.cmake
vendored
|
|
@ -5,11 +5,7 @@
|
|||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||
if (DESKTOP_APP_QT6)
|
||||
set(qt_version 6.3.1)
|
||||
else()
|
||||
set(qt_version 5.15.4)
|
||||
endif()
|
||||
set(qt_version $ENV{QT})
|
||||
|
||||
if (WIN32)
|
||||
set(qt_loc ${libs_loc}/Qt-${qt_version})
|
||||
|
|
@ -22,18 +18,21 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
|
|||
set(CMAKE_PREFIX_PATH ${qt_loc})
|
||||
endif()
|
||||
|
||||
if (DESKTOP_APP_QT6)
|
||||
if (NOT DEFINED QT_VERSION_MAJOR)
|
||||
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
|
||||
else()
|
||||
find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core)
|
||||
endif()
|
||||
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets Network Svg REQUIRED)
|
||||
|
||||
set(qt_version_6_or_greater 0)
|
||||
if (QT_VERSION_MAJOR GREATER_EQUAL 6)
|
||||
set(qt_version_6_or_greater 1)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core5Compat OpenGL OpenGLWidgets REQUIRED)
|
||||
endif()
|
||||
|
||||
# QtWaylandScanner cmake integration from Qt 6 is used
|
||||
cmake_dependent_option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration." OFF "LINUX; qt_version_6_or_greater" ON)
|
||||
|
||||
if (LINUX)
|
||||
if (NOT DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS WaylandClient REQUIRED)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ INTERFACE
|
|||
-Wno-missing-field-initializers
|
||||
-Wno-sign-compare
|
||||
-Wno-deprecated # implicit capture of 'this' via '[=]' is deprecated in C++20
|
||||
-Wno-deprecated-declarations # TODO: Remove when there will be no Qt 5 support
|
||||
)
|
||||
|
||||
target_compile_definitions(common_options
|
||||
|
|
@ -38,14 +39,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
)
|
||||
endif()
|
||||
|
||||
# TODO: Remove when there will be no Qt 5 support
|
||||
if (DESKTOP_APP_QT6)
|
||||
target_compile_options(common_options
|
||||
INTERFACE
|
||||
-Wno-deprecated-declarations
|
||||
)
|
||||
endif()
|
||||
|
||||
if (DESKTOP_APP_SPECIAL_TARGET)
|
||||
target_compile_options(common_options
|
||||
INTERFACE
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ if (EXISTS ${libs_loc})
|
|||
endif()
|
||||
|
||||
cmake_dependent_option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." OFF libs_loc_exists ON)
|
||||
cmake_dependent_option(DESKTOP_APP_QT6 "Build with Qt 6." ON "NOT WIN32" OFF)
|
||||
|
||||
function(report_bad_special_target)
|
||||
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
|
||||
|
|
@ -65,11 +64,7 @@ endfunction()
|
|||
|
||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "Minimum macOS deployment version" FORCE)
|
||||
if (DESKTOP_APP_QT6)
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Target macOS architectures" FORCE)
|
||||
else()
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Target macOS architectures" FORCE)
|
||||
endif()
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Target macOS architectures" FORCE)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ endif()
|
|||
option(DESKTOP_APP_LOTTIE_USE_CACHE "Use caching in lottie animations." ON)
|
||||
cmake_dependent_option(DESKTOP_APP_DISABLE_DBUS_INTEGRATION "Disable all code for D-Bus integration." OFF LINUX ON)
|
||||
cmake_dependent_option(DESKTOP_APP_DISABLE_X11_INTEGRATION "Disable all code for X11 integration." OFF LINUX ON)
|
||||
# QtWaylandScanner cmake integration from Qt 6 is used
|
||||
cmake_dependent_option(DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION "Disable all code for Wayland integration." OFF "LINUX; DESKTOP_APP_QT6" ON)
|
||||
cmake_dependent_option(DESKTOP_APP_USE_ALLOCATION_TRACER "Use simple allocation tracer." OFF LINUX OFF)
|
||||
cmake_dependent_option(DESKTOP_APP_USE_PACKAGED_LAZY "Bundle recommended Qt plugins for self-contained packages." OFF LINUX OFF)
|
||||
option(DESKTOP_APP_USE_PACKAGED_FONTS "Use preinstalled fonts instead of bundled patched ones." OFF)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue