2018-10-24 13:20:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
#### Inputs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### Libraries
|
|
|
|
|
Write find_dependency() calls in Qt Module config files
This change introduces a new function called qt_find_package()
which can take an extra option called PROVIDED_TARGETS, which
associates targets with the package that defines those targets.
This is done by setting the INTERFACE_QT_PACKAGE_NAME and
INTERFACE_QT_PACKAGE_VERSION properties on the imported targets.
This information allows us to generate appropriate find_dependency()
calls in a module's Config file for third party libraries.
For example when an application links against QtCore, it should also
link against zlib and atomic libraries. In order to do that, the
library locations first have to be found by CMake. This is achieved by
embedding find_dependency(ZLIB) and find_dependency(Atomic) in
Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake.
The latter is picked up when an application project contains
find_package(Qt5Core), and thus all linking dependencies are resolved.
The information 'which package provides which targets' is contained
in the python json2cmake conversion script. The generated output of
the script contains qt_find_package() calls that represent that
information.
The Qt5CoreDependencies.cmake file and which which dependencies it
contains is generated at the QtPostProcess stop.
Note that for non-static Qt builds, we only need to propagate public
3rd party libraries. For static builds, we need all third party
libraries.
In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any
scope, the targets on which the property is set, have to be GLOBAL.
Also for applications and other modules to find all required third
party libraries, we have to install all our custom Find modules, and
make sure they define INTERFACE IMPORTED libraries, and not just
IMPORTED libraries.
Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-24 15:14:25 +00:00
|
|
|
qt_find_package(ZLIB PROVIDED_TARGETS ZLIB::ZLIB)
|
2019-05-03 14:03:45 +00:00
|
|
|
set_package_properties(ZLIB PROPERTIES TYPE REQUIRED)
|
Write find_dependency() calls in Qt Module config files
This change introduces a new function called qt_find_package()
which can take an extra option called PROVIDED_TARGETS, which
associates targets with the package that defines those targets.
This is done by setting the INTERFACE_QT_PACKAGE_NAME and
INTERFACE_QT_PACKAGE_VERSION properties on the imported targets.
This information allows us to generate appropriate find_dependency()
calls in a module's Config file for third party libraries.
For example when an application links against QtCore, it should also
link against zlib and atomic libraries. In order to do that, the
library locations first have to be found by CMake. This is achieved by
embedding find_dependency(ZLIB) and find_dependency(Atomic) in
Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake.
The latter is picked up when an application project contains
find_package(Qt5Core), and thus all linking dependencies are resolved.
The information 'which package provides which targets' is contained
in the python json2cmake conversion script. The generated output of
the script contains qt_find_package() calls that represent that
information.
The Qt5CoreDependencies.cmake file and which which dependencies it
contains is generated at the QtPostProcess stop.
Note that for non-static Qt builds, we only need to propagate public
3rd party libraries. For static builds, we need all third party
libraries.
In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any
scope, the targets on which the property is set, have to be GLOBAL.
Also for applications and other modules to find all required third
party libraries, we have to install all our custom Find modules, and
make sure they define INTERFACE IMPORTED libraries, and not just
IMPORTED libraries.
Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-24 15:14:25 +00:00
|
|
|
qt_find_package(ZSTD PROVIDED_TARGETS ZSTD::ZSTD)
|
2019-05-08 12:33:58 +00:00
|
|
|
qt_find_package(WrapDBus1 PROVIDED_TARGETS dbus-1)
|
Write find_dependency() calls in Qt Module config files
This change introduces a new function called qt_find_package()
which can take an extra option called PROVIDED_TARGETS, which
associates targets with the package that defines those targets.
This is done by setting the INTERFACE_QT_PACKAGE_NAME and
INTERFACE_QT_PACKAGE_VERSION properties on the imported targets.
This information allows us to generate appropriate find_dependency()
calls in a module's Config file for third party libraries.
For example when an application links against QtCore, it should also
link against zlib and atomic libraries. In order to do that, the
library locations first have to be found by CMake. This is achieved by
embedding find_dependency(ZLIB) and find_dependency(Atomic) in
Qt5CoreDependencies.cmake which is included by Qt5CoreConfig.cmake.
The latter is picked up when an application project contains
find_package(Qt5Core), and thus all linking dependencies are resolved.
The information 'which package provides which targets' is contained
in the python json2cmake conversion script. The generated output of
the script contains qt_find_package() calls that represent that
information.
The Qt5CoreDependencies.cmake file and which which dependencies it
contains is generated at the QtPostProcess stop.
Note that for non-static Qt builds, we only need to propagate public
3rd party libraries. For static builds, we need all third party
libraries.
In order for the INTERFACE_QT_PACKAGE_NAME property to be read in any
scope, the targets on which the property is set, have to be GLOBAL.
Also for applications and other modules to find all required third
party libraries, we have to install all our custom Find modules, and
make sure they define INTERFACE IMPORTED libraries, and not just
IMPORTED libraries.
Change-Id: I694d6e32d05b96d5e241df0156fc79d0029426aa
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-24 15:14:25 +00:00
|
|
|
qt_find_package(Libudev PROVIDED_TARGETS PkgConfig::Libudev)
|
2018-10-24 13:20:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
#### Tests
|
|
|
|
|
2019-10-17 08:49:44 +00:00
|
|
|
# c++14
|
|
|
|
qt_config_compile_test(cxx14
|
|
|
|
LABEL "C++14 support"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2019-10-17 08:49:44 +00:00
|
|
|
"#if __cplusplus > 201103L
|
|
|
|
// Compiler claims to support C++14, trust it
|
|
|
|
#else
|
|
|
|
# error __cplusplus must be > 201103L (the value of C++11)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
"
|
|
|
|
CXX_STANDARD 14
|
|
|
|
)
|
|
|
|
|
|
|
|
# c++17
|
|
|
|
qt_config_compile_test(cxx17
|
|
|
|
LABEL "C++17 support"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2019-10-17 08:49:44 +00:00
|
|
|
"#if __cplusplus > 201402L
|
|
|
|
// Compiler claims to support C++17, trust it
|
|
|
|
#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>
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
std::variant<int> v(42);
|
|
|
|
int i = std::get<int>(v);
|
|
|
|
std::visit([](const auto &) { return 1; }, v);
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
"
|
|
|
|
CXX_STANDARD 17
|
|
|
|
)
|
|
|
|
|
2019-05-28 14:19:42 +00:00
|
|
|
# c++2a
|
|
|
|
qt_config_compile_test(cxx2a
|
|
|
|
LABEL "C++2a support"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2019-05-28 14:19:42 +00:00
|
|
|
"#if __cplusplus > 201703L
|
|
|
|
// Compiler claims to support experimental C++2a, trust it
|
|
|
|
#else
|
|
|
|
# error __cplusplus must be > 201703L (the value for C++17)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
2019-10-17 08:49:44 +00:00
|
|
|
"
|
|
|
|
CXX_STANDARD 20
|
2019-05-28 14:19:42 +00:00
|
|
|
)
|
|
|
|
|
2019-04-16 14:32:08 +00:00
|
|
|
# precompile_header
|
|
|
|
qt_config_compile_test(precompile_header
|
|
|
|
LABEL "precompiled header support"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2019-04-16 14:32:08 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
#ifndef HEADER_H
|
|
|
|
#error no go
|
|
|
|
#endif
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
"# FIXME: qmake: ['CONFIG += precompile_header', 'PRECOMPILED_DIR = .pch', 'PRECOMPILED_HEADER = header.h']
|
|
|
|
)
|
|
|
|
|
2018-10-24 13:20:27 +00:00
|
|
|
# reduce_relocations
|
|
|
|
qt_config_compile_test(reduce_relocations
|
|
|
|
LABEL "-Bsymbolic-functions support"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2018-10-24 13:20:27 +00:00
|
|
|
"#if !(defined(__i386) || defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64))
|
|
|
|
# error Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129).
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
"# FIXME: qmake: ['TEMPLATE = lib', 'CONFIG += dll bsymbolic_functions', 'isEmpty(QMAKE_LFLAGS_BSYMBOLIC_FUNC): error("Nope")']
|
|
|
|
)
|
|
|
|
|
2019-10-11 14:55:55 +00:00
|
|
|
# signaling_nan
|
|
|
|
qt_config_compile_test(signaling_nan
|
|
|
|
LABEL "Signaling NaN for doubles"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2019-10-11 14:55:55 +00:00
|
|
|
"#include <limits>
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
using B = std::numeric_limits<double>;
|
|
|
|
static_assert(B::has_signaling_NaN, \"System lacks signaling NaN\");
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
")
|
|
|
|
|
2018-10-24 13:20:27 +00:00
|
|
|
# sse2
|
|
|
|
qt_config_compile_test_x86simd(sse2 "SSE2 instructions")
|
|
|
|
|
|
|
|
# sse3
|
|
|
|
qt_config_compile_test_x86simd(sse3 "SSE3 instructions")
|
|
|
|
|
|
|
|
# ssse3
|
|
|
|
qt_config_compile_test_x86simd(ssse3 "SSSE3 instructions")
|
|
|
|
|
|
|
|
# sse4_1
|
|
|
|
qt_config_compile_test_x86simd(sse4_1 "SSE4.1 instructions")
|
|
|
|
|
|
|
|
# sse4_2
|
|
|
|
qt_config_compile_test_x86simd(sse4_2 "SSE4.2 instructions")
|
|
|
|
|
|
|
|
# aesni
|
|
|
|
qt_config_compile_test_x86simd(aesni "AES new instructions")
|
|
|
|
|
|
|
|
# f16c
|
|
|
|
qt_config_compile_test_x86simd(f16c "F16C instructions")
|
|
|
|
|
|
|
|
# rdrnd
|
|
|
|
qt_config_compile_test_x86simd(rdrnd "RDRAND instruction")
|
|
|
|
|
2019-10-11 14:55:55 +00:00
|
|
|
# rdseed
|
|
|
|
qt_config_compile_test_x86simd(rdseed "RDSEED instruction")
|
|
|
|
|
2018-10-24 13:20:27 +00:00
|
|
|
# shani
|
|
|
|
qt_config_compile_test_x86simd(shani "SHA new instructions")
|
|
|
|
|
|
|
|
# avx
|
|
|
|
qt_config_compile_test_x86simd(avx "AVX instructions")
|
|
|
|
|
|
|
|
# avx2
|
|
|
|
qt_config_compile_test_x86simd(avx2 "AVX2 instructions")
|
|
|
|
|
|
|
|
# avx512f
|
|
|
|
qt_config_compile_test_x86simd(avx512f "AVX512 F instructions")
|
|
|
|
|
|
|
|
# avx512er
|
|
|
|
qt_config_compile_test_x86simd(avx512er "AVX512 ER instructions")
|
|
|
|
|
|
|
|
# avx512cd
|
|
|
|
qt_config_compile_test_x86simd(avx512cd "AVX512 CD instructions")
|
|
|
|
|
|
|
|
# avx512pf
|
|
|
|
qt_config_compile_test_x86simd(avx512pf "AVX512 PF instructions")
|
|
|
|
|
|
|
|
# avx512dq
|
|
|
|
qt_config_compile_test_x86simd(avx512dq "AVX512 DQ instructions")
|
|
|
|
|
|
|
|
# avx512bw
|
|
|
|
qt_config_compile_test_x86simd(avx512bw "AVX512 BW instructions")
|
|
|
|
|
|
|
|
# avx512vl
|
|
|
|
qt_config_compile_test_x86simd(avx512vl "AVX512 VL instructions")
|
|
|
|
|
|
|
|
# avx512ifma
|
|
|
|
qt_config_compile_test_x86simd(avx512ifma "AVX512 IFMA instructions")
|
|
|
|
|
|
|
|
# avx512vbmi
|
|
|
|
qt_config_compile_test_x86simd(avx512vbmi "AVX512 VBMI instructions")
|
|
|
|
|
|
|
|
# posix_fallocate
|
|
|
|
qt_config_compile_test(posix_fallocate
|
|
|
|
LABEL "POSIX fallocate()"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2018-10-24 13:20:27 +00:00
|
|
|
"
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
(void) posix_fallocate(0, 0, 0);
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
")
|
|
|
|
|
|
|
|
# alloca_stdlib_h
|
|
|
|
qt_config_compile_test(alloca_stdlib_h
|
|
|
|
LABEL "alloca() in stdlib.h"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2018-10-24 13:20:27 +00:00
|
|
|
"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
alloca(1);
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
")
|
|
|
|
|
|
|
|
# alloca_h
|
|
|
|
qt_config_compile_test(alloca_h
|
|
|
|
LABEL "alloca() in alloca.h"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2018-10-24 13:20:27 +00:00
|
|
|
"
|
|
|
|
#include <alloca.h>
|
|
|
|
#ifdef __QNXNTO__
|
|
|
|
// extra include needed in QNX7 to define NULL for the alloca() macro
|
|
|
|
# include <stddef.h>
|
|
|
|
#endif
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
alloca(1);
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
")
|
|
|
|
|
|
|
|
# alloca_malloc_h
|
|
|
|
qt_config_compile_test(alloca_malloc_h
|
|
|
|
LABEL "alloca() in malloc.h"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
2018-10-24 13:20:27 +00:00
|
|
|
"
|
|
|
|
#include <malloc.h>
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
alloca(1);
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
")
|
|
|
|
|
|
|
|
# stack_protector
|
|
|
|
qt_config_compile_test(stack_protector
|
|
|
|
LABEL "stack protection"
|
2019-10-21 12:35:57 +00:00
|
|
|
CODE
|
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
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
(void)argc; (void)argv;
|
|
|
|
/* BEGIN TEST: */
|
|
|
|
|
|
|
|
/* END TEST: */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
"# FIXME: qmake: QMAKE_CXXFLAGS += -fstack-protector-strong
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#### Features
|
|
|
|
|
|
|
|
# This belongs into gui, but the license check needs it here already.
|
|
|
|
qt_feature("android_style_assets" PRIVATE
|
|
|
|
LABEL "Android Style Assets"
|
|
|
|
CONDITION ANDROID
|
|
|
|
)
|
2019-04-16 14:32:08 +00:00
|
|
|
qt_feature("use_gold_linker_alias"
|
|
|
|
AUTODETECT false
|
|
|
|
CONDITION NOT WIN32 AND NOT INTEGRITY AND NOT WASM AND tests.use_gold_linker OR FIXME
|
|
|
|
)
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("developer_build"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "Developer build"
|
|
|
|
AUTODETECT OFF
|
|
|
|
)
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("private_tests" PRIVATE
|
|
|
|
LABEL "Developer build: private_tests"
|
2019-07-17 14:10:31 +00:00
|
|
|
CONDITION QT_FEATURE_developer_build
|
2019-03-14 12:22:09 +00:00
|
|
|
)
|
2018-10-24 13:20:27 +00:00
|
|
|
qt_feature_definition("developer_build" "QT_BUILD_INTERNAL")
|
|
|
|
qt_feature("appstore_compliant" PUBLIC
|
|
|
|
LABEL "App store compliance"
|
|
|
|
PURPOSE "Disables code that is not allowed in platform app stores"
|
|
|
|
AUTODETECT APPLE_UIKIT OR ANDROID OR WINRT
|
|
|
|
)
|
|
|
|
qt_feature("simulator_and_device" PUBLIC
|
|
|
|
LABEL "Build for both simulator and device"
|
|
|
|
CONDITION APPLE_UIKIT AND INPUT_sdk STREQUAL ''
|
|
|
|
)
|
|
|
|
qt_feature("force_asserts" PUBLIC
|
|
|
|
LABEL "Force assertions"
|
|
|
|
AUTODETECT OFF
|
|
|
|
)
|
|
|
|
qt_feature("framework" PUBLIC
|
|
|
|
LABEL "Build Apple Frameworks"
|
2018-11-06 10:23:45 +00:00
|
|
|
CONDITION APPLE AND BUILD_SHARED_LIBS
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
|
|
|
qt_feature_definition("framework" "QT_MAC_FRAMEWORK_BUILD")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("largefile"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "Large file support"
|
2019-05-28 14:19:42 +00:00
|
|
|
CONDITION NOT ANDROID AND NOT INTEGRITY AND NOT WINRT AND NOT rtems
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
|
|
|
qt_feature_definition("largefile" "QT_LARGEFILE_SUPPORT" VALUE "64")
|
2019-05-28 14:19:42 +00:00
|
|
|
qt_feature("cxx11" PUBLIC
|
|
|
|
LABEL "C++11"
|
|
|
|
)
|
|
|
|
qt_feature("cxx14" PUBLIC
|
|
|
|
LABEL "C++14"
|
2019-10-17 08:49:44 +00:00
|
|
|
CONDITION QT_FEATURE_cxx11 AND TEST_cxx14
|
2019-05-28 14:19:42 +00:00
|
|
|
)
|
2019-10-11 14:55:55 +00:00
|
|
|
qt_feature("cxx17" PUBLIC
|
2019-05-28 14:19:42 +00:00
|
|
|
LABEL "C++17"
|
2019-10-17 08:49:44 +00:00
|
|
|
CONDITION QT_FEATURE_cxx14 AND TEST_cxx17
|
2019-05-28 14:19:42 +00:00
|
|
|
)
|
2019-10-11 14:55:55 +00:00
|
|
|
qt_feature("cxx1z" PUBLIC
|
|
|
|
LABEL "C++17"
|
|
|
|
CONDITION QT_FEATURE_cxx17
|
|
|
|
)
|
2019-05-28 14:19:42 +00:00
|
|
|
qt_feature("cxx2a" PUBLIC
|
|
|
|
LABEL "C++2a"
|
|
|
|
AUTODETECT OFF
|
2019-10-11 14:55:55 +00:00
|
|
|
CONDITION QT_FEATURE_cxx17 AND TEST_cxx2a
|
2019-05-28 14:19:42 +00:00
|
|
|
)
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("reduce_exports" PRIVATE
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "Reduce amount of exported symbols"
|
|
|
|
CONDITION NOT WIN32 AND CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY
|
|
|
|
)
|
|
|
|
qt_feature_definition("reduce_exports" "QT_VISIBILITY_AVAILABLE")
|
2019-10-11 14:55:55 +00:00
|
|
|
qt_feature("signaling_nan" PUBLIC
|
|
|
|
LABEL "Signaling NaN"
|
|
|
|
CONDITION TEST_signaling_nan
|
|
|
|
)
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("sse2" PRIVATE
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "SSE2"
|
|
|
|
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND TEST_subarch_sse2
|
|
|
|
)
|
|
|
|
qt_feature_definition("sse2" "QT_COMPILER_SUPPORTS_SSE2" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("sse3"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "SSE3"
|
|
|
|
CONDITION QT_FEATURE_sse2 AND TEST_subarch_sse3
|
|
|
|
)
|
|
|
|
qt_feature_definition("sse3" "QT_COMPILER_SUPPORTS_SSE3" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("ssse3"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "SSSE3"
|
|
|
|
CONDITION QT_FEATURE_sse3 AND TEST_subarch_ssse3
|
|
|
|
)
|
|
|
|
qt_feature_definition("ssse3" "QT_COMPILER_SUPPORTS_SSSE3" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("sse4_1"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "SSE4.1"
|
|
|
|
CONDITION QT_FEATURE_ssse3 AND TEST_subarch_sse4_1
|
|
|
|
)
|
|
|
|
qt_feature_definition("sse4_1" "QT_COMPILER_SUPPORTS_SSE4_1" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("sse4_2"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "SSE4.2"
|
|
|
|
CONDITION QT_FEATURE_sse4_1 AND TEST_subarch_sse4_2
|
|
|
|
)
|
|
|
|
qt_feature_definition("sse4_2" "QT_COMPILER_SUPPORTS_SSE4_2" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "AVX"
|
|
|
|
CONDITION QT_FEATURE_sse4_2 AND TEST_subarch_avx
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx" "QT_COMPILER_SUPPORTS_AVX" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("f16c"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "F16C"
|
2019-03-14 12:22:09 +00:00
|
|
|
CONDITION QT_FEATURE_avx AND TEST_subarch_f16c
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
|
|
|
qt_feature_definition("f16c" "QT_COMPILER_SUPPORTS_F16C" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx2" PRIVATE
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "AVX2"
|
|
|
|
CONDITION QT_FEATURE_avx AND TEST_subarch_avx2
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx2" "QT_COMPILER_SUPPORTS_AVX2" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512f"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "F"
|
|
|
|
CONDITION QT_FEATURE_avx2 AND TEST_subarch_avx512f
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512f" "QT_COMPILER_SUPPORTS_AVX512F" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512er"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "ER"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512er
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512er" "QT_COMPILER_SUPPORTS_AVX512ER" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512cd"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "CD"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512cd
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512cd" "QT_COMPILER_SUPPORTS_AVX512CD" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512pf"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "PF"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512pf
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512pf" "QT_COMPILER_SUPPORTS_AVX512PF" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512dq"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "DQ"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512dq
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512dq" "QT_COMPILER_SUPPORTS_AVX512DQ" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512bw"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "BW"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512bw
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512bw" "QT_COMPILER_SUPPORTS_AVX512BW" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512vl"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "VL"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512vl
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512vl" "QT_COMPILER_SUPPORTS_AVX512VL" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512ifma"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "IFMA"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512ifma
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512ifma" "QT_COMPILER_SUPPORTS_AVX512IFMA" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("avx512vbmi"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "VBMI"
|
|
|
|
CONDITION QT_FEATURE_avx512f AND TEST_subarch_avx512vbmi
|
|
|
|
)
|
|
|
|
qt_feature_definition("avx512vbmi" "QT_COMPILER_SUPPORTS_AVX512VBMI" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("aesni"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "AES"
|
|
|
|
CONDITION QT_FEATURE_sse2 AND TEST_subarch_aes
|
|
|
|
)
|
|
|
|
qt_feature_definition("aesni" "QT_COMPILER_SUPPORTS_AES" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("rdrnd"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "RDRAND"
|
|
|
|
CONDITION TEST_subarch_rdseed
|
|
|
|
)
|
|
|
|
qt_feature_definition("rdrnd" "QT_COMPILER_SUPPORTS_RDRND" VALUE "1")
|
2019-10-11 14:55:55 +00:00
|
|
|
qt_feature("rdseed"
|
|
|
|
LABEL "RDSEED"
|
|
|
|
CONDITION TEST_subarch_rdseed
|
|
|
|
)
|
|
|
|
qt_feature_definition("rdseed" "QT_COMPILER_SUPPORTS_RDSEED" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("shani"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "SHA"
|
|
|
|
CONDITION QT_FEATURE_sse2 AND TEST_subarch_sha
|
|
|
|
)
|
|
|
|
qt_feature_definition("shani" "QT_COMPILER_SUPPORTS_SHA" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("x86SimdAlways"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "Intrinsics without -mXXX option"
|
|
|
|
CONDITION ( ( TEST_architecture_arch STREQUAL i386 ) OR ( TEST_architecture_arch STREQUAL x86_64 ) ) AND ON
|
|
|
|
)
|
|
|
|
qt_feature_definition("x86SimdAlways" "QT_COMPILER_SUPPORTS_SIMD_ALWAYS" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("mips_dsp"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "DSP"
|
2019-03-21 12:14:09 +00:00
|
|
|
CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dsp
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
|
|
|
qt_feature_definition("mips_dsp" "QT_COMPILER_SUPPORTS_MIPS_DSP" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("mips_dspr2"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "DSPr2"
|
2019-03-21 12:14:09 +00:00
|
|
|
CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dspr2
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
|
|
|
qt_feature_definition("mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1")
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("neon"
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "NEON"
|
2019-03-21 12:14:09 +00:00
|
|
|
CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_${TEST_architecture_arch}_subarch_neon
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
|
|
|
qt_feature_definition("neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1")
|
|
|
|
qt_feature("alloca_h" PRIVATE
|
|
|
|
LABEL "alloca.h"
|
|
|
|
CONDITION TEST_alloca_h
|
|
|
|
)
|
|
|
|
qt_feature("alloca_malloc_h" PRIVATE
|
|
|
|
LABEL "alloca() in malloc.h"
|
|
|
|
CONDITION NOT QT_FEATURE_alloca_h AND TEST_alloca_malloc_h
|
|
|
|
)
|
|
|
|
qt_feature("alloca" PRIVATE
|
|
|
|
LABEL "alloca()"
|
|
|
|
CONDITION QT_FEATURE_alloca_h OR QT_FEATURE_alloca_malloc_h OR TEST_alloca_stdlib_h
|
|
|
|
)
|
2019-04-16 14:32:08 +00:00
|
|
|
qt_feature("zstd" PRIVATE
|
|
|
|
LABEL "Zstandard support"
|
|
|
|
CONDITION ZSTD_FOUND
|
|
|
|
)
|
2018-10-24 13:20:27 +00:00
|
|
|
qt_feature("thread" PUBLIC
|
|
|
|
SECTION "Kernel"
|
|
|
|
LABEL "Thread support"
|
|
|
|
PURPOSE "Provides QThread and related classes."
|
2019-04-16 14:32:08 +00:00
|
|
|
AUTODETECT NOT WASM
|
2018-10-24 13:20:27 +00:00
|
|
|
)
|
|
|
|
qt_feature("future" PUBLIC
|
|
|
|
SECTION "Kernel"
|
|
|
|
LABEL "QFuture"
|
|
|
|
PURPOSE "Provides QFuture and related classes."
|
|
|
|
CONDITION QT_FEATURE_thread
|
|
|
|
)
|
|
|
|
qt_feature("concurrent" PUBLIC
|
|
|
|
SECTION "Kernel"
|
|
|
|
LABEL "Qt Concurrent"
|
|
|
|
PURPOSE "Provides a high-level multi-threading API."
|
|
|
|
CONDITION QT_FEATURE_future
|
|
|
|
)
|
|
|
|
qt_feature_definition("concurrent" "QT_NO_CONCURRENT" NEGATE VALUE "1")
|
|
|
|
qt_feature("dbus" PUBLIC PRIVATE
|
|
|
|
LABEL "Qt D-Bus"
|
|
|
|
AUTODETECT NOT APPLE_UIKIT AND NOT ANDROID AND NOT WINRT
|
|
|
|
CONDITION QT_FEATURE_thread
|
|
|
|
)
|
|
|
|
qt_feature_definition("dbus" "QT_NO_DBUS" NEGATE VALUE "1")
|
|
|
|
qt_feature("dbus_linked" PRIVATE
|
|
|
|
LABEL "Qt D-Bus directly linked to libdbus"
|
2019-05-03 13:02:32 +00:00
|
|
|
CONDITION QT_FEATURE_dbus AND DBus1_FOUND
|
2018-10-24 13:20:27 +00:00
|
|
|
ENABLE INPUT_dbus STREQUAL 'linked'
|
|
|
|
DISABLE INPUT_dbus STREQUAL 'runtime'
|
|
|
|
)
|
|
|
|
qt_feature("gui" PRIVATE
|
|
|
|
LABEL "Qt Gui"
|
|
|
|
)
|
|
|
|
qt_feature("network" PRIVATE
|
|
|
|
LABEL "Qt Network"
|
|
|
|
)
|
|
|
|
qt_feature("sql" PRIVATE
|
|
|
|
LABEL "Qt Sql"
|
|
|
|
CONDITION QT_FEATURE_thread
|
|
|
|
)
|
|
|
|
qt_feature("testlib" PRIVATE
|
|
|
|
LABEL "Qt Testlib"
|
|
|
|
)
|
2019-03-14 12:22:09 +00:00
|
|
|
qt_feature("widgets" PRIVATE
|
2018-10-24 13:20:27 +00:00
|
|
|
LABEL "Qt Widgets"
|
|
|
|
AUTODETECT NOT APPLE_TVOS AND NOT APPLE_WATCHOS
|
|
|
|
CONDITION QT_FEATURE_gui
|
|
|
|
)
|
|
|
|
qt_feature_definition("widgets" "QT_NO_WIDGETS" NEGATE)
|
|
|
|
qt_feature("xml" PRIVATE
|
|
|
|
LABEL "Qt Xml"
|
|
|
|
)
|
|
|
|
qt_feature("libudev" PRIVATE
|
|
|
|
LABEL "udev"
|
|
|
|
CONDITION Libudev_FOUND
|
|
|
|
)
|
2019-10-11 14:55:55 +00:00
|
|
|
qt_feature("dlopen" PRIVATE
|
|
|
|
LABEL "dlopen()"
|
|
|
|
CONDITION UNIX
|
|
|
|
)
|
|
|
|
qt_feature("relocatable" PRIVATE
|
|
|
|
LABEL "Relocatable"
|
|
|
|
AUTODETECT QT_FEATURE_shared
|
|
|
|
CONDITION QT_FEATURE_dlopen OR WIN32 OR NOT QT_FEATURE_shared
|
|
|
|
)
|
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)
|