summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2020-08-13 13:05:13 +0300
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2020-08-13 17:31:59 +0000
commit5b76414b43ee0ffabf292b4c6535f15e42613f1b (patch)
treec4df6597409864058c9c6c43f1271231832c6b93
parentfdd61b3a7b7a19e3d2bec475240d9fc267068390 (diff)
CMake: fix android target build not picking the correct sysroot
This previous way caused target builds under Linux to pick the host packages like udev and mtdev and build for them which they will fail during the build. Task-number: QTBUG-86028 Change-Id: Ic029f0a3e71b50c694473a110922f0ef11e5b0bf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--CMakeLists.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a92f3dc03..fc08130795 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,14 @@ if(NOT QT_BUILD_STANDALONE_TESTS)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/QtAutoDetect.cmake)
endif()
+include(".cmake.conf")
+project(QtBase
+ VERSION "${QT_REPO_MODULE_VERSION}"
+ DESCRIPTION "Qt Base Libraries"
+ HOMEPAGE_URL "https://qt.io/"
+ LANGUAGES CXX C ASM
+)
+
if (CMAKE_CROSSCOMPILING AND CMAKE_SYSROOT)
# When cross compiling with CMake any calls to pkg_check_modules() will
# search into the host system instead of the target sysroot.
@@ -17,14 +25,6 @@ if (CMAKE_CROSSCOMPILING AND CMAKE_SYSROOT)
set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
endif()
-include(".cmake.conf")
-project(QtBase
- VERSION "${QT_REPO_MODULE_VERSION}"
- DESCRIPTION "Qt Base Libraries"
- HOMEPAGE_URL "https://qt.io/"
- LANGUAGES CXX C ASM
-)
-
if(NOT QT_BUILD_STANDALONE_TESTS)
## Add some paths to check for cmake modules:
list(PREPEND CMAKE_MODULE_PATH