mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-17 09:46:08 +08:00
Also import and use ECMOptionalAddSubdirectory.cmake to add other
module's as subdirectories, in case the directories exist. Additionally
this module allows to disable the build of submodules by passing e.g.
BUILD_qtsvg=OFF.
This probably needs more though on how to hande the intermodule dependencies,
but it's a start.
Task-number: QTBUG-75582
Change-Id: Ic3de9711d9b865b2d96bdaee0089f570408b9693
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
(cherry picked from commit 7509458d5f)
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
51 lines
1.4 KiB
CMake
51 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 3.15.0)
|
|
|
|
project(Qt
|
|
VERSION 6.0.0
|
|
DESCRIPTION "Qt Libraries"
|
|
HOMEPAGE_URL "https://qt.io/"
|
|
LANGUAGES CXX C ASM
|
|
)
|
|
|
|
# Required so we can call ctest from the root build directory
|
|
enable_testing()
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
if (NOT QT_BUILD_STANDALONE_TESTS)
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/qtbase/cmake")
|
|
endif()
|
|
|
|
include(ECMOptionalAddSubdirectory)
|
|
|
|
# Use the CMake config files from the binary dir
|
|
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")
|
|
# Also make sure the CMake config files do not recreate the already-existing targets
|
|
if (NOT QT_BUILD_STANDALONE_TESTS)
|
|
set(QT_NO_CREATE_TARGETS TRUE)
|
|
endif()
|
|
set(QT_SUPERBUILD TRUE)
|
|
|
|
# qtbase is always needed
|
|
add_subdirectory(qtbase)
|
|
|
|
if (NOT QT_BUILD_STANDALONE_TESTS)
|
|
list(APPEND CMAKE_PREFIX_PATH "${QtBase_BINARY_DIR}")
|
|
endif()
|
|
|
|
ecm_optional_add_subdirectory(qtconnectivty)
|
|
ecm_optional_add_subdirectory(qtdeclarative)
|
|
ecm_optional_add_subdirectory(qtgraphicaleffects)
|
|
ecm_optional_add_subdirectory(qtimageformats)
|
|
ecm_optional_add_subdirectory(qtsvg)
|
|
ecm_optional_add_subdirectory(qtquickcontrols2)
|
|
ecm_optional_add_subdirectory(qtgamepad)
|
|
ecm_optional_add_subdirectory(qttools)
|
|
|
|
|
|
if(NOT QT_BUILD_STANDALONE_TESTS)
|
|
# Display a summary of everything
|
|
include(QtBuildInformation)
|
|
qt_print_feature_summary()
|
|
qt_print_build_instructions()
|
|
endif()
|