diff options
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 362 |
1 files changed, 287 insertions, 75 deletions
diff --git a/configure.cmake b/configure.cmake index 7978bcc1e3..411a6f9f39 100644 --- a/configure.cmake +++ b/configure.cmake @@ -18,10 +18,15 @@ if(TARGET ZLIB::ZLIB) set_property(TARGET ZLIB::ZLIB PROPERTY IMPORTED_GLOBAL TRUE) endif() +# Look for Threads in the same scope as OpenSSL package, because OpenSSL sometimes depends on +# Threads (for static OpenSSL builds) and we want to promote the target to global in the same +# directory scope. +qt_find_package(Threads PROVIDED_TARGETS Threads::Threads) qt_find_package(WrapOpenSSLHeaders PROVIDED_TARGETS WrapOpenSSLHeaders::WrapOpenSSLHeaders MODULE_NAME core) # openssl_headers # OPENSSL_VERSION_MAJOR is not defined for OpenSSL 1.1.1 qt_config_compile_test(opensslv11_headers + LABEL "opensslv11_headers" LIBRARIES WrapOpenSSLHeaders::WrapOpenSSLHeaders CODE @@ -46,6 +51,7 @@ qt_find_package(WrapOpenSSL PROVIDED_TARGETS WrapOpenSSL::WrapOpenSSL MODULE_NAM # openssl # OPENSSL_VERSION_MAJOR is not defined for OpenSSL 1.1.1 qt_config_compile_test(opensslv11 + LABEL "opensslv11" LIBRARIES WrapOpenSSL::WrapOpenSSL CODE @@ -70,6 +76,7 @@ SSL_free(SSL_new(0)); # opensslv30 # openssl_headers qt_config_compile_test(opensslv30_headers + LABEL "opensslv30_headers" LIBRARIES WrapOpenSSLHeaders::WrapOpenSSLHeaders CODE @@ -87,6 +94,7 @@ int main(void) } ") qt_config_compile_test(opensslv30 + LABEL "opensslv30" LIBRARIES WrapOpenSSL::WrapOpenSSL CODE @@ -105,7 +113,15 @@ SSL_free(SSL_new(0)); } ") -qt_find_package(WrapZSTD 1.3 PROVIDED_TARGETS WrapZSTD::WrapZSTD MODULE_NAME global QMAKE_LIB zstd) +qt_find_package(WrapZSTD 1.3 + PROVIDED_TARGETS + WrapZSTD::WrapZSTD + zstd::libzstd + zstd::libzstd_static + zstd::libzstd_shared + MODULE_NAME global + QMAKE_LIB zstd +) qt_find_package(WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus) qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev) qt_find_package(LTTngUST PROVIDED_TARGETS LTTng::UST MODULE_NAME core QMAKE_LIB lttng-ust) @@ -195,14 +211,44 @@ if(NOT QT_CONFIGURE_RUNNING) qt_evaluate_feature(use_gold_linker) qt_evaluate_feature(use_lld_linker) qt_evaluate_feature(use_mold_linker) + + qt_run_linker_version_script_support() endif() +qt_feature("version_tagging" + PUBLIC + AUTODETECT TRUE + CONDITION TEST_ld_version_script OR APPLE OR WIN32 +) +qt_feature_definition("version_tagging" "QT_NO_VERSION_TAGGING" NEGATE) #### Tests # machineTuple qt_config_compile_test_machine_tuple("machine tuple") +# glibc +qt_config_compile_test(glibc + LABEL "Using Glibc" + CODE +"#include <features.h> +#ifndef __GLIBC__ +#error +#endif +int main() {}" +) + +# glibc 2.34, for _FORTIFY_SOURCE == 3 +qt_config_compile_test(glibc_234 + LABEL "Using Glibc >= 2.34" + CODE +"#include <features.h> +#if !defined(__GLIBC__) || !__GLIBC_PREREQ(2, 34) +#error +#endif +int main() {}" +) + # cxx20 qt_config_compile_test(cxx20 LABEL "C++20 support" @@ -285,11 +331,13 @@ int main(void) "# FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")'] ) +if(NOT MSVC AND NOT APPLE) + qt_config_compile_test("separate_debug_info" + LABEL "separate debug information support" + PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/separate_debug_info" + ) +endif() -qt_config_compile_test("separate_debug_info" - LABEL "separate debug information support" - PROJECT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config.tests/separate_debug_info" -) # signaling_nan qt_config_compile_test(signaling_nan LABEL "Signaling NaN for doubles" @@ -388,29 +436,43 @@ alloca(1); ") # stack_protector -qt_config_compile_test(stack_protector - LABEL "stack protection" - COMPILE_OPTIONS -fstack-protector-strong - CODE -"#ifdef __QNXNTO__ -# include <sys/neutrino.h> -# if _NTO_VERSION < 700 -# error stack-protector not used (by default) before QNX 7.0.0. -# endif -#endif +if(NOT WASM AND NOT VXWORKS) + # emcc doesn't support this, but the detection accidentally succeeds + # https://github.com/emscripten-core/emscripten/issues/17030 + + # VXWORKS: We currently don't know the correct linker options. This is + # tracked at QTBUG-123715 + qt_config_compiler_supports_flag_test(stack_protector + LABEL "stack protection" + FLAG "-fstack-protector-strong" + ) +endif() -int main(void) -{ - /* BEGIN TEST: */ - /* END TEST: */ - return 0; -} -") +# stack_clash_protection +if(NOT CLANG) # https://gitlab.kitware.com/cmake/cmake/-/issues/21998 + qt_config_compiler_supports_flag_test(stack_clash_protection + LABEL "-fstack-clash-protection support" + FLAG "-fstack-clash-protection" + ) +endif() + +# trivial_auto_var_init_pattern +qt_config_compiler_supports_flag_test(trivial_auto_var_init_pattern + LABEL "-ftrivial-auto-var-init=pattern support" + FLAG "-ftrivial-auto-var-init=pattern" +) # intelcet -qt_config_compile_test(intelcet - LABEL "Support for Intel Control-flow Enforcement Technology (CET)" - CODE +if(MSVC) + qt_config_linker_supports_flag_test(intelcet + LABEL "Support for Intel Control-flow Enforcement Technology (CET)" + FLAG "-CETCOMPAT" + ) +else() + qt_config_compile_test(intelcet + LABEL "Support for Intel Control-flow Enforcement Technology (CET)" + COMPILE_OPTIONS -fcf-protection=full + CODE "int main(void) { /* BEGIN TEST: */ @@ -420,8 +482,35 @@ qt_config_compile_test(intelcet /* END TEST: */ return 0; } -") +" + ) +endif() +# -z relro -z now +if(NOT WIN32) + qt_config_linker_supports_flag_test(relro_now_linker + LABEL "Support for -z relro and -z now" + FLAG "-z,relro,-z,now" + ) +endif() + +# Is libc++ the default Standard Library? +qt_config_compile_test(using_stdlib_libcpp + LABEL "Compiler defaults to libc++" + CODE +" +#include <ciso646> + +int main(void) +{ +/* BEGIN TEST: */ +#ifndef _LIBCPP_VERSION +# error +#endif +/* END TEST: */ +} +" +) #### Features @@ -471,9 +560,9 @@ qt_feature("optimize_full" qt_feature_config("optimize_full" QMAKE_PRIVATE_CONFIG) qt_feature("msvc_obj_debug_info" LABEL "Embed debug info in object files (MSVC)" - CONDITION MSVC ENABLE QT_USE_CCACHE AUTODETECT OFF + EMIT_IF MSVC ) qt_feature_config("msvc_obj_debug_info" QMAKE_PRIVATE_CONFIG) qt_feature("pkg-config" PUBLIC @@ -487,7 +576,7 @@ qt_feature("developer-build" PRIVATE LABEL "Developer build" AUTODETECT OFF ) -qt_feature("no-prefix" PRIVATE +qt_feature("no-prefix" LABEL "No prefix build" AUTODETECT NOT QT_WILL_INSTALL CONDITION NOT QT_WILL_INSTALL @@ -519,7 +608,7 @@ qt_feature_config("force_debug_info" QMAKE_PRIVATE_CONFIG) qt_feature("separate_debug_info" PUBLIC LABEL "Split off debug information" AUTODETECT OFF - CONDITION ( QT_FEATURE_shared ) AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release OR QT_FEATURE_force_debug_info ) AND ( APPLE OR TEST_separate_debug_info ) + CONDITION ( QT_FEATURE_shared ) AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release OR QT_FEATURE_force_debug_info ) AND ( MSVC OR APPLE OR TEST_separate_debug_info ) ) qt_feature_config("separate_debug_info" QMAKE_PUBLIC_QT_CONFIG) qt_feature("appstore-compliant" PUBLIC @@ -532,7 +621,7 @@ if(APPLE) endif() qt_feature("simulator_and_device" PUBLIC LABEL "Build for both simulator and device" - CONDITION UIKIT AND NOT QT_UIKIT_SDK + CONDITION IOS AND NOT QT_APPLE_SDK ) qt_feature_config("simulator_and_device" QMAKE_PUBLIC_QT_CONFIG) qt_feature("rpath" PUBLIC @@ -541,19 +630,20 @@ qt_feature("rpath" PUBLIC CONDITION BUILD_SHARED_LIBS AND UNIX AND NOT WIN32 AND NOT ANDROID ) qt_feature_config("rpath" QMAKE_PUBLIC_QT_CONFIG) -qt_feature("force_asserts" PUBLIC - LABEL "Force assertions" +qt_feature("elf_private_full_version" PRIVATE + LABEL "Use Qt's full version number in ELF version symbols" AUTODETECT OFF + CONDITION BUILD_SHARED_LIBS AND UNIX AND NOT APPLE ) -qt_feature("headersclean" - LABEL "Check for clean headers" +qt_feature_config("elf_private_full_version" QMAKE_PRIVATE_QT_CONFIG) +qt_feature("force_asserts" PUBLIC + LABEL "Force assertions" AUTODETECT OFF - CONDITION NOT WASM ) -qt_feature_config("headersclean" QMAKE_PRIVATE_CONFIG) qt_feature("framework" PUBLIC LABEL "Build Apple Frameworks" - CONDITION APPLE AND BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE STREQUAL Debug + AUTODETECT ON + CONDITION APPLE ) qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD") qt_feature_config("framework" QMAKE_PUBLIC_QT_CONFIG @@ -568,11 +658,6 @@ qt_feature("largefile" ) qt_feature_definition("largefile" "QT_LARGEFILE_SUPPORT" VALUE "64") qt_feature_config("largefile" QMAKE_PRIVATE_CONFIG) -qt_feature("testcocoon" - LABEL "Testcocoon support" - AUTODETECT OFF -) -qt_feature_config("testcocoon" QMAKE_PUBLIC_CONFIG) qt_feature("sanitize_address" LABEL "Addresses" AUTODETECT OFF @@ -627,13 +712,9 @@ qt_feature_config("c++2a" QMAKE_PUBLIC_QT_CONFIG) qt_feature("c++2b" PUBLIC LABEL "C++2b" AUTODETECT OFF -) -qt_feature_config("c++2b" QMAKE_PUBLIC_QT_CONFIG) -qt_feature("c++2b" PUBLIC - LABEL "C++2b" - AUTODETECT FALSE CONDITION QT_FEATURE_cxx20 AND (CMAKE_VERSION VERSION_GREATER_EQUAL "3.20") AND TEST_cxx2b ) +qt_feature_config("c++2b" QMAKE_PUBLIC_QT_CONFIG) qt_feature("precompile_header" LABEL "Using precompiled headers" CONDITION BUILD_WITH_PCH AND TEST_precompile_header @@ -887,11 +968,15 @@ qt_feature("alloca" PRIVATE LABEL "alloca()" CONDITION QT_FEATURE_alloca_h OR QT_FEATURE_alloca_malloc_h OR TEST_alloca_stdlib_h ) -qt_feature("stack-protector-strong" PRIVATE - LABEL "stack protection" - CONDITION QNX AND TEST_stack_protector +qt_feature("force-system-libs" PRIVATE + LABEL "Force the usage of system libraries" + AUTODETECT OFF +) +qt_feature("force-bundled-libs" PRIVATE + LABEL "Force the usage of bundled libraries" + AUTODETECT OFF ) -qt_feature("system-zlib" PRIVATE +qt_feature("system-zlib" PRIVATE SYSTEM_LIBRARY LABEL "Using system zlib" CONDITION WrapSystemZLIB_FOUND ) @@ -902,7 +987,7 @@ qt_feature("zstd" PUBLIC qt_feature("stdlib-libcpp" PRIVATE LABEL "Using stdlib=libc++" AUTODETECT OFF - CONDITION LINUX AND NOT ANDROID + CONDITION MINGW OR (LINUX AND NOT ANDROID) ) # Check whether CMake was built with zstd support. # See https://gitlab.kitware.com/cmake/cmake/-/issues/21552 @@ -941,7 +1026,7 @@ qt_feature("concurrent" PUBLIC qt_feature_definition("concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1") qt_feature("dbus" PUBLIC PRIVATE LABEL "Qt D-Bus" - AUTODETECT NOT UIKIT AND NOT ANDROID + AUTODETECT NOT UIKIT AND NOT ANDROID AND NOT VXWORKS CONDITION QT_FEATURE_thread AND NOT WASM ) qt_feature_definition("dbus" "QT_NO_DBUS" NEGATE VALUE "1") @@ -957,6 +1042,11 @@ qt_feature("qreal" ) qt_feature_definition("qreal" "QT_COORD_TYPE" VALUE "${QT_COORD_TYPE}") qt_feature_definition("qreal" "QT_COORD_TYPE_STRING" VALUE "\"${QT_COORD_TYPE}\"") +if(QT_COORD_TYPE STREQUAL "double") + qt_feature_definition("qreal" "QT_COORD_TYPE_IS_DOUBLE" VALUE "1") +elseif(QT_COORD_TYPE STREQUAL "float") + qt_feature_definition("qreal" "QT_COORD_TYPE_IS_FLOAT" VALUE "1") +endif() qt_feature("gui" PRIVATE LABEL "Qt Gui" ) @@ -964,16 +1054,24 @@ qt_feature_config("gui" QMAKE_PUBLIC_QT_CONFIG NEGATE) qt_feature("network" PRIVATE LABEL "Qt Network" + SECTION "Module" + PURPOSE "Provides the Qt Network module." ) qt_feature("printsupport" PRIVATE LABEL "Qt PrintSupport" CONDITION QT_FEATURE_widgets + SECTION "Module" + PURPOSE "Provides the Qt PrintSupport module." ) qt_feature("sql" PRIVATE LABEL "Qt Sql" + SECTION "Module" + PURPOSE "Provides the Sql module." ) qt_feature("testlib" PRIVATE LABEL "Qt Testlib" + SECTION "Module" + PURPOSE "Provides the Qt Testlib module." ) qt_feature("widgets" PRIVATE LABEL "Qt Widgets" @@ -985,6 +1083,8 @@ qt_feature_config("widgets" QMAKE_PUBLIC_QT_CONFIG NEGATE) qt_feature("xml" PRIVATE LABEL "Qt Xml" + SECTION "Module" + PURPOSE "Provides the Qt Xml module." ) qt_feature("libudev" PRIVATE LABEL "udev" @@ -1026,11 +1126,6 @@ qt_feature("ccache" CONDITION QT_USE_CCACHE ) qt_feature_config("ccache" QMAKE_PRIVATE_CONFIG) -qt_feature("unity-build" - LABEL "Unity Build" - AUTODETECT 1 - CONDITION QT_UNITY_BUILD -) qt_feature("static_runtime" LABEL "Statically link the C/C++ runtime library" AUTODETECT OFF @@ -1049,10 +1144,83 @@ qt_feature("relocatable" PRIVATE AUTODETECT QT_FEATURE_shared CONDITION QT_FEATURE_dlopen OR WIN32 OR NOT QT_FEATURE_shared ) +# hardening features qt_feature("intelcet" PRIVATE - LABEL "Using Intel CET" - CONDITION ( INPUT_intelcet STREQUAL yes ) OR TEST_intelcet + LABEL "Using Intel Control-flow Enforcement Technology (CET)" + AUTODETECT ON + CONDITION TEST_intelcet ) +qt_feature_config("intelcet" QMAKE_PUBLIC_CONFIG) +qt_feature("glibc_fortify_source" PRIVATE + LABEL "Using Glibc function fortification" + AUTODETECT ON + CONDITION TEST_glibc +) +qt_feature_config("glibc_fortify_source" QMAKE_PUBLIC_CONFIG) +qt_feature("trivial_auto_var_init_pattern" PRIVATE + LABEL "Using -ftrivial-auto-var-init=pattern" + AUTODETECT ON + CONDITION TEST_trivial_auto_var_init_pattern +) +qt_feature_config("trivial_auto_var_init_pattern" QMAKE_PUBLIC_CONFIG) +qt_feature("stack_protector" PRIVATE + LABEL "Using -fstack-protector-strong" + AUTODETECT ON + CONDITION TEST_stack_protector +) +qt_feature_config("stack_protector" QMAKE_PUBLIC_CONFIG) +qt_feature("stack_clash_protection" PRIVATE + LABEL "Using -fstack-clash-protection" + AUTODETECT ON + CONDITION TEST_stack_clash_protection +) +qt_feature_config("stack_clash_protection" QMAKE_PUBLIC_CONFIG) +qt_feature("libstdcpp_assertions" PRIVATE + LABEL "Using libstdc++ assertions" + AUTODETECT ON + CONDITION (GCC OR (CLANG AND NOT MSVC AND NOT QT_FEATURE_stdlib_libcpp AND NOT TEST_using_stdlib_libcpp)) +) +qt_feature_config("libstdcpp_assertions" QMAKE_PUBLIC_CONFIG) +qt_feature("libcpp_hardening" PRIVATE + LABEL "Using libc++ hardening" + AUTODETECT ON + CONDITION (QT_FEATURE_stdlib_libcpp OR TEST_using_stdlib_libcpp) +) +qt_feature_config("libcpp_hardening" QMAKE_PUBLIC_CONFIG) +qt_feature("relro_now_linker" PRIVATE + LABEL "Using -z relro -z now when linking" + AUTODETECT ON + CONDITION TEST_relro_now_linker +) +qt_feature_config("relro_now_linker" QMAKE_PUBLIC_CONFIG) + + +if("${INPUT_coverage}" STREQUAL "gcov") + qt_config_compile_test(gcov + LABEL "gcov compiler flags" + COMPILE_OPTIONS "--coverage" + CODE + "int main(void) + { + /* BEGIN TEST: */ + /* END TEST: */ + return 0; + } + ") +endif() + +qt_feature("coverage-gcov" + LABEL "Gcov" + ENABLE INPUT_coverage STREQUAL "gcov" + CONDITION TEST_gcov AND + ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release ) +) + +qt_feature("coverage" + LABEL "Coverage" + CONDITION QT_FEATURE_coverage_gcov +) + qt_configure_add_summary_build_type_and_config() qt_configure_add_summary_section(NAME "Build options") qt_configure_add_summary_build_mode(Mode) @@ -1073,7 +1241,16 @@ qt_configure_add_summary_entry( CONDITION UNIX ) qt_configure_add_summary_entry( - ARGS "unity-build" + TYPE "message" ARGS "Unity Build" MESSAGE "yes" CONDITION QT_UNITY_BUILD +) +qt_configure_add_summary_entry( + TYPE "message" ARGS "Unity Build" MESSAGE "no" CONDITION NOT QT_UNITY_BUILD +) +qt_configure_add_summary_entry( + TYPE "message" + ARGS "Unity Build Batch Size" + MESSAGE "${QT_UNITY_BUILD_BATCH_SIZE}" + CONDITION QT_UNITY_BUILD ) qt_configure_add_summary_entry( TYPE "firstAvailableFeature" @@ -1094,6 +1271,13 @@ qt_configure_add_summary_entry(ARGS "relocatable") qt_configure_add_summary_entry(ARGS "precompile_header") qt_configure_add_summary_entry(ARGS "ltcg") qt_configure_add_summary_entry(ARGS "intelcet") +qt_configure_add_summary_entry(ARGS "glibc_fortify_source") +qt_configure_add_summary_entry(ARGS "trivial_auto_var_init_pattern") +qt_configure_add_summary_entry(ARGS "stack_protector") +qt_configure_add_summary_entry(ARGS "stack_clash_protection") +qt_configure_add_summary_entry(ARGS "libstdcpp_assertions") +qt_configure_add_summary_entry(ARGS "libcpp_hardening") +qt_configure_add_summary_entry(ARGS "relro_now_linker") qt_configure_add_summary_entry( ARGS "wasm-simd128" CONDITION ( TEST_architecture_arch STREQUAL wasm ) @@ -1132,6 +1316,13 @@ qt_configure_add_summary_entry(ARGS "sanitize_fuzzer_no_link") qt_configure_add_summary_entry(ARGS "sanitize_undefined") qt_configure_end_summary_section() # end of "Sanitizers" section qt_configure_add_summary_build_parts("Build parts") +if(QT_INSTALL_EXAMPLES_SOURCES) + set(_examples_sources_entry_message "yes") +else() + set(_examples_sources_entry_message "no") +endif() +qt_configure_add_summary_entry(ARGS "Install examples sources" TYPE "message" + MESSAGE "${_examples_sources_entry_message}") qt_configure_add_summary_entry( ARGS "appstore-compliant" CONDITION APPLE OR ANDROID OR WIN32 @@ -1151,6 +1342,14 @@ qt_configure_add_summary_entry(ARGS "xml") qt_configure_end_summary_section() # end of "Qt modules and options" section qt_configure_add_summary_section(NAME "Support enabled for") qt_configure_add_summary_entry(ARGS "pkg-config") + +if(QT_USE_VCPKG AND (DEFINED ENV{VCPKG_ROOT} OR VCPKG_TARGET_TRIPLET)) + set(_vcpkg_entry_message "yes") +else() + set(_vcpkg_entry_message "no") +endif() +qt_configure_add_summary_entry(ARGS "Using vcpkg" TYPE "message" MESSAGE "${_vcpkg_entry_message}") + qt_configure_add_summary_entry(ARGS "libudev") qt_configure_add_summary_entry(ARGS "openssl") qt_configure_add_summary_entry(ARGS "openssl-linked") @@ -1172,11 +1371,6 @@ qt_configure_add_report_entry( ) qt_configure_add_report_entry( TYPE ERROR - MESSAGE "debug-only framework builds are not supported. Configure with -no-framework if you want a pure debug build." - CONDITION QT_FEATURE_framework AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release -) -qt_configure_add_report_entry( - TYPE ERROR MESSAGE "Static builds don't support RPATH" CONDITION ( QT_FEATURE_rpath OR QT_EXTRA_RPATHS ) AND NOT QT_FEATURE_shared ) @@ -1207,16 +1401,17 @@ https://github.com/llvm/llvm-project/issues/53520 ]=] ) else() + string(CONCAT error_message + "x86 intrinsics support missing. Check your compiler settings.\n" + "If this is an error, report at https://bugreports.qt.io with your compiler ID and " + "version, and this output:\n" + "\n" + "${TEST_x86intrin_OUTPUT}" + ) qt_configure_add_report_entry( TYPE ERROR CONDITION (NOT QT_FEATURE_x86intrin) - MESSAGE [========[ -x86 intrinsics support missing. Check your compiler settings. If this is an -error, report at https://bugreports.qt.io with your compiler ID and version, -and this output: - -${TEST_x86intrin_OUTPUT} -]========] + MESSAGE "${error_message}" ) endif() endif() @@ -1235,6 +1430,16 @@ qt_configure_add_report_entry( MESSAGE "You should use the recommended Emscripten version ${QT_EMCC_RECOMMENDED_VERSION} with this Qt. You have ${EMCC_VERSION}." CONDITION WASM AND NOT ${EMCC_VERSION} MATCHES ${QT_EMCC_RECOMMENDED_VERSION} ) +qt_configure_add_report_entry( + TYPE ERROR + MESSAGE "Building Qt with C++20 is not supported with MSVC 2019." + CONDITION QT_FEATURE_cxx20 AND MSVC AND MSVC_VERSION LESS "1930" +) +qt_configure_add_report_entry( + TYPE ERROR + MESSAGE "You cannot force both system and bundled libraries." + CONDITION QT_FEATURE_force_bundled_libs AND QT_FEATURE_force_system_libs +) if(WASM) qt_extra_definition("QT_EMCC_VERSION" "\"${EMCC_VERSION}\"" PUBLIC) endif() @@ -1243,5 +1448,12 @@ qt_extra_definition("QT_VERSION_MAJOR" ${PROJECT_VERSION_MAJOR} PUBLIC) qt_extra_definition("QT_VERSION_MINOR" ${PROJECT_VERSION_MINOR} PUBLIC) qt_extra_definition("QT_VERSION_PATCH" ${PROJECT_VERSION_PATCH} PUBLIC) -qt_extra_definition("QT_COPYRIGHT" \"${QT_COPYRIGHT}\" PRIVATE) -qt_extra_definition("QT_COPYRIGHT_YEAR" \"${QT_COPYRIGHT_YEAR}\" PRIVATE) +qt_extra_definition("QT_COPYRIGHT" \"${QT_COPYRIGHT}\" PUBLIC) + +qt_configure_add_report_entry( + TYPE WARNING + MESSAGE "QT_ALLOW_SYMLINK_IN_PATHS is enabled. This is not recommended, and it may lead to unexpected issues. +E.g., When building QtWebEngine, enabling this option may result in build issues in certain platforms. +See https://bugreports.qt.io/browse/QTBUG-59769." + CONDITION QT_ALLOW_SYMLINK_IN_PATHS +) |