summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-11-23 16:19:39 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-11-24 21:51:34 +0100
commit0274daf30779ba08fc708247a3e645fd44980280 (patch)
treead0ef2c993d2f0da7c369a91c7ea865fbce493ef
parent2548438e326d20eda2eb4398139164f5400d22ac (diff)
CMake: Rename QtBuildInternalsAndroid.cmake to QtAndroidHelpers.cmake
...and include it in QtBuild.cmake. Commit e8d8b1a5e4c added two different code paths to include QtBuildInternalsAndroid.cmake. This was needed, because: In a top-level build, we must not include files that are not yet installed. We have the source tree available, and "${QT_SOURCE_TREE}/cmake" is in CMAKE_MODULE_PATH. We can use the "module syntax" of the include() command. In a per-repository build, when building against an installed qtbase, we must not include files of the source tree, because that's not guaranteed to be available. However, Qt6BuildInternalsConfig.cmake is installed, and we can directly include QtBuildInternalsAndroid.cmake, which is right next to it. We can circumvent this whole issue by moving the Android-related functions out of the Qt6BuildInternals package and including it in QtBuild.cmake. Pick-to: 6.0 Task-number: QTBUG-88718 Change-Id: I5192ba19bb77952505c20d053d7285f798d16ac5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtAndroidHelpers.cmake (renamed from cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake)2
-rw-r--r--cmake/QtBaseGlobalTargets.cmake5
-rw-r--r--cmake/QtBuild.cmake4
-rw-r--r--cmake/QtBuildInternals/QtBuildInternalsConfig.cmake9
4 files changed, 5 insertions, 15 deletions
diff --git a/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake b/cmake/QtAndroidHelpers.cmake
index 1d3997b0c9..7e84c983a9 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake
+++ b/cmake/QtAndroidHelpers.cmake
@@ -212,5 +212,3 @@ function(qt_android_dependencies target)
COMPONENT
Devel)
endfunction()
-
-
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index 73bc83aca0..1f12b7206a 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -58,10 +58,6 @@ qt_install(FILES
COMPONENT Devel
)
qt_copy_or_install(
- FILES
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/QtBuildInternals/QtBuildInternalsAndroid.cmake"
- DESTINATION "${__build_internals_install_dir}")
-qt_copy_or_install(
DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/QtBuildInternals/${__build_internals_standalone_test_template_dir}"
DESTINATION "${__build_internals_install_dir}")
@@ -149,6 +145,7 @@ qt_copy_or_install(FILES
cmake/ModuleDescription.json.in
cmake/Qt3rdPartyLibraryConfig.cmake.in
cmake/Qt3rdPartyLibraryHelpers.cmake
+ cmake/QtAndroidHelpers.cmake
cmake/QtAppHelpers.cmake
cmake/QtAutogenHelpers.cmake
cmake/QtBuild.cmake
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index e62294c045..1252ed2c3c 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -490,5 +490,9 @@ include(QtToolHelpers)
include(QtHeadersClean)
include(QtJavaHelpers)
+if(ANDROID)
+ include(QtAndroidHelpers)
+endif()
+
# This sets up the scope finalizer mechanism.
variable_watch(CMAKE_CURRENT_LIST_DIR qt_watch_current_list_dir)
diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
index bb2de0a0c2..d930e2a963 100644
--- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
+++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake
@@ -568,12 +568,3 @@ macro(qt_examples_build_end)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ${BACKUP_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE})
endmacro()
-
-if (ANDROID)
- if(QT_SUPERBUILD)
- include(QtBuildInternals/QtBuildInternalsAndroid)
- else()
- ### TODO: Find out why this is needed. See QTBUG-88718.
- include(${CMAKE_CURRENT_LIST_DIR}/QtBuildInternalsAndroid.cmake)
- endif()
-endif()