2022-07-05 11:26:52 +00:00
# Copyright (C) 2022 The Qt Company Ltd.
2022-08-19 13:21:34 +00:00
# SPDX-License-Identifier: BSD-3-Clause
2022-07-05 11:26:52 +00:00
2018-10-24 13:20:27 +00:00
#### Inputs
#### Libraries
2022-03-31 10:41:13 +00:00
qt_find_package ( WrapSystemZLIB 1.0.8 PROVIDED_TARGETS WrapSystemZLIB::WrapSystemZLIB MODULE_NAME global QMAKE_LIB zlib )
2021-04-13 16:57:07 +00:00
# Work around global target promotion failure when WrapZLIB is used on APPLE platforms.
# What ends up happening is that the ZLIB::ZLIB target is not promoted to global by qt_find_package,
# then qt_find_package(WrapSystemPNG) tries to find its dependency ZLIB::ZLIB, sees it's not global
# and tries to promote it to global, but fails because the directory scope of the PNG package is
# different (src/gui) from where ZLIB was originally found (qtbase root).
# To avoid that, just manually promote the target to global here.
if ( TARGET ZLIB::ZLIB )
set_property ( TARGET ZLIB::ZLIB PROPERTY IMPORTED_GLOBAL TRUE )
endif ( )
2021-11-04 14:59:17 +00:00
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
L I B R A R I E S
W r a p O p e n S S L H e a d e r s : : W r a p O p e n S S L H e a d e r s
C O D E
" #include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !defined(OPENSSL_VERSION_NUMBER) || defined(OPENSSL_VERSION_MAJOR) || OPENSSL_VERSION_NUMBER-0 < 0x10101000L
# error OpenSSL >= 1.1.1 is required
#endif
#if !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
# error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it is libressl which is unsupported
#endif
i n t main ( void )
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
qt_find_package ( WrapOpenSSL PROVIDED_TARGETS WrapOpenSSL::WrapOpenSSL MODULE_NAME core QMAKE_LIB openssl )
# openssl
# OPENSSL_VERSION_MAJOR is not defined for OpenSSL 1.1.1
qt_config_compile_test ( opensslv11
L I B R A R I E S
W r a p O p e n S S L : : W r a p O p e n S S L
C O D E
" #include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !defined(OPENSSL_VERSION_NUMBER) || defined(OPENSSL_VERSION_MAJOR) || OPENSSL_VERSION_NUMBER-0 < 0x10101000L
# error OpenSSL >= 1.1.1 is required
#endif
#if !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
# error OpenSSL was reported as >= 1.1.1 but is missing required features, possibly it is libressl which is unsupported
#endif
i n t main ( void )
{
/ * B E G I N T E S T : * /
SSL_free ( SSL_new(0 ) ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# opensslv30
# openssl_headers
qt_config_compile_test ( opensslv30_headers
L I B R A R I E S
W r a p O p e n S S L H e a d e r s : : W r a p O p e n S S L H e a d e r s
C O D E
" #include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !OPENSSL_VERSION_PREREQ(3,0)
# error OpenSSL >= 3.0 is required
#endif
i n t main ( void )
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
qt_config_compile_test ( opensslv30
L I B R A R I E S
W r a p O p e n S S L : : W r a p O p e n S S L
C O D E
" #include <openssl/ssl.h>
#include <openssl/opensslv.h>
#if !OPENSSL_VERSION_PREREQ(3,0)
# error OpenSSL >= 3.0 is required
#endif
i n t main ( void )
{
/ * B E G I N T E S T : * /
SSL_free ( SSL_new(0 ) ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
2021-04-13 16:57:07 +00:00
# special case end
2022-02-23 11:29:08 +00:00
qt_find_package ( WrapZSTD 1.3 PROVIDED_TARGETS WrapZSTD::WrapZSTD MODULE_NAME global QMAKE_LIB zstd )
2020-08-04 15:24:17 +00:00
qt_find_package ( WrapDBus1 1.2 PROVIDED_TARGETS dbus-1 MODULE_NAME global QMAKE_LIB dbus )
2020-04-22 19:01:32 +00:00
qt_find_package ( Libudev PROVIDED_TARGETS PkgConfig::Libudev MODULE_NAME global QMAKE_LIB libudev )
2018-10-24 13:20:27 +00:00
2021-07-12 10:43:27 +00:00
#### Early-evaluated, Linker-related Tests and Features
2021-12-16 17:51:31 +00:00
qt_internal_check_if_linker_is_available ( use_bfd_linker
2021-07-12 10:43:27 +00:00
L A B E L " b f d l i n k e r "
F L A G " - f u s e - l d = b f d "
)
2021-12-16 17:51:31 +00:00
qt_internal_check_if_linker_is_available ( use_gold_linker
2021-07-12 10:43:27 +00:00
L A B E L " g o l d l i n k e r "
F L A G " - f u s e - l d = g o l d "
)
2021-12-16 17:51:31 +00:00
qt_internal_check_if_linker_is_available ( use_lld_linker
2021-07-12 10:43:27 +00:00
L A B E L " l l d l i n k e r "
F L A G " - f u s e - l d = l l d "
)
2021-12-16 12:25:43 +00:00
# We set an invalid flag as a default flag so the compile test fails
# in case if no mold is found in PATH.
set ( __qt_internal_mold_linker_flags "-Wl,-invalid-flag" )
if ( NOT QT_CONFIGURE_RUNNING )
qt_internal_get_mold_linker_flags ( __qt_internal_mold_linker_flags )
endif ( )
qt_internal_check_if_linker_is_available ( use_mold_linker
L A B E L " m o l d l i n k e r "
F L A G " $ { _ _ q t _ i n t e r n a l _ m o l d _ l i n k e r _ f l a g s } "
)
unset ( __qt_internal_mold_linker_flags )
2021-07-12 10:43:27 +00:00
qt_feature ( "use_bfd_linker"
P R I V A T E
L A B E L " b f d "
A U T O D E T E C T f a l s e
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D T E S T _ u s e _ b f d _ l i n k e r
E N A B L E I N P U T _ l i n k e r S T R E Q U A L ' b f d '
D I S A B L E I N P U T _ l i n k e r S T R E Q U A L ' g o l d ' O R I N P U T _ l i n k e r S T R E Q U A L ' l l d '
2021-12-16 12:25:43 +00:00
O R I N P U T _ l i n k e r S T R E Q U A L ' m o l d '
2021-07-12 10:43:27 +00:00
)
qt_feature_config ( "use_bfd_linker" QMAKE_PRIVATE_CONFIG )
qt_feature ( "use_gold_linker_alias"
A U T O D E T E C T f a l s e
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D T E S T _ u s e _ g o l d _ l i n k e r
)
qt_feature ( "use_gold_linker"
P R I V A T E
L A B E L " g o l d "
A U T O D E T E C T f a l s e
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D N O T r t e m s A N D T E S T _ u s e _ g o l d _ l i n k e r
E N A B L E I N P U T _ l i n k e r S T R E Q U A L ' g o l d ' O R Q T _ F E A T U R E _ u s e _ g o l d _ l i n k e r _ a l i a s
D I S A B L E I N P U T _ l i n k e r S T R E Q U A L ' b f d ' O R I N P U T _ l i n k e r S T R E Q U A L ' l l d '
2021-12-16 12:25:43 +00:00
O R I N P U T _ l i n k e r S T R E Q U A L ' m o l d '
2021-07-12 10:43:27 +00:00
)
qt_feature_config ( "use_gold_linker" QMAKE_PRIVATE_CONFIG )
qt_feature ( "use_lld_linker"
P R I V A T E
L A B E L " l l d "
A U T O D E T E C T f a l s e
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D T E S T _ u s e _ l l d _ l i n k e r
E N A B L E I N P U T _ l i n k e r S T R E Q U A L ' l l d '
D I S A B L E I N P U T _ l i n k e r S T R E Q U A L ' b f d ' O R I N P U T _ l i n k e r S T R E Q U A L ' g o l d '
2021-12-16 12:25:43 +00:00
O R I N P U T _ l i n k e r S T R E Q U A L ' m o l d '
2021-07-12 10:43:27 +00:00
)
qt_feature_config ( "use_lld_linker" QMAKE_PRIVATE_CONFIG )
2021-12-16 12:25:43 +00:00
qt_feature ( "use_mold_linker"
P R I V A T E
L A B E L " m o l d "
A U T O D E T E C T F A L S E
C O N D I T I O N N O T WIN32 A N D N O T I N T E G R I T Y A N D N O T W A S M A N D T E S T _ u s e _ m o l d _ l i n k e r
E N A B L E I N P U T _ l i n k e r S T R E Q U A L ' m o l d '
D I S A B L E I N P U T _ l i n k e r S T R E Q U A L ' b f d ' O R I N P U T _ l i n k e r S T R E Q U A L ' g o l d '
O R I N P U T _ l i n k e r S T R E Q U A L ' l l d '
)
qt_feature_config ( "use_mold_linker" QMAKE_PRIVATE_CONFIG )
2021-07-12 10:43:27 +00:00
if ( NOT QT_CONFIGURE_RUNNING )
qt_evaluate_feature ( use_bfd_linker )
qt_evaluate_feature ( use_gold_linker_alias )
qt_evaluate_feature ( use_gold_linker )
qt_evaluate_feature ( use_lld_linker )
2021-12-16 12:25:43 +00:00
qt_evaluate_feature ( use_mold_linker )
2021-07-12 10:43:27 +00:00
endif ( )
2018-10-24 13:20:27 +00:00
#### Tests
2020-06-26 18:45:11 +00:00
# machineTuple
qt_config_compile_test_machine_tuple ( "machine tuple" )
2020-02-13 08:14:09 +00:00
# cxx14
2019-10-17 08:49:44 +00:00
qt_config_compile_test ( cxx14
L A B E L " C + + 1 4 s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2019-10-17 08:49:44 +00:00
" #if __cplusplus > 201103L
/ / C o m p i l e r c l a i m s t o s u p p o r t C + + 1 4 , t r u s t i t
#else
# error __cplusplus must be > 201103L (the value of C++11)
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-10-17 08:49:44 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
"
C X X _ S T A N D A R D 1 4
)
2020-02-13 08:14:09 +00:00
# cxx17
2019-10-17 08:49:44 +00:00
qt_config_compile_test ( cxx17
L A B E L " C + + 1 7 s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2019-10-17 08:49:44 +00:00
" #if __cplusplus > 201402L
/ / C o m p i l e r c l a i m s t o s u p p o r t C + + 1 7 , t r u s t i t
#else
# error __cplusplus must be > 201402L (the value for C++14)
#endif
#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117
#include <variant>
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-10-17 08:49:44 +00:00
{
/ * B E G I N T E S T : * /
s t d : : v a r i a n t < i n t > v ( 42 ) ;
i n t i = s t d : : g e t < i n t > ( v ) ;
s t d : : visit ( [](const auto & ) { r e t u r n 1 ; } , v ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
"
C X X _ S T A N D A R D 1 7
)
2021-02-09 12:12:09 +00:00
# cxx20
qt_config_compile_test ( cxx20
L A B E L " C + + 2 0 s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2019-05-28 14:19:42 +00:00
" #if __cplusplus > 201703L
2021-02-09 12:12:09 +00:00
/ / C o m p i l e r c l a i m s t o s u p p o r t C + + 2 0 , t r u s t i t
2019-05-28 14:19:42 +00:00
#else
# error __cplusplus must be > 201703L (the value for C++17)
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-05-28 14:19:42 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
2019-10-17 08:49:44 +00:00
"
C X X _ S T A N D A R D 2 0
2019-05-28 14:19:42 +00:00
)
2022-02-04 10:52:55 +00:00
qt_config_compile_test ( cxx2b
L A B E L " C + + 2 b s u p p o r t "
C O D E
" #if __cplusplus > 202002L
/ / C o m p i l e r c l a i m s t o s u p p o r t C + + 2 B , t r u s t i t
#else
# error __cplusplus must be > 202002L (the value for C++20)
#endif
i n t main ( void )
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
"
C X X _ S T A N D A R D 2 3
)
2019-04-16 14:32:08 +00:00
# precompile_header
qt_config_compile_test ( precompile_header
L A B E L " p r e c o m p i l e d h e a d e r s u p p o r t "
2021-06-17 20:18:22 +00:00
P R O J E C T _ P A T H " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f i g . t e s t s / p r e c o m p i l e _ h e a d e r "
2019-04-16 14:32:08 +00:00
)
2020-08-19 14:49:13 +00:00
qt_config_compiler_supports_flag_test ( optimize_debug
L A B E L " - O g s u p p o r t "
F L A G " - O g "
)
2022-07-15 23:32:11 +00:00
qt_config_compile_test ( no_direct_extern_access
L A B E L " - m n o - d i r e c t - e x t e r n - a c c e s s / - f n o - d i r e c t - a c c e s s - e x t e r n a l - d a t a s u p p o r t "
P R O J E C T _ P A T H " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f i g . t e s t s / n o _ d i r e c t _ e x t e r n _ a c c e s s "
2012-01-23 13:46:58 +00:00
)
2020-08-21 10:59:24 +00:00
qt_config_linker_supports_flag_test ( enable_new_dtags
L A B E L " n e w d t a g s s u p p o r t "
F L A G " - - e n a b l e - n e w - d t a g s "
)
qt_config_linker_supports_flag_test ( gdb_index
L A B E L " g d b i n d e x s u p p o r t "
F L A G " - - g d b - i n d e x "
)
2018-10-24 13:20:27 +00:00
# reduce_relocations
qt_config_compile_test ( reduce_relocations
L A B E L " - B s y m b o l i c - f u n c t i o n s s u p p o r t "
2019-10-21 12:35:57 +00:00
C O D E
2021-04-27 14:53:47 +00:00
" #if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64)) || defined(__sun)
2018-10-24 13:20:27 +00:00
# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" # FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")']
)
2020-02-26 10:41:20 +00:00
qt_config_compile_test ( "separate_debug_info"
2020-03-16 12:45:53 +00:00
L A B E L " s e p a r a t e d e b u g i n f o r m a t i o n s u p p o r t "
2020-04-03 14:33:24 +00:00
P R O J E C T _ P A T H " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f i g . t e s t s / s e p a r a t e _ d e b u g _ i n f o "
)
2019-10-11 14:55:55 +00:00
# signaling_nan
qt_config_compile_test ( signaling_nan
L A B E L " S i g n a l i n g N a N f o r d o u b l e s "
2019-10-21 12:35:57 +00:00
C O D E
2022-02-08 13:30:56 +00:00
" #if defined(__ghs) && (__GHS_VERSION_NUMBER <= 202014)
# error Signal NaNs are not supported by GHS compiler, but has_signaling_NaN returns TRUE. Will be fixed in future compiler releases.
#endif
#include <limits>
2019-10-11 14:55:55 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2019-10-11 14:55:55 +00:00
{
/ * B E G I N T E S T : * /
u s i n g B = s t d : : n u m e r i c _ l i m i t s < d o u b l e > ;
static_assert ( B::has_signaling_NaN, \"System lacks signaling NaN\ " ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
2022-02-24 02:03:40 +00:00
# basic x86 intrinsics support
qt_config_compile_test ( x86intrin
L A B E L " B a s i c x 8 6 i n t r i n s i c s "
P R O J E C T _ P A T H " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f i g . t e s t s / x 8 6 i n t r i n "
)
2018-10-24 13:20:27 +00:00
2022-02-24 01:54:40 +00:00
# x86: avx512vbmi2
qt_config_compile_test_x86simd ( avx512vbmi2 "AVX512VBMI2" )
# x86: vaes
qt_config_compile_test_x86simd ( vaes "VAES" )
2018-10-24 13:20:27 +00:00
# posix_fallocate
qt_config_compile_test ( posix_fallocate
L A B E L " P O S I X fallocate ( ) "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <fcntl.h>
2018-10-24 13:20:27 +00:00
#include <unistd.h>
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
( v o i d ) posix_fallocate ( 0, 0, 0 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# alloca_stdlib_h
qt_config_compile_test ( alloca_stdlib_h
L A B E L " alloca ( ) i n s t d l i b . h "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <stdlib.h>
2018-10-24 13:20:27 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
alloca ( 1 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# alloca_h
qt_config_compile_test ( alloca_h
L A B E L " alloca ( ) i n a l l o c a . h "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <alloca.h>
2018-10-24 13:20:27 +00:00
#ifdef __QNXNTO__
/ / e x t r a i n c l u d e n e e d e d i n Q N X 7 t o d e f i n e N U L L f o r t h e alloca ( ) m a c r o
# include <stddef.h>
#endif
2021-02-12 15:40:33 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
alloca ( 1 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# alloca_malloc_h
qt_config_compile_test ( alloca_malloc_h
L A B E L " alloca ( ) i n m a l l o c . h "
2019-10-21 12:35:57 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" #include <malloc.h>
2018-10-24 13:20:27 +00:00
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
alloca ( 1 ) ;
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
# stack_protector
qt_config_compile_test ( stack_protector
L A B E L " s t a c k p r o t e c t i o n "
2020-02-26 09:39:47 +00:00
C O M P I L E _ O P T I O N S - f s t a c k - p r o t e c t o r - s t r o n g
2019-10-21 12:35:57 +00:00
C O D E
2018-10-24 13:20:27 +00:00
" #ifdef __QNXNTO__
# include <sys/neutrino.h>
# if _NTO_VERSION < 700
# error stack-protector not used (by default) before QNX 7.0.0.
# endif
#endif
2021-02-12 11:31:17 +00:00
i n t main ( void )
2018-10-24 13:20:27 +00:00
{
/ * B E G I N T E S T : * /
/ * E N D T E S T : * /
r e t u r n 0 ;
}
2020-02-26 09:39:47 +00:00
" )
2018-10-24 13:20:27 +00:00
2020-05-29 17:01:36 +00:00
# intelcet
qt_config_compile_test ( intelcet
2022-09-20 09:42:39 +00:00
L A B E L " S u p p o r t f o r I n t e l C o n t r o l - f l o w E n f o r c e m e n t Technology ( CET ) "
2020-05-29 17:01:36 +00:00
C O D E
2021-02-12 15:40:33 +00:00
" i n t main ( void )
2020-05-29 17:01:36 +00:00
{
/ * B E G I N T E S T : * /
#if !defined(__CET__)
# error Intel CET not available
#endif
/ * E N D T E S T : * /
r e t u r n 0 ;
}
" )
2018-10-24 13:20:27 +00:00
#### Features
# This belongs into gui, but the license check needs it here already.
2019-11-29 18:45:38 +00:00
qt_feature ( "android-style-assets" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " A n d r o i d S t y l e A s s e t s "
C O N D I T I O N A N D R O I D
)
2020-02-26 12:08:10 +00:00
qt_feature ( "shared" PUBLIC
L A B E L " B u i l d i n g s h a r e d l i b r a r i e s "
2022-08-19 12:25:49 +00:00
A U T O D E T E C T N O T U I K I T
2020-02-26 12:08:10 +00:00
C O N D I T I O N B U I L D _ S H A R E D _ L I B S
)
2020-03-31 12:12:01 +00:00
qt_feature_definition ( "shared" "QT_STATIC" NEGATE PREREQUISITE "!defined(QT_SHARED) && !defined(QT_STATIC)" )
2020-02-26 12:08:10 +00:00
qt_feature_config ( "shared" QMAKE_PUBLIC_QT_CONFIG )
qt_feature_config ( "shared" QMAKE_PUBLIC_CONFIG )
2020-04-01 20:26:19 +00:00
qt_feature ( "static" PUBLIC
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
)
qt_feature_config ( "static" QMAKE_PUBLIC_QT_CONFIG )
qt_feature_config ( "static" QMAKE_PUBLIC_CONFIG )
2020-04-16 20:33:14 +00:00
qt_feature ( "cross_compile" PUBLIC
L A B E L " C r o s s c o m p i l i n g "
C O N D I T I O N C M A K E _ C R O S S C O M P I L I N G
)
qt_feature_config ( "cross_compile" QMAKE_PUBLIC_CONFIG )
qt_feature_config ( "cross_compile" QMAKE_PRIVATE_CONFIG )
2020-06-12 17:12:26 +00:00
qt_feature ( "gc_binaries" PRIVATE
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
)
2020-08-20 08:19:32 +00:00
qt_feature ( "optimize_debug"
L A B E L " O p t i m i z e d e b u g b u i l d "
A U T O D E T E C T N O T Q T _ F E A T U R E _ d e v e l o p e r _ b u i l d
C O N D I T I O N N O T MSVC A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release ) A N D T E S T _ o p t i m i z e _ d e b u g
)
qt_feature_config ( "optimize_debug" QMAKE_PRIVATE_CONFIG )
2020-08-21 06:40:54 +00:00
qt_feature ( "optimize_size"
L A B E L " O p t i m i z e r e l e a s e b u i l d f o r s i z e "
A U T O D E T E C T O F F
C O N D I T I O N N O T Q T _ F E A T U R E _ d e b u g O R Q T _ F E A T U R E _ d e b u g _ a n d _ r e l e a s e
)
qt_feature_config ( "optimize_size" QMAKE_PRIVATE_CONFIG )
2020-10-05 07:09:13 +00:00
# special case begin
qt_feature ( "optimize_full"
L A B E L " F u l l y o p t i m i z e r e l e a s e builds ( -O3 ) "
A U T O D E T E C T O F F
)
qt_feature_config ( "optimize_full" QMAKE_PRIVATE_CONFIG )
2020-10-02 16:24:32 +00:00
qt_feature ( "msvc_obj_debug_info"
L A B E L " E m b e d d e b u g i n f o i n o b j e c t files ( MSVC ) "
C O N D I T I O N MSVC
A U T O D E T E C T O F F
)
qt_feature_config ( "msvc_obj_debug_info" QMAKE_PRIVATE_CONFIG )
2020-10-05 07:09:13 +00:00
# special case end
2020-04-16 05:08:06 +00:00
qt_feature ( "pkg-config" PUBLIC
L A B E L " U s i n g p k g - c o n f i g "
2020-09-28 08:40:47 +00:00
A U T O D E T E C T N O T APPLE A N D N O T WIN32 A N D N O T A N D R O I D
2020-04-16 05:08:06 +00:00
C O N D I T I O N P K G _ C O N F I G _ F O U N D
)
qt_feature_config ( "pkg-config" QMAKE_PUBLIC_QT_CONFIG
N E G A T E )
2022-02-22 17:51:16 +00:00
qt_feature ( "developer-build" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " D e v e l o p e r b u i l d "
A U T O D E T E C T O F F
)
2022-02-22 17:51:16 +00:00
qt_feature ( "no-prefix" PRIVATE
L A B E L " N o p r e f i x b u i l d "
2022-04-13 15:47:56 +00:00
A U T O D E T E C T N O T Q T _ W I L L _ I N S T A L L
C O N D I T I O N N O T Q T _ W I L L _ I N S T A L L
2022-02-22 17:51:16 +00:00
)
2019-03-14 12:22:09 +00:00
qt_feature ( "private_tests" PRIVATE
L A B E L " D e v e l o p e r b u i l d : p r i v a t e _ t e s t s "
2019-07-17 14:10:31 +00:00
C O N D I T I O N Q T _ F E A T U R E _ d e v e l o p e r _ b u i l d
2019-03-14 12:22:09 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_definition ( "developer-build" "QT_BUILD_INTERNAL" )
qt_feature_config ( "developer-build" QMAKE_PUBLIC_QT_CONFIG
N A M E " p r i v a t e _ t e s t s "
)
2021-06-16 06:44:36 +00:00
qt_feature ( "debug" PRIVATE
2020-02-26 11:53:30 +00:00
L A B E L " B u i l d f o r d e b u g g i n g "
2020-08-21 13:16:31 +00:00
A U T O D E T E C T O N
2020-03-06 08:28:12 +00:00
C O N D I T I O N C M A K E _ B U I L D _ T Y P E S T R E Q U A L D e b u g O R D e b u g I N _ L I S T C M A K E _ C O N F I G U R A T I O N _ T Y P E S
2020-02-26 11:53:30 +00:00
)
2020-02-26 12:23:05 +00:00
qt_feature ( "debug_and_release" PUBLIC
L A B E L " C o m p i l e l i b s i n d e b u g a n d r e l e a s e m o d e "
A U T O D E T E C T 1
C O N D I T I O N Q T _ G E N E R A T O R _ I S _ M U L T I _ C O N F I G
)
qt_feature_config ( "debug_and_release" QMAKE_PUBLIC_QT_CONFIG )
2020-02-26 12:38:23 +00:00
qt_feature ( "force_debug_info"
L A B E L " A d d d e b u g i n f o i n r e l e a s e m o d e "
A U T O D E T E C T C M A K E _ B U I L D _ T Y P E S T R E Q U A L R e l W i t h D e b I n f o O R R e l W i t h D e b I n f o I N _ L I S T C M A K E _ C O N F I G U R A T I O N _ T Y P E S
)
qt_feature_config ( "force_debug_info" QMAKE_PRIVATE_CONFIG )
2020-02-26 10:41:20 +00:00
qt_feature ( "separate_debug_info" PUBLIC
L A B E L " S p l i t o f f d e b u g i n f o r m a t i o n "
A U T O D E T E C T O F F
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 )
)
qt_feature_config ( "separate_debug_info" QMAKE_PUBLIC_QT_CONFIG )
2019-11-29 18:45:38 +00:00
qt_feature ( "appstore-compliant" PUBLIC
2018-10-24 13:20:27 +00:00
L A B E L " A p p s t o r e c o m p l i a n c e "
P U R P O S E " D i s a b l e s c o d e t h a t i s n o t a l l o w e d i n p l a t f o r m a p p s t o r e s "
2020-06-05 07:24:37 +00:00
A U T O D E T E C T U I K I T O R A N D R O I D
2018-10-24 13:20:27 +00:00
)
2022-02-01 14:44:06 +00:00
if ( APPLE )
qt_feature_definition ( "appstore-compliant" "QT_APPLE_NO_PRIVATE_APIS" )
endif ( )
2018-10-24 13:20:27 +00:00
qt_feature ( "simulator_and_device" PUBLIC
L A B E L " B u i l d f o r b o t h s i m u l a t o r a n d d e v i c e "
2020-03-16 12:36:47 +00:00
C O N D I T I O N U I K I T A N D N O T Q T _ U I K I T _ S D K
2018-10-24 13:20:27 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "simulator_and_device" QMAKE_PUBLIC_QT_CONFIG )
2020-03-31 07:39:50 +00:00
qt_feature ( "rpath" PUBLIC
L A B E L " B u i l d w i t h R P A T H "
A U T O D E T E C T 1
CMake: Handle automatic rpath embedding correctly
Instead of using CMAKE_INSTALL_RPATH to embed an absolute path
to prefix/libdir into all targets, use the more sophisticated aproach
that qmake does.
For certain targets (modules, plugins, tools) use relative rpaths.
Otherwise embed absolute paths (examples, regular binaries).
Installed tests currently have no rpaths.
On certain platforms rpaths are not used (Windows, Android,
iOS / uikit).
Frameworks, app bundles and shallow bundles should also be handled
correctly.
Additional rpaths can be provided via QT_EXTRA_RPATHS variable
(similar to the -R option that configure takes).
Automatic embedding can be disabled either via QT_FEATURE_rpath=OFF
or QT_DISABLE_RPATH=ON.
Note that installed examples are not relocatable at the moment (due
to always having an absolute path rpath), so this is a missing feature
compared to qmake. This is due to missing information on where
examples will be installed, so a relative rpath can not be computed.
By default a Qt installation is relocatable, so there is no need to
pass -DQT_EXTRA_RPATHS=. like Coin used to do with qmake e.g. -R .
Relative rpaths will have the appropriate 'relative base' prefixed
to them (e.g $ORIGIN on linux and @loader_path on darwin platforms).
There is currently no support for other platforms that might have a
different 'relative base' than the ones mentioned above.
Any extra rpaths are saved to BuildInternalsExtra which are re-used
when building other repositories.
configurejson2cmake modified to include correct conditions for the
rpath feature.
It's very likely that we will need a new qt_add_internal_app()
function for gui apps that are to be installed to prefix/bin.
For example for Assistant from qttools. Currently such apps
use qt_add_executable().
The distinction is necessary to make sure that relative rpaths are
embedded into apps, but not executables (which tests are part of).
Amends e835a6853b9c0fb7af32798ed8965de3adf0e15b
Task-number: QTBUG-83497
Change-Id: I3510f63c0a59489741116cc8ec3ef6a0a7704f25
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-15 16:48:26 +00:00
C O N D I T I O N B U I L D _ S H A R E D _ L I B S A N D UNIX A N D N O T WIN32 A N D N O T A N D R O I D
2020-03-31 07:39:50 +00:00
)
qt_feature_config ( "rpath" QMAKE_PUBLIC_QT_CONFIG )
2018-10-24 13:20:27 +00:00
qt_feature ( "force_asserts" PUBLIC
L A B E L " F o r c e a s s e r t i o n s "
A U T O D E T E C T O F F
)
2019-11-29 18:45:38 +00:00
qt_feature ( "headersclean"
L A B E L " C h e c k f o r c l e a n h e a d e r s "
2020-05-13 13:35:52 +00:00
A U T O D E T E C T O F F
2019-11-29 18:45:38 +00:00
C O N D I T I O N N O T W A S M
)
qt_feature_config ( "headersclean" QMAKE_PRIVATE_CONFIG )
2018-10-24 13:20:27 +00:00
qt_feature ( "framework" PUBLIC
L A B E L " B u i l d A p p l e F r a m e w o r k s "
2020-03-09 12:37:41 +00:00
C O N D I T I O N APPLE A N D B U I L D _ S H A R E D _ L I B S A N D N O T C M A K E _ B U I L D _ T Y P E S T R E Q U A L D e b u g
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "framework" "QT_MAC_FRAMEWORK_BUILD" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "framework" QMAKE_PUBLIC_QT_CONFIG
N A M E " q t _ f r a m e w o r k "
)
qt_feature_config ( "framework" QMAKE_PUBLIC_CONFIG
N A M E " q t _ f r a m e w o r k "
)
2019-03-14 12:22:09 +00:00
qt_feature ( "largefile"
2018-10-24 13:20:27 +00:00
L A B E L " L a r g e f i l e s u p p o r t "
2020-06-05 07:24:37 +00:00
C O N D I T I O N N O T A N D R O I D A N D N O T I N T E G R I T Y A N D N O T r t e m s
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "largefile" "QT_LARGEFILE_SUPPORT" VALUE "64" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "largefile" QMAKE_PRIVATE_CONFIG )
qt_feature ( "testcocoon"
L A B E L " T e s t c o c o o n s u p p o r t "
A U T O D E T E C T O F F
)
qt_feature_config ( "testcocoon" QMAKE_PUBLIC_CONFIG )
2020-06-15 07:50:42 +00:00
qt_feature ( "sanitize_address"
L A B E L " A d d r e s s e s "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_address" QMAKE_PUBLIC_CONFIG )
qt_feature ( "sanitize_thread"
L A B E L " T h r e a d s "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_thread" QMAKE_PUBLIC_CONFIG )
qt_feature ( "sanitize_memory"
L A B E L " M e m o r y "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_memory" QMAKE_PUBLIC_CONFIG )
2020-01-16 09:42:05 +00:00
qt_feature ( "sanitize_fuzzer_no_link"
L A B E L " Fuzzer ( instrumentation only ) "
P U R P O S E " A d d s i n s t r u m e n t a t i o n f o r f u z z i n g t o t h e b i n a r i e s b u t l i n k s t o t h e u s u a l m a i n f u n c t i o n i n s t e a d o f a f u z z e r ' s . "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_fuzzer_no_link" QMAKE_PUBLIC_CONFIG )
2020-06-15 07:50:42 +00:00
qt_feature ( "sanitize_undefined"
L A B E L " U n d e f i n e d "
A U T O D E T E C T O F F
)
qt_feature_config ( "sanitize_undefined" QMAKE_PUBLIC_CONFIG )
qt_feature ( "sanitizer"
L A B E L " S a n i t i z e r s "
C O N D I T I O N Q T _ F E A T U R E _ s a n i t i z e _ a d d r e s s O R Q T _ F E A T U R E _ s a n i t i z e _ t h r e a d O R Q T _ F E A T U R E _ s a n i t i z e _ m e m o r y O R Q T _ F E A T U R E _ s a n i t i z e _ f u z z e r _ n o _ l i n k O R Q T _ F E A T U R E _ s a n i t i z e _ u n d e f i n e d
)
qt_feature_config ( "sanitizer" QMAKE_PUBLIC_CONFIG )
2019-11-29 18:45:38 +00:00
qt_feature ( "plugin-manifests"
L A B E L " E m b e d m a n i f e s t s i n p l u g i n s "
A U T O D E T E C T O F F
E M I T _ I F WIN32
)
qt_feature_config ( "plugin-manifests" QMAKE_PUBLIC_CONFIG
N E G A T E
N A M E " n o _ p l u g i n _ m a n i f e s t "
)
qt_feature ( "c++11" PUBLIC
2019-05-28 14:19:42 +00:00
L A B E L " C + + 1 1 "
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++11" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++14" PUBLIC
2019-05-28 14:19:42 +00:00
L A B E L " C + + 1 4 "
2019-10-17 08:49:44 +00:00
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 1 A N D T E S T _ c x x 1 4
2019-05-28 14:19:42 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++14" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++17" PUBLIC
2019-05-28 14:19:42 +00:00
L A B E L " C + + 1 7 "
2019-10-17 08:49:44 +00:00
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 4 A N D T E S T _ c x x 1 7
2019-05-28 14:19:42 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++17" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++1z" PUBLIC
2019-10-11 14:55:55 +00:00
L A B E L " C + + 1 7 "
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 7
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++1z" QMAKE_PUBLIC_QT_CONFIG )
2021-02-09 12:12:09 +00:00
qt_feature ( "c++20" PUBLIC
L A B E L " C + + 2 0 "
2019-05-28 14:19:42 +00:00
A U T O D E T E C T O F F
2021-02-09 12:12:09 +00:00
C O N D I T I O N Q T _ F E A T U R E _ c x x 1 7 A N D T E S T _ c x x 2 0
)
qt_feature_config ( "c++20" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "c++2a" PUBLIC
L A B E L " C + + 2 0 "
C O N D I T I O N Q T _ F E A T U R E _ c x x 2 0
2019-05-28 14:19:42 +00:00
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "c++2a" QMAKE_PUBLIC_QT_CONFIG )
2022-04-13 07:01:48 +00:00
qt_feature ( "c++2b" PUBLIC
L A B E L " C + + 2 b "
A U T O D E T E C T O F F
)
qt_feature_config ( "c++2b" QMAKE_PUBLIC_QT_CONFIG )
2022-02-04 10:52:55 +00:00
qt_feature ( "c++2b" PUBLIC
L A B E L " C + + 2 b "
A U T O D E T E C T F A L S E
C O N D I T I O N Q T _ F E A T U R E _ c x x 2 0 AND ( CMAKE_VERSION VERSION_GREATER_EQUAL "3.20" ) A N D T E S T _ c x x 2 b
)
2020-03-06 12:34:59 +00:00
qt_feature ( "c89"
L A B E L " C 8 9 "
)
qt_feature ( "c99" PUBLIC
L A B E L " C 9 9 "
C O N D I T I O N c _ s t d _ 9 9 I N _ L I S T C M A K E _ C _ C O M P I L E _ F E A T U R E S
)
qt_feature ( "c11" PUBLIC
L A B E L " C 1 1 "
C O N D I T I O N Q T _ F E A T U R E _ c 9 9 A N D c _ s t d _ 1 1 I N _ L I S T C M A K E _ C _ C O M P I L E _ F E A T U R E S
)
2020-04-03 14:33:24 +00:00
qt_feature ( "precompile_header"
L A B E L " U s i n g p r e c o m p i l e d h e a d e r s "
2021-06-17 20:18:22 +00:00
C O N D I T I O N B U I L D _ W I T H _ P C H A N D T E S T _ p r e c o m p i l e _ h e a d e r
2020-09-03 08:29:41 +00:00
A U T O D E T E C T N O T W A S M
2020-04-03 14:33:24 +00:00
)
qt_feature_config ( "precompile_header" QMAKE_PRIVATE_CONFIG )
2020-08-27 12:11:00 +00:00
set ( __qt_ltcg_detected FALSE )
if ( CMAKE_INTERPROCEDURAL_OPTIMIZATION )
set ( __qt_ltcg_detected TRUE )
else ( )
foreach ( config ${ CMAKE_BUILD_TYPE } ${ CMAKE_CONFIGURATION_TYPES } )
2020-11-05 10:14:17 +00:00
string ( TOUPPER "${config}" __qt_uc_config )
if ( CMAKE_INTERPROCEDURAL_OPTIMIZATION_ ${ __qt_uc_config } )
2020-08-27 12:11:00 +00:00
set ( __qt_ltcg_detected TRUE )
break ( )
endif ( )
endforeach ( )
2020-11-05 10:14:17 +00:00
unset ( __qt_uc_config )
2020-08-27 12:11:00 +00:00
endif ( )
2020-04-17 06:39:47 +00:00
qt_feature ( "ltcg"
2022-09-26 03:43:11 +00:00
L A B E L " U s i n g L i n k T i m e Optimization ( LTCG ) "
2020-08-27 12:11:00 +00:00
A U T O D E T E C T O N
C O N D I T I O N _ _ q t _ l t c g _ d e t e c t e d
2020-04-17 06:39:47 +00:00
)
qt_feature_config ( "ltcg" QMAKE_PRIVATE_CONFIG )
2021-08-19 20:13:53 +00:00
if ( NOT QT_CONFIGURE_RUNNING )
# This feature is used early in QtCompilerOptimization.cmake.
qt_evaluate_feature ( ltcg )
endif ( )
2020-12-21 18:29:30 +00:00
qt_feature ( "enable_new_dtags"
L A B E L " U s i n g n e w D T A G S "
C O N D I T I O N L I N U X A N D T E S T _ e n a b l e _ n e w _ d t a g s
)
qt_feature_config ( "enable_new_dtags" QMAKE_PRIVATE_CONFIG )
2020-08-21 07:22:23 +00:00
qt_feature ( "enable_gdb_index"
L A B E L " G e n e r a t i n g G D B i n d e x "
A U T O D E T E C T Q T _ F E A T U R E _ d e v e l o p e r _ b u i l d
C O N D I T I O N G C C A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release ) A N D T E S T _ g d b _ i n d e x
)
qt_feature_config ( "enable_gdb_index" QMAKE_PRIVATE_CONFIG )
2019-03-14 12:22:09 +00:00
qt_feature ( "reduce_exports" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " R e d u c e a m o u n t o f e x p o r t e d s y m b o l s "
2020-08-25 06:17:23 +00:00
C O N D I T I O N N O T MSVC
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "reduce_exports" "QT_VISIBILITY_AVAILABLE" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "reduce_exports" QMAKE_PUBLIC_QT_CONFIG )
2022-07-15 23:32:11 +00:00
qt_feature ( "no_direct_extern_access" PRIVATE
2012-01-23 13:46:58 +00:00
L A B E L " U s e p r o t e c t e d v i s i b i l i t y a n d - m n o - d i r e c t - e x t e r n - a c c e s s "
2022-07-15 23:32:11 +00:00
C O N D I T I O N N O T WIN32 A N D T E S T _ n o _ d i r e c t _ e x t e r n _ a c c e s s
2022-07-18 18:06:20 +00:00
A U T O D E T E C T O F F
2012-01-23 13:46:58 +00:00
)
2022-07-15 23:32:11 +00:00
qt_feature_definition ( "no_direct_extern_access" "QT_USE_PROTECTED_VISIBILITY" )
qt_feature_config ( "no_direct_extern_access" QMAKE_PUBLIC_QT_CONFIG )
2012-01-23 13:46:58 +00:00
qt_feature ( "reduce_relocations" PUBLIC
2020-02-17 13:58:16 +00:00
L A B E L " R e d u c e a m o u n t o f r e l o c a t i o n s "
C O N D I T I O N N O T WIN32 A N D T E S T _ r e d u c e _ r e l o c a t i o n s
)
qt_feature_definition ( "reduce_relocations" "QT_REDUCE_RELOCATIONS" )
qt_feature_config ( "reduce_relocations" QMAKE_PUBLIC_QT_CONFIG )
2019-10-11 14:55:55 +00:00
qt_feature ( "signaling_nan" PUBLIC
L A B E L " S i g n a l i n g N a N "
C O N D I T I O N T E S T _ s i g n a l i n g _ n a n
)
2022-02-24 02:03:40 +00:00
qt_feature ( "x86intrin" PRIVATE
L A B E L " B a s i c "
CONDITION ( ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
AND ( QT_FORCE_FEATURE_x86intrin OR TEST_x86intrin ) )
2021-04-16 05:34:57 +00:00
A U T O D E T E C T N O T W A S M
2018-10-24 13:20:27 +00:00
)
2022-02-24 02:03:40 +00:00
qt_feature ( "sse2" PRIVATE
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
)
2018-10-24 13:20:27 +00:00
qt_feature_definition ( "sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "sse3" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "sse3" "QT_COMPILER_SUPPORTS_SSE3" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse3" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "ssse3" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "ssse3" "QT_COMPILER_SUPPORTS_SSSE3" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "ssse3" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "sse4_1" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "sse4_1" "QT_COMPILER_SUPPORTS_SSE4_1" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse4_1" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "sse4_2" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "sse4_2" "QT_COMPILER_SUPPORTS_SSE4_2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "sse4_2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx" "QT_COMPILER_SUPPORTS_AVX" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "f16c" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "f16c" "QT_COMPILER_SUPPORTS_F16C" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "f16c" QMAKE_PRIVATE_CONFIG )
2019-03-14 12:22:09 +00:00
qt_feature ( "avx2" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512f" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512f" "QT_COMPILER_SUPPORTS_AVX512F" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512f" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512er" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512er" "QT_COMPILER_SUPPORTS_AVX512ER" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512er" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512cd" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512cd" "QT_COMPILER_SUPPORTS_AVX512CD" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512cd" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512pf" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512pf" "QT_COMPILER_SUPPORTS_AVX512PF" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512pf" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512dq" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512dq" "QT_COMPILER_SUPPORTS_AVX512DQ" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512dq" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512bw" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512bw" "QT_COMPILER_SUPPORTS_AVX512BW" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512bw" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512vl" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512vl" "QT_COMPILER_SUPPORTS_AVX512VL" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512vl" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512ifma" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512ifma" "QT_COMPILER_SUPPORTS_AVX512IFMA" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512ifma" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "avx512vbmi" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "avx512vbmi" QMAKE_PRIVATE_CONFIG )
2022-02-24 01:54:40 +00:00
qt_feature ( "avx512vbmi2" PRIVATE
L A B E L " A V X 5 1 2 V B M I 2 "
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n A N D T E S T _ s u b a r c h _ a v x 5 1 2 v b m i 2
2022-02-24 01:54:40 +00:00
)
qt_feature_definition ( "avx512vbmi2" "QT_COMPILER_SUPPORTS_AVX512VBMI2" VALUE "1" )
qt_feature_config ( "avx512vbmi2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "aesni" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "aesni" QMAKE_PRIVATE_CONFIG )
2022-02-24 01:54:40 +00:00
qt_feature ( "vaes" PRIVATE
L A B E L " V A E S "
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n A N D T E S T _ s u b a r c h _ v a e s
2022-02-24 01:54:40 +00:00
)
qt_feature_definition ( "vaes" "QT_COMPILER_SUPPORTS_VAES" VALUE "1" )
qt_feature_config ( "vaes" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "rdrnd" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "rdrnd" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "rdseed" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2019-10-11 14:55:55 +00:00
)
qt_feature_definition ( "rdseed" "QT_COMPILER_SUPPORTS_RDSEED" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "rdseed" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "shani" PRIVATE
2022-02-24 02:03:40 +00:00
C O N D I T I O N Q T _ F E A T U R E _ x 8 6 i n t r i n
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "shani" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "mips_dsp" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " D S P "
2019-03-21 12:14:09 +00:00
CONDITION ( TEST_architecture_arch STREQUAL mips ) A N D T E S T _ a r c h _ $ { T E S T _ a r c h i t e c t u r e _ a r c h } _ s u b a r c h _ d s p
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "mips_dsp" "QT_COMPILER_SUPPORTS_MIPS_DSP" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "mips_dsp" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "mips_dspr2" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " D S P r 2 "
2019-03-21 12:14:09 +00:00
CONDITION ( TEST_architecture_arch STREQUAL mips ) A N D T E S T _ a r c h _ $ { T E S T _ a r c h i t e c t u r e _ a r c h } _ s u b a r c h _ d s p r 2
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "mips_dspr2" QMAKE_PRIVATE_CONFIG )
2021-03-31 16:56:59 +00:00
qt_feature ( "neon" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " N E O N "
CMake: Fix building multi-arch universal macOS Qt
Use the same approach we use for iOS, which is to set multiple
CMAKE_OSX_ARCHITECTURES values and let the clang front end
deal with lipo-ing the final libraries.
For now, Qt can be configured to build universal macOS libraries by
passing 2 architectures to CMake, either via:
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
or
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
Currently we recommend specifying the intel x86_64 arch as the first
one, to get an intel slice configuration that is comparable to a
non-universal intel build.
Specifying the arm64 slice first could pessimize optimizations and
reduce the feature set for the intel slice due to the limitation
that we run configure tests only once.
The first specified architecture is the one used to do all the
configure tests.
It 'mostly' defines the common feature set of both architecture
slices, with the excepion of some special handling for sse2 and
neon instructions.
In the future we might want to run at least the Qt architecture config
test for all specified architectures, so that we can extract all the
supported sub-arches and instruction sets in a reliable way.
For now, we use the same sse2 hack as for iOS simulator_and_device
builds, otherwise QtGui fails to link due to missing
qt_memfill32_sse2 and other symbols.
The hack is somewhat augmented to ensure that reconfiguration
still succeeds (same issue happened with iOS). Previously the sse2
feature condition was broken due to force setting the feature
to be ON. Now the condition also checks for a special
QT_FORCE_FEATURE_sse2 variable which we set internally.
Note that we shouldn't build for arm64e, because the binaries
get killed when running on AS with the following message:
kernel: exec_mach_imgact: not running binary built against
preview arm64e ABI.
Aslo, by default, we disable the arm64 slice for qt sql plugins,
mostly because the CI provisioned sql libraries that we depend on only
contain x86_64 slices, and trying to build the sql plugins for both
slices will fail with linker errors.
This behavior can be disabled for all targets marked by
qt_internal_force_macos_intel_arch, by setting the
QT_FORCE_MACOS_ALL_ARCHES CMake option to ON.
To disble it per-target one can set
QT_FORCE_MACOS_ALL_ARCHES_${target} to ON.
Task-number: QTBUG-85447
Change-Id: Iccb5dfcc1a21a8a8292bd3817df0ea46c3445f75
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-03-24 15:03:35 +00:00
CONDITION ( ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_ ${ TEST_architecture_arch } _subarch_neon ) O R Q T _ F O R C E _ F E A T U R E _ n e o n # special case
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "neon" QMAKE_PRIVATE_CONFIG )
2021-04-21 09:33:44 +00:00
qt_feature ( "arm_crc32" PRIVATE
L A B E L " C R C 3 2 "
CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) A N D T E S T _ a r c h _ $ { T E S T _ a r c h i t e c t u r e _ a r c h } _ s u b a r c h _ c r c 3 2
)
qt_feature_definition ( "arm_crc32" "QT_COMPILER_SUPPORTS_CRC32" VALUE "1" )
qt_feature_config ( "arm_crc32" QMAKE_PRIVATE_CONFIG )
qt_feature ( "arm_crypto" PRIVATE
L A B E L " A E S "
CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) A N D T E S T _ a r c h _ $ { T E S T _ a r c h i t e c t u r e _ a r c h } _ s u b a r c h _ c r y p t o
)
qt_feature_definition ( "arm_crypto" "QT_COMPILER_SUPPORTS_AES" VALUE "1" )
qt_feature_config ( "arm_crypto" QMAKE_PRIVATE_CONFIG )
2020-03-24 15:29:54 +00:00
qt_feature ( "posix_fallocate" PRIVATE
L A B E L " P O S I X fallocate ( ) "
C O N D I T I O N T E S T _ p o s i x _ f a l l o c a t e
)
2018-10-24 13:20:27 +00:00
qt_feature ( "alloca_h" PRIVATE
L A B E L " a l l o c a . h "
C O N D I T I O N T E S T _ a l l o c a _ h
)
qt_feature ( "alloca_malloc_h" PRIVATE
L A B E L " alloca ( ) i n m a l l o c . h "
C O N D I T I O N N O T Q T _ F E A T U R E _ a l l o c a _ h A N D T E S T _ a l l o c a _ m a l l o c _ h
)
qt_feature ( "alloca" PRIVATE
L A B E L " alloca ( ) "
C O N D I T I O N Q T _ F E A T U R E _ a l l o c a _ h O R Q T _ F E A T U R E _ a l l o c a _ m a l l o c _ h O R T E S T _ a l l o c a _ s t d l i b _ h
)
2020-02-26 09:39:47 +00:00
qt_feature ( "stack-protector-strong" PRIVATE
L A B E L " s t a c k p r o t e c t i o n "
C O N D I T I O N Q N X A N D T E S T _ s t a c k _ p r o t e c t o r
)
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
qt_feature ( "system-zlib" PRIVATE
L A B E L " U s i n g s y s t e m z l i b "
2022-03-31 10:41:13 +00:00
C O N D I T I O N W r a p S y s t e m Z L I B _ F O U N D
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that:
- the python scripts do not ignore certain system_foo features anymore
(it is a hardcoded list for now just to be safe)
- configurejson2cmake now outputs
qt_find_package(WrapSystemFoo) calls for bundled libraries
(see below)
- the harfbuzz .pro file is modified to accommodate pro2cmake
not being able to correctly parse some conditional scopes
- the freetype .pro file is modified to make sure linking of the
library succeeds without duplicate symbol errors, which qmake
doesn't encounter due to magical exclusion of cpp files that are
included in other cpp files (presumably for include moc_foo.cpp
support)
- feature evaluation for Core, Gui, Network now happens in the
qtbase/src directory, so that bundled libraries can be conditionally
built
- for each bundled library there are now two FindWrap scripts:
- FindWrapSystemFoo which finds an installed library in the system
- FindWrapFoo which either uses the system installed library or
the built bundled one depending on a condition
- projects that intend to use bundled libraries need to link against
WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets
(this is handled by pro2cmake).
Unfortunately manually added qt_find_package(WrapFoo) calls might
still be needed as is the case for WrapFreetype and others.
- a new cmake/QtFindWrapHelper.cmake file is added that provides
a macro to simplify creation of WrapFoo targets that link against
a bundled or system library. The implementation is fairly ugly
due to CMake macro constraints, but it was deemed better than
copy-pasting a bunch of almost identical code across all
FindWrapFoo.cmake files.
- a qtzlib header-only module is now created when using bundled
zlib, to provide public syncqt created headers for consumers
that need them. These are projects that have
'QT_PRIVATE += zlib-private' in their .pro files
(e.g. qtimageformats, qtlocation, qt3d, etc.)
This is unfortunately needed due to QtNetwork using zlib
types in its private C++ API.
The change includes support for building the following bundled
libraries:
- zlib
- libpng
- libjpeg
- Freetype
- Harfbuzz-ng
- PCRE2
The following 3rd party libraries are still using an old
implementation within the CMake build system, and should be migrated
to the new one in the near future:
- double-conversion
- Old harfbuzz
The are a few libraries that are not yet ported:
- system-sqlite
- systemxcb
- maybe others
Among other things, this change allows building qtbase on Windows
without requiring vcpkg.
Task-number: QTBUG-82167
Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-14 13:53:28 +00:00
)
2022-07-05 12:34:31 +00:00
qt_feature ( "zstd" PUBLIC
2019-04-16 14:32:08 +00:00
L A B E L " Z s t a n d a r d s u p p o r t "
2022-02-23 11:29:08 +00:00
C O N D I T I O N W r a p Z S T D _ F O U N D
2019-04-16 14:32:08 +00:00
)
2021-12-14 08:38:29 +00:00
qt_feature ( "stdlib-libcpp" PRIVATE
L A B E L " U s i n g s t d l i b = l i b c + + "
A U T O D E T E C T O F F
C O N D I T I O N L I N U X A N D N O T A N D R O I D
)
2021-04-15 14:41:02 +00:00
# special case begin
# Check whether CMake was built with zstd support.
# See https://gitlab.kitware.com/cmake/cmake/-/issues/21552
if ( NOT DEFINED CACHE{QT_CMAKE_ZSTD_SUPPORT} )
set ( QT_CMAKE_ZSTD_SUPPORT FALSE CACHE INTERNAL "" )
if ( CMAKE_VERSION VERSION_GREATER_EQUAL "3.18" )
execute_process ( COMMAND "${CMAKE_COMMAND}"
- P " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c o n f i g . t e s t s / c m a k e _ z s t d / c h e c k _ z s t d . c m a k e "
W O R K I N G _ D I R E C T O R Y " $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c o n f i g . t e s t s "
O U T P U T _ Q U I E T E R R O R _ Q U I E T
R E S U L T _ V A R I A B L E q t _ c h e c k _ z s t d _ e x i t _ c o d e )
if ( qt_check_zstd_exit_code EQUAL 0 )
set ( QT_CMAKE_ZSTD_SUPPORT TRUE CACHE INTERNAL "" )
endif ( )
unset ( qt_check_zstd_exit_code )
endif ( )
endif ( )
# special case end
2018-10-24 13:20:27 +00:00
qt_feature ( "thread" PUBLIC
S E C T I O N " K e r n e l "
L A B E L " T h r e a d s u p p o r t "
P U R P O S E " P r o v i d e s Q T h r e a d a n d r e l a t e d c l a s s e s . "
2019-04-16 14:32:08 +00:00
A U T O D E T E C T N O T W A S M
2018-10-24 13:20:27 +00:00
)
qt_feature ( "future" PUBLIC
S E C T I O N " K e r n e l "
L A B E L " Q F u t u r e "
P U R P O S E " P r o v i d e s Q F u t u r e a n d r e l a t e d c l a s s e s . "
C O N D I T I O N Q T _ F E A T U R E _ t h r e a d
)
qt_feature ( "concurrent" PUBLIC
S E C T I O N " K e r n e l "
L A B E L " Q t C o n c u r r e n t "
P U R P O S E " P r o v i d e s a h i g h - l e v e l m u l t i - t h r e a d i n g A P I . "
C O N D I T I O N Q T _ F E A T U R E _ f u t u r e
)
qt_feature_definition ( "concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1" )
qt_feature ( "dbus" PUBLIC PRIVATE
L A B E L " Q t D - B u s "
2020-06-05 07:24:37 +00:00
A U T O D E T E C T N O T U I K I T A N D N O T A N D R O I D
2020-09-03 08:29:41 +00:00
C O N D I T I O N Q T _ F E A T U R E _ t h r e a d A N D N O T W A S M
2018-10-24 13:20:27 +00:00
)
qt_feature_definition ( "dbus" "QT_NO_DBUS" NEGATE VALUE "1" )
2019-11-29 18:45:38 +00:00
qt_feature ( "dbus-linked" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " Q t D - B u s d i r e c t l y l i n k e d t o l i b d b u s "
2019-05-03 13:02:32 +00:00
C O N D I T I O N Q T _ F E A T U R E _ d b u s A N D D B u s 1 _ F O U N D
2018-10-24 13:20:27 +00:00
E N A B L E I N P U T _ d b u s S T R E Q U A L ' l i n k e d '
D I S A B L E I N P U T _ d b u s S T R E Q U A L ' r u n t i m e '
)
2020-08-18 08:59:03 +00:00
qt_feature ( "qreal"
L A B E L " T y p e f o r q r e a l "
C O N D I T I O N D E F I N E D Q T _ C O O R D _ T Y P E A N D N O T Q T _ C O O R D _ T Y P E S T R E Q U A L " d o u b l e "
)
qt_feature_definition ( "qreal" "QT_COORD_TYPE" VALUE "${QT_COORD_TYPE}" )
qt_feature_definition ( "qreal" "QT_COORD_TYPE_STRING" VALUE "\" ${ QT_COORD_TYPE } \"")
2018-10-24 13:20:27 +00:00
qt_feature ( "gui" PRIVATE
L A B E L " Q t G u i "
)
2019-11-29 18:45:38 +00:00
qt_feature_config ( "gui" QMAKE_PUBLIC_QT_CONFIG
N E G A T E )
2018-10-24 13:20:27 +00:00
qt_feature ( "network" PRIVATE
L A B E L " Q t N e t w o r k "
)
2021-02-02 10:51:59 +00:00
qt_feature ( "printsupport" PRIVATE
L A B E L " Q t P r i n t S u p p o r t "
C O N D I T I O N Q T _ F E A T U R E _ w i d g e t s
)
2018-10-24 13:20:27 +00:00
qt_feature ( "sql" PRIVATE
L A B E L " Q t S q l "
)
qt_feature ( "testlib" PRIVATE
L A B E L " Q t T e s t l i b "
)
2019-03-14 12:22:09 +00:00
qt_feature ( "widgets" PRIVATE
2018-10-24 13:20:27 +00:00
L A B E L " Q t W i d g e t s "
2020-03-16 12:36:47 +00:00
A U T O D E T E C T N O T T V O S A N D N O T W A T C H O S
2018-10-24 13:20:27 +00:00
C O N D I T I O N Q T _ F E A T U R E _ g u i
)
qt_feature_definition ( "widgets" "QT_NO_WIDGETS" NEGATE )
2019-11-29 18:45:38 +00:00
qt_feature_config ( "widgets" QMAKE_PUBLIC_QT_CONFIG
N E G A T E )
2018-10-24 13:20:27 +00:00
qt_feature ( "xml" PRIVATE
L A B E L " Q t X m l "
)
qt_feature ( "libudev" PRIVATE
L A B E L " u d e v "
2021-07-02 07:40:59 +00:00
C O N D I T I O N L i b u d e v _ F O U N D A N D N O T I N T E G R I T Y
2018-10-24 13:20:27 +00:00
)
2021-11-04 14:59:17 +00:00
qt_feature ( "openssl" PRIVATE
L A B E L " O p e n S S L "
C O N D I T I O N Q T _ F E A T U R E _ o p e n s s l _ r u n t i m e O R Q T _ F E A T U R E _ o p e n s s l _ l i n k e d
E N A B L E f a l s e
)
qt_feature_definition ( "openssl" "QT_NO_OPENSSL" NEGATE )
qt_feature_config ( "openssl" QMAKE_PUBLIC_QT_CONFIG )
qt_feature ( "openssl-runtime"
A U T O D E T E C T N O T W A S M
C O N D I T I O N T E S T _ o p e n s s l v 1 1 _ h e a d e r s O R T E S T _ o p e n s s l v 3 0 _ h e a d e r s
E N A B L E I N P U T _ o p e n s s l S T R E Q U A L ' y e s ' O R I N P U T _ o p e n s s l S T R E Q U A L ' r u n t i m e '
D I S A B L E I N P U T _ o p e n s s l S T R E Q U A L ' n o ' O R I N P U T _ o p e n s s l S T R E Q U A L ' l i n k e d ' O R I N P U T _ s s l S T R E Q U A L ' n o '
)
2022-09-27 10:28:39 +00:00
qt_feature ( "openssl-linked" PUBLIC
2021-11-04 14:59:17 +00:00
L A B E L " Q t d i r e c t l y l i n k e d t o O p e n S S L "
A U T O D E T E C T O F F
C O N D I T I O N T E S T _ o p e n s s l v 1 1 O R T E S T _ o p e n s s l v 3 0
E N A B L E I N P U T _ o p e n s s l S T R E Q U A L ' l i n k e d '
)
qt_feature_definition ( "openssl-linked" "QT_LINKED_OPENSSL" )
qt_feature ( "opensslv11" PUBLIC
L A B E L " O p e n S S L 1 . 1 "
C O N D I T I O N T E S T _ o p e n s s l v 1 1 O R T E S T _ o p e n s s l v 1 1 _ h e a d e r s
)
qt_feature ( "opensslv30" PUBLIC
L A B E L " O p e n S S L 3 . 0 "
C O N D I T I O N T E S T _ o p e n s s l v 3 0 O R T E S T _ o p e n s s l v 3 0 _ h e a d e r s
)
2020-04-17 06:56:26 +00:00
qt_feature ( "ccache"
L A B E L " U s i n g c c a c h e "
A U T O D E T E C T 1
C O N D I T I O N Q T _ U S E _ C C A C H E
)
qt_feature_config ( "ccache" QMAKE_PRIVATE_CONFIG )
2020-04-17 15:12:40 +00:00
qt_feature ( "static_runtime"
L A B E L " S t a t i c a l l y l i n k t h e C / C + + r u n t i m e l i b r a r y "
A U T O D E T E C T O F F
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
E M I T _ I F WIN32
)
qt_feature_config ( "static_runtime" QMAKE_PUBLIC_CONFIG )
qt_feature_config ( "static_runtime" QMAKE_PUBLIC_QT_CONFIG )
2019-10-11 14:55:55 +00:00
qt_feature ( "dlopen" PRIVATE
L A B E L " dlopen ( ) "
2021-07-02 07:40:59 +00:00
C O N D I T I O N UNIX A N D N O T I N T E G R I T Y
2019-10-11 14:55:55 +00:00
)
qt_feature ( "relocatable" PRIVATE
L A B E L " R e l o c a t a b l e "
2020-03-01 00:00:23 +00:00
P U R P O S E " E n a b l e t h e Q t i n s t a l l a t i o n t o b e r e l o c a t e d . "
2019-10-11 14:55:55 +00:00
A U T O D E T E C T Q T _ F E A T U R E _ s h a r e d
C O N D I T I O N Q T _ F E A T U R E _ d l o p e n O R WIN32 O R N O T Q T _ F E A T U R E _ s h a r e d
)
2020-05-29 17:01:36 +00:00
qt_feature ( "intelcet" PRIVATE
2022-09-20 09:42:39 +00:00
L A B E L " U s i n g I n t e l C E T "
2021-11-19 02:29:27 +00:00
CONDITION ( INPUT_intelcet STREQUAL yes ) O R T E S T _ i n t e l c e t
2020-05-29 17:01:36 +00:00
)
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_build_type_and_config ( )
qt_configure_add_summary_section ( NAME "Build options" )
qt_configure_add_summary_build_mode ( Mode )
qt_configure_add_summary_entry (
A R G S " o p t i m i z e _ d e b u g "
C O N D I T I O N N O T MSVC A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_debug_and_release )
)
qt_configure_add_summary_entry (
A R G S " o p t i m i z e _ s i z e "
C O N D I T I O N N O T Q T _ F E A T U R E _ d e b u g O R Q T _ F E A T U R E _ d e b u g _ a n d _ r e l e a s e
)
2021-02-12 15:53:07 +00:00
# special case begin
2020-10-05 07:09:13 +00:00
qt_configure_add_summary_entry (
A R G S " o p t i m i z e _ f u l l "
)
2021-02-12 15:53:07 +00:00
# special case end
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry ( ARGS "shared" )
2020-03-24 15:29:54 +00:00
qt_configure_add_summary_entry (
T Y P E " f i r s t A v a i l a b l e F e a t u r e "
A R G S " c 1 1 c 9 9 c 8 9 "
M E S S A G E " U s i n g C s t a n d a r d "
)
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry (
T Y P E " f i r s t A v a i l a b l e F e a t u r e "
2022-02-04 10:52:55 +00:00
A R G S " c + + 2 b c + + 2 0 c + + 1 7 c + + 1 4 c + + 1 1 "
2020-03-02 17:06:46 +00:00
M E S S A G E " U s i n g C + + s t a n d a r d "
)
qt_configure_add_summary_entry (
A R G S " c c a c h e "
C O N D I T I O N UNIX
)
2020-08-20 07:06:16 +00:00
qt_configure_add_summary_entry (
T Y P E " f i r s t A v a i l a b l e F e a t u r e "
2021-12-16 12:25:43 +00:00
A R G S " u s e _ b f d _ l i n k e r u s e _ g o l d _ l i n k e r u s e _ l l d _ l i n k e r u s e _ m o l d _ l i n k e r "
2020-08-20 07:06:16 +00:00
M E S S A G E " L i n k e r "
C O N D I T I O N Q T _ F E A T U R E _ u s e _ b f d _ l i n k e r O R Q T _ F E A T U R E _ u s e _ g o l d _ l i n k e r O R Q T _ F E A T U R E _ u s e _ l l d _ l i n k e r
2021-12-16 12:25:43 +00:00
O R Q T _ F E A T U R E _ u s e _ m o l d _ l i n k e r
2020-08-20 07:06:16 +00:00
)
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry (
A R G S " e n a b l e _ n e w _ d t a g s "
C O N D I T I O N L I N U X
)
qt_configure_add_summary_entry (
A R G S " e n a b l e _ g d b _ i n d e x "
C O N D I T I O N G C C A N D N O T C L A N G AND ( QT_FEATURE_debug OR QT_FEATURE_force_debug_info OR QT_FEATURE_debug_and_release )
)
qt_configure_add_summary_entry ( ARGS "relocatable" )
qt_configure_add_summary_entry ( ARGS "precompile_header" )
qt_configure_add_summary_entry ( ARGS "ltcg" )
2021-11-19 02:29:27 +00:00
qt_configure_add_summary_entry ( ARGS "intelcet" )
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_section ( NAME "Target compiler supports" )
qt_configure_add_summary_entry (
T Y P E " f e a t u r e L i s t "
2022-02-24 02:03:40 +00:00
A R G S " x 8 6 i n t r i n v a e s a v x 5 1 2 v b m i 2 "
M E S S A G E " x 8 6 I n t r i n s i c s "
2020-03-02 17:06:46 +00:00
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) )
)
qt_configure_add_summary_entry (
2021-04-21 09:33:44 +00:00
T Y P E " f e a t u r e L i s t "
A R G S " n e o n a r m _ c r c 3 2 a r m _ c r y p t o "
2022-02-24 02:03:40 +00:00
M E S S A G E " A R M E x t e n s i o n s "
2020-03-02 17:06:46 +00:00
CONDITION ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 )
)
qt_configure_add_summary_entry (
A R G S " m i p s _ d s p "
CONDITION ( TEST_architecture_arch STREQUAL mips )
)
qt_configure_add_summary_entry (
A R G S " m i p s _ d s p r 2 "
CONDITION ( TEST_architecture_arch STREQUAL mips )
)
qt_configure_end_summary_section ( ) # end of "Target compiler supports" section
qt_configure_add_summary_section ( NAME "Sanitizers" )
qt_configure_add_summary_entry ( ARGS "sanitize_address" )
qt_configure_add_summary_entry ( ARGS "sanitize_thread" )
qt_configure_add_summary_entry ( ARGS "sanitize_memory" )
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
2020-03-26 16:28:20 +00:00
qt_configure_add_summary_build_parts ( "Build parts" )
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry (
A R G S " a p p s t o r e - c o m p l i a n t "
2020-06-05 07:24:37 +00:00
C O N D I T I O N APPLE O R A N D R O I D O R WIN32
2020-03-02 17:06:46 +00:00
)
qt_configure_end_summary_section ( ) # end of "Build options" section
qt_configure_add_summary_section ( NAME "Qt modules and options" )
qt_configure_add_summary_entry ( ARGS "concurrent" )
qt_configure_add_summary_entry ( ARGS "dbus" )
qt_configure_add_summary_entry ( ARGS "dbus-linked" )
qt_configure_add_summary_entry ( ARGS "gui" )
qt_configure_add_summary_entry ( ARGS "network" )
2021-09-01 08:40:14 +00:00
qt_configure_add_summary_entry ( ARGS "printsupport" )
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry ( ARGS "sql" )
qt_configure_add_summary_entry ( ARGS "testlib" )
qt_configure_add_summary_entry ( ARGS "widgets" )
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" )
qt_configure_add_summary_entry ( ARGS "libudev" )
2021-11-04 14:59:17 +00:00
qt_configure_add_summary_entry ( ARGS "openssl" )
qt_configure_add_summary_entry ( ARGS "openssl-linked" )
qt_configure_add_summary_entry ( ARGS "opensslv11" )
qt_configure_add_summary_entry ( ARGS "opensslv30" )
2020-03-02 17:06:46 +00:00
qt_configure_add_summary_entry ( ARGS "system-zlib" )
qt_configure_add_summary_entry ( ARGS "zstd" )
2020-09-03 08:29:41 +00:00
qt_configure_add_summary_entry ( ARGS "thread" )
2020-03-02 17:06:46 +00:00
qt_configure_end_summary_section ( ) # end of "Support enabled for" section
qt_configure_add_report_entry (
T Y P E N O T E
M E S S A G E " U s i n g s t a t i c l i n k i n g w i l l d i s a b l e t h e u s e o f d y n a m i c a l l y l o a d e d p l u g i n s . M a k e s u r e t o i m p o r t a l l n e e d e d s t a t i c p l u g i n s , o r c o m p i l e n e e d e d m o d u l e s i n t o t h e l i b r a r y . "
C O N D I T I O N N O T Q T _ F E A T U R E _ s h a r e d
)
2020-10-15 06:42:16 +00:00
# special case begin
# qt_configure_add_report_entry(
# TYPE ERROR
2022-06-10 14:41:59 +00:00
# MESSAGE "Debug build without Release build is not currently supported on ios see QTBUG-71990. Use -debug-and-release."
2020-10-15 06:42:16 +00:00
# CONDITION IOS AND QT_FEATURE_debug AND NOT QT_FEATURE_debug_and_release
# )
# special case end
2020-03-02 17:06:46 +00:00
qt_configure_add_report_entry (
T Y P E W A R N I N G
M E S S A G E " - d e b u g - a n d - r e l e a s e i s o n l y s u p p o r t e d o n D a r w i n a n d W i n d o w s p l a t f o r m s . Q t c a n b e b u i l t i n r e l e a s e m o d e w i t h s e p a r a t e d e b u g i n f o r m a t i o n , s o - d e b u g - a n d - r e l e a s e i s n o l o n g e r n e c e s s a r y . "
C O N D I T I O N I N P U T _ d e b u g _ a n d _ r e l e a s e S T R E Q U A L ' y e s ' A N D N O T APPLE A N D N O T WIN32
)
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " d e b u g - o n l y f r a m e w o r k b u i l d s a r e n o t s u p p o r t e d . C o n f i g u r e w i t h - n o - f r a m e w o r k i f y o u w a n t a p u r e d e b u g b u i l d . "
C O N D I T I O N Q T _ F E A T U R E _ f r a m e w o r k A N D Q T _ F E A T U R E _ d e b u g A N D N O T Q T _ F E A T U R E _ d e b u g _ a n d _ r e l e a s e
)
CMake: Handle automatic rpath embedding correctly
Instead of using CMAKE_INSTALL_RPATH to embed an absolute path
to prefix/libdir into all targets, use the more sophisticated aproach
that qmake does.
For certain targets (modules, plugins, tools) use relative rpaths.
Otherwise embed absolute paths (examples, regular binaries).
Installed tests currently have no rpaths.
On certain platforms rpaths are not used (Windows, Android,
iOS / uikit).
Frameworks, app bundles and shallow bundles should also be handled
correctly.
Additional rpaths can be provided via QT_EXTRA_RPATHS variable
(similar to the -R option that configure takes).
Automatic embedding can be disabled either via QT_FEATURE_rpath=OFF
or QT_DISABLE_RPATH=ON.
Note that installed examples are not relocatable at the moment (due
to always having an absolute path rpath), so this is a missing feature
compared to qmake. This is due to missing information on where
examples will be installed, so a relative rpath can not be computed.
By default a Qt installation is relocatable, so there is no need to
pass -DQT_EXTRA_RPATHS=. like Coin used to do with qmake e.g. -R .
Relative rpaths will have the appropriate 'relative base' prefixed
to them (e.g $ORIGIN on linux and @loader_path on darwin platforms).
There is currently no support for other platforms that might have a
different 'relative base' than the ones mentioned above.
Any extra rpaths are saved to BuildInternalsExtra which are re-used
when building other repositories.
configurejson2cmake modified to include correct conditions for the
rpath feature.
It's very likely that we will need a new qt_add_internal_app()
function for gui apps that are to be installed to prefix/bin.
For example for Assistant from qttools. Currently such apps
use qt_add_executable().
The distinction is necessary to make sure that relative rpaths are
embedded into apps, but not executables (which tests are part of).
Amends e835a6853b9c0fb7af32798ed8965de3adf0e15b
Task-number: QTBUG-83497
Change-Id: I3510f63c0a59489741116cc8ec3ef6a0a7704f25
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-15 16:48:26 +00:00
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " S t a t i c b u i l d s d o n ' t s u p p o r t R P A T H "
CONDITION ( QT_FEATURE_rpath OR QT_EXTRA_RPATHS ) A N D N O T Q T _ F E A T U R E _ s h a r e d
)
2020-03-02 17:06:46 +00:00
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " C o m m a n d l i n e o p t i o n - s a n i t i z e f u z z e r - n o - l i n k i s o n l y s u p p o r t e d w i t h c l a n g c o m p i l e r s . "
C O N D I T I O N Q T _ F E A T U R E _ s a n i t i z e _ f u z z e r _ n o _ l i n k A N D N O T C L A N G
)
2022-02-24 02:03:40 +00:00
if ( TEST_architecture_arch STREQUAL x86_64 OR TEST_architecture_arch STREQUAL i386 )
if ( ( TEST_architecture_arch STREQUAL i386 ) OR QNX OR WASM )
# Warn only
qt_configure_add_report_entry (
T Y P E W A R N I N G
CONDITION ( NOT QT_FEATURE_x86intrin )
M E S S A G E [ = [
A l l x 8 6 i n t r i n s i c s a n d S I M D s u p p o r t w e r e d i s a b l e d . I f t h i s w a s i n e r r o r , c h e c k
t h e r e s u l t o f t h e b u i l d i n c o n f i g . t e s t s / x 8 6 i n t r i n a n d r e p o r t a t h t t p s : / / b u g r e p o r t s . q t . i o .
] = ]
)
else ( )
qt_configure_add_report_entry (
T Y P E E R R O R
CONDITION ( NOT QT_FEATURE_x86intrin )
M E S S A G E [ = = = = = = = = [
x 8 6 i n t r i n s i c s s u p p o r t m i s s i n g . C h e c k y o u r c o m p i l e r s e t t i n g s . I f t h i s i s a n
e r r o r , r e p o r t a t h t t p s : / / b u g r e p o r t s . q t . i o w i t h y o u r c o m p i l e r I D a n d v e r s i o n ,
a n d t h i s o u t p u t :
$ { T E S T _ x 8 6 i n t r i n _ O U T P U T }
] = = = = = = = = ]
)
endif ( )
endif ( )
2021-03-15 11:21:55 +00:00
# special case begin
qt_configure_add_report_entry (
T Y P E E R R O R
M E S S A G E " S e t t i n g a l i b r a r y i n f i x i s n o t s u p p o r t e d f o r f r a m e w o r k b u i l d s . "
C O N D I T I O N Q T _ F E A T U R E _ f r a m e w o r k A N D D E F I N E D Q T _ L I B I N F I X
)
2020-09-03 08:29:41 +00:00
qt_configure_add_report_entry (
T Y P E N O T E
2021-04-29 14:29:32 +00:00
M E S S A G E " E n a b l e t h r e a d s u p p o r t "
C O N D I T I O N Q T _ F E A T U R E _ t h r e a d A N D W A S M
2020-09-03 08:29:41 +00:00
)
qt_configure_add_report_entry (
T Y P E W A R N I N G
2021-06-03 21:07:26 +00:00
M E S S A G E " Y o u s h o u l d u s e t h e r e c o m m e n d e d E m s c r i p t e n v e r s i o n $ { Q T _ E M C C _ R E C O M M E N D E D _ V E R S I O N } w i t h t h i s Q t . Y o u h a v e $ { E M C C _ V E R S I O N } . "
2020-09-03 08:29:41 +00:00
C O N D I T I O N W A S M A N D N O T $ { E M C C _ V E R S I O N } M A T C H E S $ { Q T _ E M C C _ R E C O M M E N D E D _ V E R S I O N }
)
if ( WASM )
qt_extra_definition ( "QT_EMCC_VERSION" "\" ${ EMCC_VERSION } \"" PUBLIC )
endif ( )
2021-03-15 11:21:55 +00:00
# special case end
2018-10-24 13:20:27 +00:00
qt_extra_definition ( "QT_VERSION_STR" "\" ${ PROJECT_VERSION } \"" PUBLIC )
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 )