Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Browse files Browse the repository at this point in the history
This changes many different CMake places to mention Qt6 instead of
Qt5.

Note that some old qt5 cmake config files in corelib are probably not
needed anymore, but I still renamed and kept them for now.

Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
  • Loading branch information
alcroito committed Jun 14, 2019
2 parents 72066a3 + ae97d11 commit fe3bd21
Show file tree
Hide file tree
Showing 431 changed files with 2,890 additions and 2,328 deletions.
2 changes: 1 addition & 1 deletion .qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ CONFIG += warning_clean
QT_SOURCE_TREE = $$PWD
QT_BUILD_TREE = $$shadowed($$PWD)

MODULE_VERSION = 5.14.0
MODULE_VERSION = 6.0.0
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.15.0)

project(QtBase
VERSION 5.14.0
VERSION 6.0.0
DESCRIPTION "Qt Base Libraries"
HOMEPAGE_URL "https://qt.io/"
LANGUAGES CXX C ASM
Expand Down
4 changes: 2 additions & 2 deletions cmake/QtBaseGlobalTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(__GlobalConfig_path_suffix "${INSTALL_CMAKE_NAMESPACE}")
qt_path_join(__GlobalConfig_build_dir ${QT_CONFIG_BUILD_DIR} ${__GlobalConfig_path_suffix})
qt_path_join(__GlobalConfig_install_dir ${QT_CONFIG_INSTALL_DIR} ${__GlobalConfig_path_suffix})

# Generate and install Qt5 config file.
# Generate and install Qt6 config file.
configure_package_config_file(
"${PROJECT_SOURCE_DIR}/cmake/QtConfig.cmake.in"
"${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}Config.cmake"
Expand All @@ -34,7 +34,7 @@ write_basic_package_version_file(
COMPATIBILITY AnyNewerVersion
)

# Generate and install Qt5Tools config file.
# Generate and install Qt6Tools config file.
configure_package_config_file(
"${PROJECT_SOURCE_DIR}/cmake/QtToolsConfig.cmake.in"
"${__GlobalConfig_build_dir}/${INSTALL_CMAKE_NAMESPACE}ToolsConfig.cmake"
Expand Down
14 changes: 7 additions & 7 deletions cmake/QtBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ endfunction()
# When doing qt_internal_module_info(foo Core) this method will set
# the following variables in the caller's scope:
# * foo with the value "QtCore"
# * foo_versioned with the value "Qt5Core" (based on major Qt version)
# * foo_versioned with the value "Qt6Core" (based on major Qt version)
# * foo_upper with the value "CORE"
# * foo_lower with the value "core"
# * foo_include_dir with the module's include directory in the binary tree
Expand Down Expand Up @@ -775,7 +775,7 @@ function(qt_register_target_dependencies target public_libs private_libs)
OR lib STREQUAL PlatformModuleInternal
OR lib STREQUAL PlatformPluginInternal
OR lib STREQUAL PlatformToolInternal)
list(APPEND target_deps "Qt5\;${PROJECT_VERSION}")
list(APPEND target_deps "Qt6\;${PROJECT_VERSION}")
elseif ("${lib}" MATCHES "(.*)Private")
list(APPEND target_deps "${INSTALL_CMAKE_NAMESPACE}${CMAKE_MATCH_1}\;${PROJECT_VERSION}")
else()
Expand Down Expand Up @@ -1250,8 +1250,8 @@ function(add_qt_module target)

if(target STREQUAL Core)
# Propagate non-build related variables that are needed for consuming Qt packages.
# Do this in CoreConfig instead of Qt5Config, so that consumers can also use
# find_package(Qt5Core) instead of find_package(Qt5 COMPONENTS Core)
# Do this in CoreConfig instead of Qt6Config, so that consumers can also use
# find_package(Qt6Core) instead of find_package(Qt6 COMPONENTS Core)
string(APPEND extra_cmake_code "
set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
endif()
Expand Down Expand Up @@ -1718,7 +1718,7 @@ function(add_qt_tool name)
endif()

if(arg_TOOLS_TARGET AND NOT QT_WILL_BUILD_TOOLS)
set(tools_package_name "Qt5${arg_TOOLS_TARGET}Tools")
set(tools_package_name "Qt6${arg_TOOLS_TARGET}Tools")
message(STATUS "Searching for tool '${full_name}' in package ${tools_package_name}.")

# Only search in path provided by QT_HOST_PATH. We need to do it with CMAKE_PREFIX_PATH
Expand All @@ -1728,7 +1728,7 @@ function(add_qt_tool name)
set(CMAKE_PREFIX_PATH "${QT_HOST_PATH}")

# Search both with sysroots prepended as well as in the host system. When cross compiling
# the mode_package might be set to ONLY only, and the Qt5 tools packages are actually
# the mode_package might be set to ONLY only, and the Qt6 tools packages are actually
# in the host system.
set(BACKUP_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${CMAKE_FIND_ROOT_PATH_MODE_PACKAGE})
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE "BOTH")
Expand Down Expand Up @@ -1944,7 +1944,7 @@ function(add_qt_simd_part target)
endif()
endfunction()

# From Qt5CoreMacros
# From Qt6CoreMacros
# Function used to create the names of output files preserving relative dirs
function(qt_make_output_file infile prefix suffix source_dir binary_dir result)
get_filename_component(outfilename "${infile}" NAME_WE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ macro(qt_build_repo)
# Do this before adding src, because there might be test related conditions
# in source.
if (BUILD_TESTING)
find_package(Qt5 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test)
endif()

if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt")
Expand Down
2 changes: 1 addition & 1 deletion cmake/QtConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@PACKAGE_INIT@

# Slightly amended version of ./src/corelib/Qt5Config.cmake.in
# Slightly amended version of ./src/corelib/Qt6Config.cmake.in
if (CMAKE_VERSION VERSION_LESS 3.1.0)
message(FATAL_ERROR "Qt requires at least CMake version 3.1.0")
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/QtModuleDependencies.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ foreach(_target_dep ${_tool_deps})
endif()
endforeach()

# note: target_deps example: "Qt5Core\;5.12.0;Qt5Gui\;5.12.0"
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
set(_target_deps "@target_deps@")
foreach(_target_dep ${_target_deps})
list(GET _target_dep 0 pkg)
Expand Down
4 changes: 2 additions & 2 deletions cmake/QtPlatformAndroid.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ function(qt_android_generate_deployment_settings target)

# Host Qt Android install path
if (NOT QT_BUILDING_QT)
set(file_check "${Qt5_DIR}/plugins/platforms/android/libqtforandroid.so")
set(file_check "${Qt6_DIR}/plugins/platforms/android/libqtforandroid.so")
if (NOT EXISTS ${file_check})
message(SEND_ERROR "Detected Qt installation does not contain libqtforandroid.so. This is most likely due to the installation not being a build of Qt for Android. Please update your settings.")
return()
endif()
set(qt_android_install_dir ${Qt5_Dir})
set(qt_android_install_dir ${Qt6_Dir})
else()
# Building from source, use the same install prefix
set(qt_android_install_dir ${CMAKE_INSTALL_PREFIX})
Expand Down
2 changes: 1 addition & 1 deletion cmake/QtPluginDependencies.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endforeach()
# Restore old module path.
set(CMAKE_MODULE_PATH "${old_CMAKE_MODULE_PATH}")

# note: target_deps example: "Qt5Core\;5.12.0;Qt5Gui\;5.12.0"
# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0"
set(_target_deps "@target_deps@")
foreach(_target_dep ${_target_deps})
list(GET _target_dep 0 pkg)
Expand Down
2 changes: 1 addition & 1 deletion cmake/QtSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()

# Appends a 'debug postfix' to library targets (not executables)
# e.g. lib/libQt5DBus_debug.5.12.0.dylib
# e.g. lib/libQt6DBus_debug.5.12.0.dylib
if(WIN32)
set(CMAKE_DEBUG_POSTFIX "d")
elseif(APPLE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CMake has a ninja backend that works quite well and is noticeably faster than ma
cmake --build . # ... or ninja ;-)
```

You can look into the generated ``build.ninja`` file if you're curious and you can also build targets directory such as ``ninja lib/libQt5Core.so``.
You can look into the generated ``build.ninja`` file if you're curious and you can also build targets directory such as ``ninja lib/libQt6Core.so``.

When you're done with the build, you may want to install it, using ``ninja install`` or ``make install``. The installation prefix is chosen when running cmake though:

Expand Down
4 changes: 2 additions & 2 deletions examples/corelib/ipc/localfortuneclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(localfortuneclient
client.cpp client.h
Expand Down
4 changes: 2 additions & 2 deletions examples/corelib/ipc/localfortuneserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(localfortuneserver
main.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/ipc/sharedmemory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(sharedmemory
dialog.cpp dialog.h dialog.ui
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(mimetypebrowser
main.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/serialization/cbordump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Core)
find_package(Qt6 COMPONENTS Core)

add_executable(cbordump
main.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/serialization/convert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Core)
find_package(Qt6 COMPONENTS Core)

add_executable(convert
cborconverter.cpp cborconverter.h
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/serialization/savegame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Core)
find_package(Qt6 COMPONENTS Core)

add_executable(savegame
character.cpp character.h
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/threads/mandelbrot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(mandelbrot
main.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/threads/queuedcustomtype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(queuedcustomtype
block.cpp block.h
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/threads/semaphores/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Core)
find_package(Qt6 COMPONENTS Core)

add_executable(semaphores
semaphores.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/threads/waitconditions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Core)
find_package(Qt6 COMPONENTS Core)

add_executable(waitconditions
waitconditions.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/tools/contiguouscache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(contiguouscache
main.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/tools/customtype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(customtype
main.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/tools/customtypesending/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(customtypesending
main.cpp
Expand Down
4 changes: 2 additions & 2 deletions examples/dbus/chat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS DBus)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS DBus)
find_package(Qt6 COMPONENTS Widgets)

# special case begin
set(chat_SRCS)
Expand Down
2 changes: 1 addition & 1 deletion examples/dbus/complexpingpong/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS DBus)
find_package(Qt6 COMPONENTS DBus)

add_qt_gui_executable(complexpong
complexpong.cpp complexpong.h
Expand Down
2 changes: 1 addition & 1 deletion examples/dbus/listnames/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS DBus)
find_package(Qt6 COMPONENTS DBus)

add_qt_gui_executable(listnames
listnames.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/dbus/pingpong/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS DBus)
find_package(Qt6 COMPONENTS DBus)

add_qt_gui_executable(pong
ping-common.h
Expand Down
4 changes: 2 additions & 2 deletions examples/dbus/remotecontrolledcar/car/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS DBus)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS DBus)
find_package(Qt6 COMPONENTS Widgets)

# special case begin
set(car_SRCS)
Expand Down
4 changes: 2 additions & 2 deletions examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS DBus)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS DBus)
find_package(Qt6 COMPONENTS Widgets)

# special case begin
set(controller_SRCS)
Expand Down
2 changes: 1 addition & 1 deletion examples/embedded/digiflip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(digiflip
digiflip.cpp
Expand Down
2 changes: 1 addition & 1 deletion examples/embedded/flickable/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(flickable
flickable.cpp flickable.h
Expand Down
4 changes: 2 additions & 2 deletions examples/embedded/flightinfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(flightinfo
flightinfo.cpp
Expand Down
4 changes: 2 additions & 2 deletions examples/embedded/lightmaps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Network)
find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(lightmaps
lightmaps.cpp lightmaps.h
Expand Down
2 changes: 1 addition & 1 deletion examples/embedded/raycasting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(CMAKE_AUTOUIC ON)

set(INSTALL_EXAMPLEDIR "examples")

find_package(Qt5 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Widgets)

add_qt_gui_executable(raycasting
raycasting.cpp raycasting.qrc
Expand Down
Loading

0 comments on commit fe3bd21

Please sign in to comment.