summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/configure.cmake')
-rw-r--r--src/corelib/configure.cmake104
1 files changed, 86 insertions, 18 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index 9730f78962..3f9e403c3f 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -29,6 +29,7 @@ qt_find_package(Slog2 PROVIDED_TARGETS Slog2::Slog2)
# atomicfptr
qt_config_compile_test(atomicfptr
LABEL "working std::atomic for function pointers"
+ CODE
"
#include <atomic>
typedef void (*fptr)(int);
@@ -58,6 +59,9 @@ test(fptr);
# clock-monotonic
qt_config_compile_test(clock_monotonic
LABEL "POSIX monotonic clock"
+ LIBRARIES
+ WrapRt
+ CODE
"
#include <unistd.h>
#include <time.h>
@@ -75,12 +79,12 @@ clock_gettime(CLOCK_MONOTONIC, &ts);
/* END TEST: */
return 0;
}
-"# FIXME: use: librt
-)
+")
# cloexec
qt_config_compile_test(cloexec
LABEL "O_CLOEXEC"
+ CODE
"#define _GNU_SOURCE 1
#include <sys/types.h>
#include <sys/socket.h>
@@ -111,7 +115,8 @@ if (UNIX)
endif()
qt_config_compile_test(cxx11_future
LABEL "C++11 <future>"
- LIBRARIES "${cxx11_future_TEST_LIBRARIES}"
+ LIBRARIES
+ "${cxx11_future_TEST_LIBRARIES}"
CODE
"
#include <future>
@@ -130,6 +135,7 @@ std::future<int> f = std::async([]() { return 42; });
# cxx11_random
qt_config_compile_test(cxx11_random
LABEL "C++11 <random>"
+ CODE
"
#include <random>
@@ -143,9 +149,28 @@ std::mt19937 mt(0);
}
")
+# cxx17_filesystem
+qt_config_compile_test(cxx17_filesystem
+ LABEL "C++17 <filesystem>"
+ CODE
+"
+#include <filesystem>
+
+int main(int argc, char **argv)
+{
+ (void)argc; (void)argv;
+ /* BEGIN TEST: */
+std::filesystem::path p(\"./file\");
+ /* END TEST: */
+ return 0;
+}
+"# FIXME: qmake: CONFIG += c++17
+)
+
# eventfd
qt_config_compile_test(eventfd
LABEL "eventfd"
+ CODE
"
#include <sys/eventfd.h>
@@ -165,6 +190,7 @@ eventfd_write(fd, value);
# futimens
qt_config_compile_test(futimens
LABEL "futimens()"
+ CODE
"
#include <sys/stat.h>
@@ -182,6 +208,7 @@ futimens(-1, 0);
# futimes
qt_config_compile_test(futimes
LABEL "futimes()"
+ CODE
"
#include <sys/time.h>
@@ -198,6 +225,7 @@ futimes(-1, 0);
# getauxval
qt_config_compile_test(getauxval
LABEL "getauxval()"
+ CODE
"
#include <sys/auxv.h>
@@ -214,6 +242,7 @@ int main(int argc, char **argv)
# getentropy
qt_config_compile_test(getentropy
LABEL "getentropy()"
+ CODE
"
#include <unistd.h>
@@ -231,6 +260,7 @@ char buf[32];
# glibc
qt_config_compile_test(glibc
LABEL "GNU libc"
+ CODE
"
#include <stdlib.h>
@@ -247,6 +277,7 @@ return __GLIBC__;
# inotify
qt_config_compile_test(inotify
LABEL "inotify"
+ CODE
"
#include <sys/inotify.h>
@@ -265,6 +296,7 @@ inotify_rm_watch(0, 1);
# ipc_sysv
qt_config_compile_test(ipc_sysv
LABEL "SysV IPC"
+ CODE
"
#include <sys/types.h>
#include <sys/ipc.h>
@@ -291,7 +323,8 @@ if (LINUX)
endif()
qt_config_compile_test(ipc_posix
LABEL "POSIX IPC"
- LIBRARIES "${ipc_posix_TEST_LIBRARIES}"
+ LIBRARIES
+ "${ipc_posix_TEST_LIBRARIES}"
CODE
"
#include <sys/types.h>
@@ -314,6 +347,7 @@ shm_unlink(\"test\");
# linkat
qt_config_compile_test(linkat
LABEL "linkat()"
+ CODE
"#define _ATFILE_SOURCE 1
#include <fcntl.h>
#include <unistd.h>
@@ -331,6 +365,7 @@ linkat(AT_FDCWD, \"foo\", AT_FDCWD, \"bar\", AT_SYMLINK_FOLLOW);
# ppoll
qt_config_compile_test(ppoll
LABEL "ppoll()"
+ CODE
"
#include <signal.h>
#include <poll.h>
@@ -351,6 +386,7 @@ ppoll(&pfd, 1, &ts, &sig);
# pollts
qt_config_compile_test(pollts
LABEL "pollts()"
+ CODE
"
#include <poll.h>
#include <signal.h>
@@ -372,6 +408,7 @@ pollts(&pfd, 1, &ts, &sig);
# poll
qt_config_compile_test(poll
LABEL "poll()"
+ CODE
"
#include <poll.h>
@@ -389,6 +426,7 @@ poll(&pfd, 1, 0);
# renameat2
qt_config_compile_test(renameat2
LABEL "renameat2()"
+ CODE
"#define _ATFILE_SOURCE 1
#include <fcntl.h>
#include <stdio.h>
@@ -406,6 +444,7 @@ renameat2(AT_FDCWD, argv[1], AT_FDCWD, argv[2], RENAME_NOREPLACE | RENAME_WHITEO
# statx
qt_config_compile_test(statx
LABEL "statx() in libc"
+ CODE
"#define _ATFILE_SOURCE 1
#include <sys/types.h>
#include <sys/stat.h>
@@ -427,6 +466,7 @@ return statx(AT_FDCWD, \"\", AT_STATX_SYNC_AS_STAT, mask, &statxbuf);
# syslog
qt_config_compile_test(syslog
LABEL "syslog"
+ CODE
"
#include <syslog.h>
@@ -445,6 +485,7 @@ closelog();
# xlocalescanprint
qt_config_compile_test(xlocalescanprint
LABEL "xlocale.h (or equivalents)"
+ CODE
"
#define QT_BEGIN_NAMESPACE
@@ -479,19 +520,23 @@ qDoubleSscanf(argv[0], invalidLocale, \"invalid format\", &a, &argc);
#### Features
-qt_feature("clock_gettime" PRIVATE
+qt_feature("clock-gettime" PRIVATE
LABEL "clock_gettime()"
CONDITION UNIX AND WrapRt_FOUND
)
-qt_feature("clock_monotonic" PUBLIC
+qt_feature("clock-monotonic" PUBLIC
LABEL "POSIX monotonic clock"
CONDITION QT_FEATURE_clock_gettime AND TEST_clock_monotonic
)
-qt_feature_definition("clock_monotonic" "QT_NO_CLOCK_MONOTONIC" NEGATE VALUE "1")
+qt_feature_definition("clock-monotonic" "QT_NO_CLOCK_MONOTONIC" NEGATE VALUE "1")
qt_feature("cxx11_future" PUBLIC
LABEL "C++11 <future>"
CONDITION TEST_cxx11_future
)
+qt_feature("cxx17_filesystem" PUBLIC
+ LABEL "C++17 <filesystem>"
+ CONDITION TEST_cxx17_filesystem
+)
qt_feature("eventfd" PUBLIC
LABEL "eventfd"
CONDITION NOT WASM AND TEST_eventfd
@@ -531,19 +576,19 @@ qt_feature("iconv" PUBLIC PRIVATE
CONDITION NOT QT_FEATURE_icu AND QT_FEATURE_textcodec AND ( TEST_posix_iconv OR TEST_sun_iconv )
)
qt_feature_definition("iconv" "QT_NO_ICONV" NEGATE VALUE "1")
-qt_feature("posix_libiconv" PRIVATE
+qt_feature("posix-libiconv" PRIVATE
LABEL "POSIX iconv"
CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND TEST_posix_iconv AND TEST_iconv_needlib
ENABLE TEST_posix_iconv AND TEST_iconv_needlib
DISABLE NOT TEST_posix_iconv OR NOT TEST_iconv_needlib
)
-qt_feature("sun_libiconv"
+qt_feature("sun-libiconv"
LABEL "SUN iconv"
CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND TEST_sun_iconv
ENABLE TEST_sun_iconv
DISABLE NOT TEST_sun_iconv
)
-qt_feature("gnu_libiconv" PRIVATE
+qt_feature("gnu-libiconv" PRIVATE
LABEL "GNU iconv"
CONDITION NOT WIN32 AND NOT QNX AND NOT ANDROID AND NOT APPLE AND TEST_posix_iconv AND NOT TEST_iconv_needlib
ENABLE TEST_posix_iconv AND NOT TEST_iconv_needlib
@@ -576,7 +621,7 @@ qt_feature("linkat" PRIVATE
AUTODETECT LINUX AND NOT ANDROID
CONDITION TEST_linkat
)
-qt_feature("std_atomic64" PUBLIC
+qt_feature("std-atomic64" PUBLIC
LABEL "64 bit atomic operations"
CONDITION Atomic_FOUND
)
@@ -587,10 +632,16 @@ qt_feature("mimetype" PUBLIC
CONDITION QT_FEATURE_textcodec
)
qt_feature_definition("mimetype" "QT_NO_MIMETYPE" NEGATE VALUE "1")
-qt_feature("mimetype_database" PRIVATE
+qt_feature("mimetype-database" PRIVATE
LABEL "Built-in copy of the MIME database"
CONDITION QT_FEATURE_mimetype
)
+qt_feature("pcre2"
+ LABEL "PCRE2"
+ ENABLE INPUT_pcre STREQUAL 'qt'
+ DISABLE INPUT_pcre STREQUAL 'no' OR INPUT_pcre STREQUAL 'system'
+)
+qt_feature_config("pcre2" QMAKE_PRIVATE_CONFIG)
qt_feature("poll_ppoll" PRIVATE
LABEL "Native ppoll()"
CONDITION NOT WASM AND TEST_ppoll
@@ -634,11 +685,12 @@ qt_feature("syslog" PRIVATE
AUTODETECT OFF
CONDITION TEST_syslog
)
-qt_feature("threadsafe_cloexec"
+qt_feature("threadsafe-cloexec"
LABEL "Threadsafe pipe creation"
CONDITION TEST_cloexec
)
-qt_feature_definition("threadsafe_cloexec" "QT_THREADSAFE_CLOEXEC" VALUE "1")
+qt_feature_definition("threadsafe-cloexec" "QT_THREADSAFE_CLOEXEC" VALUE "1")
+qt_feature_config("threadsafe-cloexec" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("properties" PUBLIC
SECTION "Kernel"
LABEL "Properties"
@@ -659,6 +711,12 @@ qt_feature("sharedmemory" PUBLIC
CONDITION ( ANDROID OR WIN32 OR ( NOT VXWORKS AND ( TEST_ipc_sysv OR TEST_ipc_posix ) ) )
)
qt_feature_definition("sharedmemory" "QT_NO_SHAREDMEMORY" NEGATE VALUE "1")
+qt_feature("shortcut" PUBLIC
+ SECTION "Kernel"
+ LABEL "QShortcut"
+ PURPOSE "Provides keyboard accelerators and shortcuts."
+)
+qt_feature_definition("shortcut" "QT_NO_SHORTCUT" NEGATE VALUE "1")
qt_feature("systemsemaphore" PUBLIC
SECTION "Kernel"
LABEL "QSystemSemaphore"
@@ -847,7 +905,7 @@ qt_feature("gestures" PUBLIC
PURPOSE "Provides a framework for gestures."
)
qt_feature_definition("gestures" "QT_NO_GESTURES" NEGATE VALUE "1")
-qt_feature("sha3_fast" PRIVATE
+qt_feature("sha3-fast" PRIVATE
SECTION "Utilities"
LABEL "Speed optimized SHA3"
PURPOSE "Optimizes SHA3 for speed instead of size."
@@ -906,8 +964,18 @@ qt_feature("win32_system_libs"
LABEL "Windows System Libraries"
CONDITION WIN32 AND libs.advapi32 AND libs.gdi32 AND libs.kernel32 AND libs.netapi32 AND libs.ole32 AND libs.shell32 AND libs.uuid AND libs.user32 AND libs.winmm AND libs.ws2_32 OR FIXME
)
-qt_feature("cborstream" PUBLIC
+qt_feature("cborstreamreader" PUBLIC
+ SECTION "Utilities"
+ LABEL "CBOR stream reading"
+ PURPOSE "Provides support for reading the CBOR binary format. Note that this is required for plugin loading. Qt GUI needs QPA plugins for basic operation."
+)
+qt_feature("cborstreamwriter" PUBLIC
+ SECTION "Utilities"
+ LABEL "CBOR stream writing"
+ PURPOSE "Provides support for writing the CBOR binary format."
+)
+qt_feature("binaryjson" PUBLIC
SECTION "Utilities"
- LABEL "CBOR stream I/O"
- PURPOSE "Provides support for reading and writing the CBOR binary format. Note that this is required for plugin loading. Qt GUI needs QPA plugins for basic operation."
+ LABEL "Binary JSON (deprecated)"
+ PURPOSE "Provides support for the deprecated binary JSON format."
)