代码拉取完成,页面将自动刷新
# Copyright (C) 2022 Rochus Keller (me@rochus-keller.ch) for LeanQt
# licensed under GPL/LGPL
param HAVE_SHARED = false # if true build shared instead of static libraries, and export marked symbols
param HAVE_GEOM = false # include geometry classes like QRect, QPoint etc.
param HAVE_JSON = false # include QJsonObject and friends
param HAVE_XMLSTREAM = false # include QXmlStreamWriter, QXmlStreamReader, etc.
param HAVE_URL = false # include QUrl and support classes
param HAVE_DSTREAM = false # include QDataStream
param HAVE_CMDLINE = false # include QCommandLineParser and QCommandLineOption
param HAVE_PROCESS = false # include QProcess
param HAVE_SHAREDMEM = false # include QSharedMemory and QSystemSemaphore
param HAVE_ZLIB = false # include qCompress
param HAVE_MIME = false # include QMimeType and QMimeDatabase
param HAVE_THREADS = false # include QThread and friends
param HAVE_FILEIO = false # include QFile, QFileInfo, QDir, QSettings etc.
param HAVE_COREAPP = false # include QCoreApplication, QTranslator
param HAVE_OBJECT = false # include QObject, QEvent, QEventDispatcher etc.
param HAVE_LIBRARY = false # include QLibrary
param HAVE_PLUGINS = false # include QPluginLoader
param HAVE_CORE_ALL = false # switches on all flags which add code
param HAVE_SSL = false # include QSslSocket and friends; only OpenSSL dynamic loading supported so far
param HAVE_LOCALSOCK = false # include QLocalSocket and QLocalServer
param HAVE_NETACCESS = false # include QNetworkAccessManager and friends
param HAVE_BEARER = false # include QNetworkConfiguration, QNetworkSession and friends
param HAVE_AUTH = false # include QAuthenticator
param HAVE_NET_ALL = false # switches on all flags which add code
param HAVE_NET_MINIMUM = false # takes care that core is compiled with HAVE_OBJECT and HAVE_URL support
param HAVE_CONCURRENT = false # takes care that core is compiled with HAVE_THREADS support
param HAVE_IMAGE = false # takes care that core is compiled with HAVE_GEOM and HAVE_DSTREAM support
param HAVE_GUI = false # takes care that core is compiled with HAVE_IMAGE and HAVE_OBJECT
param HAVE_FONTCONFIG = false # Linux GUI option; use fontconfig to locate fonts; otherwise use the path provided via QT_QPA_FONTDIR
# environment variable, or applicationDirPath() + "/fonts", or QStandardPaths::FontsLocation; requires -lfontconfig
# NOTE: not all possible combinations on all platforms have been tested;
# patches are welcome, in case you find a combination which doesn't work
if HAVE_CORE_ALL {
HAVE_GEOM = true; HAVE_JSON = true; HAVE_XMLSTREAM = true; HAVE_URL = true; HAVE_DSTREAM = true
HAVE_FILEIO = true; HAVE_COREAPP = true; HAVE_OBJECT = true; HAVE_CMDLINE = true; HAVE_THREADS = true
HAVE_LIBRARY = true; HAVE_PROCESS = true; HAVE_SHAREDMEM = true; HAVE_PLUGINS = true; HAVE_ZLIB = true
}
if HAVE_NET_ALL {
HAVE_SSL = true; HAVE_LOCALSOCK = true; HAVE_NETACCESS = true; HAVE_BEARER = true; HAVE_AUTH = true
}
if HAVE_NET_MINIMUM || HAVE_SSL || HAVE_LOCALSOCK || HAVE_NETACCESS || HAVE_BEARER || HAVE_AUTH {
HAVE_NET_MINIMUM = true
if !HAVE_OBJECT || !HAVE_URL {
message("enabling HAVE_OBJECT and HAVE_URL required by the network module")
HAVE_OBJECT = true
HAVE_URL = true
}
}
if HAVE_GUI && !HAVE_IMAGE {
message("enabling HAVE_IMAGE required by HAVE_GUI")
HAVE_IMAGE = true
}
if HAVE_GUI && !HAVE_OBJECT {
message("enabling HAVE_OBJECT required by HAVE_GUI")
HAVE_OBJECT = true
}
if HAVE_GUI && !HAVE_FILEIO {
message("enabling HAVE_FILEIO required by HAVE_GUI")
HAVE_FILEIO = true
}
if HAVE_GUI && !HAVE_URL {
message("enabling HAVE_URL required by HAVE_GUI")
HAVE_URL = true
}
if HAVE_GUI && (host_os == `macos) && !HAVE_MIME {
message("enabling HAVE_MIME required by HAVE_GUI on macOS")
HAVE_MIME = true
}
if HAVE_IMAGE && !HAVE_DSTREAM {
message("enabling HAVE_DSTREAM required by HAVE_IMAGE")
HAVE_DSTREAM = true
}
if HAVE_IMAGE && !HAVE_GEOM {
message("enabling HAVE_GEOM required by HAVE_IMAGE")
HAVE_GEOM = true
}
if HAVE_CONCURRENT && !HAVE_THREADS {
message("enabling HAVE_TRHEADS required by HAVE_CONCURRENT")
HAVE_THREADS = true
}
if HAVE_BEARER && !HAVE_PLUGINS {
message("enabling HAVE_PLUGINS required by HAVE_BEARER")
HAVE_PLUGINS = true
}
if HAVE_SSL && !HAVE_LIBRARY {
message("enabling HAVE_LIBRARY required by HAVE_SSL")
HAVE_LIBRARY = true
}
if HAVE_SSL && !HAVE_AUTH {
message("enabling HAVE_AUTH required by HAVE_SSL")
HAVE_AUTH = true
}
if HAVE_AUTH && !HAVE_DSTREAM {
message("enabling HAVE_DSTREAM required by HAVE_AUTH")
HAVE_DSTREAM = true
}
if HAVE_NETACCESS && !HAVE_DSTREAM {
message("enabling HAVE_DSTREAM required by HAVE_NETACCESS")
HAVE_DSTREAM = true
}
if HAVE_NETACCESS && !HAVE_AUTH {
message("enabling HAVE_AUTH required by HAVE_NETACCESS")
HAVE_AUTH = true
}
if HAVE_PLUGINS && !HAVE_OBJECT {
message("enabling HAVE_OBJECT required by HAVE_PLUGINS")
HAVE_OBJECT = true
}
if HAVE_PLUGINS && !HAVE_LIBRARY {
message("enabling HAVE_LIBRARY required by HAVE_PLUGINS")
HAVE_LIBRARY = true
}
if HAVE_PLUGINS && !HAVE_JSON {
message("enabling HAVE_JSON required by HAVE_PLUGINS")
HAVE_JSON = true
}
if HAVE_SHAREDMEM && !HAVE_FILEIO {
message("enabling HAVE_FILEIO required by HAVE_SHAREDMEM")
HAVE_FILEIO = true
}
if HAVE_LIBRARY && !HAVE_FILEIO {
message("enabling HAVE_FILEIO required by HAVE_LIBRARY")
HAVE_FILEIO = true
}
if HAVE_SHARED && !HAVE_COREAPP {
message("enabling HAVE_COREAPP required by HAVE_SHARED")
HAVE_COREAPP = true
}
if HAVE_OBJECT && !HAVE_COREAPP {
message("enabling HAVE_COREAPP required by HAVE_OBJECT")
HAVE_COREAPP = true
}
if HAVE_OBJECT && !HAVE_THREADS {
message("enabling HAVE_THREADS required by HAVE_OBJECT")
HAVE_THREADS = true
}
######################################################################
submod core
let _core_sources - = core.sources
let _core_config - = core.config
let _core_linker_config - : Config {
if target_os == `win32 {
.lib_names = [
"Gdi32" "User32" "Shell32" "Comdlg32" "Advapi32" "Ole32" "Ws2_32"
]
} else {
.lib_names += [ "stdc++" "m" ]
.ldflags += "-shared-libgcc"
if HAVE_THREADS || HAVE_PROCESS {
.lib_names += "pthread"
}
if HAVE_LIBRARY {
.lib_names += "dl"
}
if target_os == `macos {
.frameworks += [ "IOKit" "Foundation" "CoreServices" "AppKit" "ApplicationServices" "CoreFoundation" ]
}
}
}
let core_client_config * : Config {
.configs += [ _core_config _core_linker_config ]
}
######################################################################
submod xml else ./missing.busy
let xml_sources * = xml.sources
######################################################################
submod net else ./missing.busy
let _net_sources = net.sources
let _net_linker_config - : Config {
if target_os == `win32 {
.lib_names = [
"Dnsapi" "Iphlpapi"
]
if HAVE_SSL {
.lib_names += "Crypt32"
}
}
if target_os == `macos {
.frameworks += [ "SystemConfiguration" "Security" ]
}
}
let net_client_config * : Config {
.configs += [ core_client_config net.config _net_linker_config ]
}
######################################################################
submod concurrent else ./missing.busy
let concurrent_sources = concurrent.sources
let _concurrent_linker_config - : Config {
}
let concurrent_client_config * : Config {
.configs += [ core_client_config concurrent.config _concurrent_linker_config ]
}
######################################################################
submod image else ./missing.busy
let image_sources * = image.sources
let _image_config - = image.config
let _image_linker_config - : Config {
}
let image_client_config * : Config {
.configs += [ core_client_config _image_config _image_linker_config ]
}
######################################################################
submod gui else ./missing.busy
let _gui_sources * = gui.sources
let _gui_linker_config - : Config {
}
let gui_client_config * : Config {
.configs += [ image_client_config gui.config _gui_linker_config ]
}
######################################################################
submod tools
let rcc * = tools.rcc.rcc
let moc * = tools.moc.moc
######################################################################
submod mime else ./missing.busy
let core_sources * : Group {
.deps += _core_sources
if HAVE_OBJECT {
.deps += [ moc core.moc_sources ]
}
if HAVE_MIME {
.deps += mime.sources
}
}
let net_sources * : Group {
.deps += [ moc net.moc_sources ] # do this first because of .moc includes
.deps += _net_sources;
}
let gui_sources * : Group {
if (target_os == `macos) || (target_os == `win32) {
.deps += rcc
}
.deps += [ moc gui.moc_sources ]
.deps += _gui_sources
}
######################################################################
let libqtcore * : Library {
.deps += core_sources
if HAVE_SHARED {
.lib_type = `shared
.configs += core_client_config
}else{
.lib_type = `static
}
.name = "qtcore"
}
let libqtxml * : Library {
.deps += xml_sources
if HAVE_SHARED {
.lib_type = `shared
.configs += core_client_config;
.deps += libqtcore
}else{
.lib_type = `static
}
.name = "qtxml"
}
let libqtnetwork * : Library {
.deps += net_sources
if HAVE_SHARED {
.lib_type = `shared
.configs += net_client_config;
.deps += libqtcore
}else{
.lib_type = `static
}
.name = "qtnetwork"
}
let libqtconcurrent * : Library {
.deps += concurrent_sources
if HAVE_SHARED {
.lib_type = `shared
.configs += concurrent_client_config;
.deps += libqtcore
}else{
.lib_type = `static
}
.name = "qtconcurrent"
}
let libqtimage * : Library {
.deps += image_sources
if HAVE_SHARED {
.lib_type = `shared
.configs += image_client_config;
.deps += libqtcore
}else{
.lib_type = `static
}
.name = "qtimage"
}
# either use libqtgui or libqtimage, but not both
let libqtgui * : Library {
.deps += [ image_sources gui_sources ]
if HAVE_SHARED {
.lib_type = `shared
.configs += gui_client_config;
.deps += libqtcore
}else{
.lib_type = `static
}
.name = "qtgui"
}
# use libqtwinmain for Windows applications (with both static or shared libqtgui)
let libqtwinmain * : Library {
.sources += ./gui/windows/qtmain_win.cpp
.lib_type = `static
.name = "qtwinmain"
.configs += _core_config
}
######################################################################
## Examples
submod examples
let build_examples ! : Copy {
.use_deps += `executable
.deps += examples.hello
if HAVE_OBJECT {
.deps += examples.objects
}
if HAVE_THREADS {
.deps += examples.threads
}
if HAVE_PROCESS {
.deps += examples.process
}
if HAVE_NET_MINIMUM && HAVE_CMDLINE {
.deps += examples.dnslookup
}
if HAVE_CONCURRENT {
.deps += examples.runner
}
if HAVE_NETACCESS && HAVE_FILEIO {
.deps += examples.download
}
if HAVE_IMAGE {
.deps += examples.transform
}
if HAVE_GUI {
.deps += examples.clock
}
.outputs += ./{{source_file_part}}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。