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",