From b8fb47478db06cac231a8a7222e7afbce7b3cf90 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 1 Feb 2021 10:48:07 +0100 Subject: Setup cmake project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the top level cmake project and ninja and gn cmake builds. Make ninja and gn build optional. With qmake we had four stages during the build: * configure (initial dependencies check) * qmake (build ninja, build gn, run gn) * make (compilation) * make install With cmake we have some limitations: a) we need to pass the build config to gn, however cmake evaluates generator expressions during the generation phase this means we need a recursive call to cmake b) qt-cmake qtbase logic (+syncqt) assumes "fixed" build locations to handle deployment of headers and libs (it uses CMAKE_BINARY_DIR for QT_BUILD_DIR) c) cmake can not run twice in the same build directory d) running recursive/child cmake, makes all generated targets not accessible during configure time of parent's cmake e) cmake can only "build" things for subdirectories To deal with mentioned limitations and to keep things simple we will split those steps into separate projects: * SUPERBUILD - this project does dependency checks, only evaluates features to show the build summary and passes them to EXAMPLES,LIBS,TESTS projects, it also runs the generator expression to feed LIBS project's cmake, it does not try to run syncqt as result of (b) and (c) * NINJA (build ninja) * GN (build gn) * LIBS - projects runs simplified feature evaluation (CONDITIONS resolved by SUPERBUILD cmake) to generate build headers (+syncqt), it also runs gn during configure and does all libs compilation. The project's source root must be "src" directory as a result of (a),(b),(c) * EXAMPLES - builds examples as a result of (d),(e) * TESTS - builds tests as a result of (d),(e) Each of projects will have three stages: configure, compile, install. Task-number: QTBUG-91760 Done-With: Jüri Valdmann Change-Id: I3b44decefa17f177e5e07c563796aa158a0b0ecb Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Peter Varga --- .cmake.conf | 1 + 1 file changed, 1 insertion(+) create mode 100644 .cmake.conf (limited to '.cmake.conf') diff --git a/.cmake.conf b/.cmake.conf new file mode 100644 index 000000000..930548045 --- /dev/null +++ b/.cmake.conf @@ -0,0 +1 @@ +set(QT_REPO_MODULE_VERSION "6.0.0") -- cgit v1.2.3