summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-04-16 22:33:14 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-04-17 20:42:42 +0200
commit9b45ca7411f57385989d43eb70e89e02551dd974 (patch)
tree60819920cd86b1301f8e030bf587cf5dda23fc6a
parent2e89c61f58db1ce54411ccd9584dd1a3e0a02688 (diff)
CMake: Port the 'cross_compile' feature
Change-Id: Iccd1d55e95797740a4a8689462ce9ab1e49a62c1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--configure.cmake6
-rwxr-xr-xutil/cmake/configurejson2cmake.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/configure.cmake b/configure.cmake
index f773e28f52..5534f6aafc 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -330,6 +330,12 @@ qt_feature("static" PUBLIC
)
qt_feature_config("static" QMAKE_PUBLIC_QT_CONFIG)
qt_feature_config("static" QMAKE_PUBLIC_CONFIG)
+qt_feature("cross_compile" PUBLIC
+ LABEL "Cross compiling"
+ CONDITION CMAKE_CROSSCOMPILING
+)
+qt_feature_config("cross_compile" QMAKE_PUBLIC_CONFIG)
+qt_feature_config("cross_compile" QMAKE_PRIVATE_CONFIG)
qt_feature("use_bfd_linker"
LABEL "bfd"
AUTODETECT false
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py
index 5a2dd85237..a756d8d5e7 100755
--- a/util/cmake/configurejson2cmake.py
+++ b/util/cmake/configurejson2cmake.py
@@ -821,7 +821,7 @@ def get_feature_mapping():
"build_all": None,
"ccache": None,
"compiler-flags": None,
- "cross_compile": None,
+ "cross_compile": {"condition": "CMAKE_CROSSCOMPILING"},
"debug_and_release": {
"autoDetect": "1", # Setting this to None has weird effects...
"condition": "QT_GENERATOR_IS_MULTI_CONFIG",