mirror of
https://github.com/mappu/miqt.git
synced 2025-04-28 16:10:21 +00:00
genbindings: split qt5/6 QNetwork and qt6 QWebChannel into subpackages
This commit is contained in:
parent
acc5abdc38
commit
dc4c83998a
@ -84,12 +84,45 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) {
|
|||||||
ClangMatchSameHeaderDefinitionOnly,
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Qt 5 Network (1/3)
|
||||||
|
|
||||||
generate(
|
generate(
|
||||||
"qt/network",
|
"qt/network",
|
||||||
[]string{
|
[]string{
|
||||||
"/usr/include/x86_64-linux-gnu/qt5/QtNetwork",
|
"/usr/include/x86_64-linux-gnu/qt5/QtNetwork",
|
||||||
},
|
},
|
||||||
AllowAllHeaders,
|
ExceptHeaders("qdtls.h", "qsctpserver.h", "qsctpsocket.h"),
|
||||||
|
clangBin,
|
||||||
|
pkgConfigCflags("Qt5Network"),
|
||||||
|
outDir,
|
||||||
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Qt 5 Network (2/3)
|
||||||
|
|
||||||
|
generate(
|
||||||
|
"qt/network/sctp",
|
||||||
|
[]string{
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt5/QtNetwork",
|
||||||
|
},
|
||||||
|
OnlyHeaders("qsctpserver.h", "qsctpsocket.h"),
|
||||||
|
clangBin,
|
||||||
|
pkgConfigCflags("Qt5Network"),
|
||||||
|
outDir,
|
||||||
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Qt 5 Network (3/3) - split out DTLS into subpackage because macOS Brew is
|
||||||
|
// compiled with it disabled
|
||||||
|
// There are still some extra functions to move out from qsslconfiguration.h
|
||||||
|
// @ref https://github.com/mappu/miqt/issues/151
|
||||||
|
|
||||||
|
generate(
|
||||||
|
"qt/network/dtls",
|
||||||
|
[]string{
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt5/QtNetwork",
|
||||||
|
},
|
||||||
|
OnlyHeaders("qdtls.h"),
|
||||||
clangBin,
|
clangBin,
|
||||||
pkgConfigCflags("Qt5Network"),
|
pkgConfigCflags("Qt5Network"),
|
||||||
outDir,
|
outDir,
|
||||||
@ -277,13 +310,47 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) {
|
|||||||
ClangMatchSameHeaderDefinitionOnly,
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Qt 6 QtNetwork
|
// Qt 6 QtNetwork (1/3)
|
||||||
generate(
|
generate(
|
||||||
"qt6/network",
|
"qt6/network",
|
||||||
[]string{
|
[]string{
|
||||||
"/usr/include/x86_64-linux-gnu/qt6/QtNetwork",
|
"/usr/include/x86_64-linux-gnu/qt6/QtNetwork",
|
||||||
},
|
},
|
||||||
ExceptHeaders("qtnetwork-config.h"),
|
ExceptHeaders("qtnetwork-config.h", "qsctpserver.h", "qsctpsocket.h", "qdtls.h"),
|
||||||
|
clangBin,
|
||||||
|
"--std=c++17 "+pkgConfigCflags("Qt6Network"),
|
||||||
|
outDir,
|
||||||
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Qt 6 Network (2/3) - split out SCTP into subpackage because Arch Linux is
|
||||||
|
// compiled with it disabled
|
||||||
|
// @ref https://github.com/mappu/miqt/issues/150
|
||||||
|
// @ref https://github.com/mappu/miqt/issues/194
|
||||||
|
|
||||||
|
generate(
|
||||||
|
"qt6/network/sctp",
|
||||||
|
[]string{
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt6/QtNetwork",
|
||||||
|
},
|
||||||
|
OnlyHeaders("qsctpserver.h", "qsctpsocket.h"),
|
||||||
|
clangBin,
|
||||||
|
"--std=c++17 "+pkgConfigCflags("Qt6Network"),
|
||||||
|
outDir,
|
||||||
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Qt 6 Network (3/3) - split out DTLS into subpackage because macOS Brew is
|
||||||
|
// compiled with it disabled
|
||||||
|
// There are still some extra functions to move out from qsslconfiguration.h
|
||||||
|
// @ref https://github.com/mappu/miqt/issues/151
|
||||||
|
|
||||||
|
generate(
|
||||||
|
"qt6/network/dtls",
|
||||||
|
[]string{
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt6/QtNetwork",
|
||||||
|
},
|
||||||
|
OnlyHeaders("qdtls.h"),
|
||||||
clangBin,
|
clangBin,
|
||||||
"--std=c++17 "+pkgConfigCflags("Qt6Network"),
|
"--std=c++17 "+pkgConfigCflags("Qt6Network"),
|
||||||
outDir,
|
outDir,
|
||||||
@ -317,13 +384,30 @@ func ProcessLibraries(clangBin, outDir, extraLibsDir string) {
|
|||||||
ClangMatchSameHeaderDefinitionOnly,
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Qt 6 QWebChannel
|
// Qt 6 QWebChannel (1/2)
|
||||||
|
// Exclude qqmlwebchannel because Arch Linux packages it differently
|
||||||
|
// @ref https://github.com/mappu/miqt/issues/150
|
||||||
|
// @ref https://github.com/mappu/miqt/issues/194
|
||||||
generate(
|
generate(
|
||||||
"qt6/webchannel",
|
"qt6/webchannel",
|
||||||
[]string{
|
[]string{
|
||||||
"/usr/include/x86_64-linux-gnu/qt6/QtWebChannel",
|
"/usr/include/x86_64-linux-gnu/qt6/QtWebChannel",
|
||||||
},
|
},
|
||||||
AllowAllHeaders,
|
ExceptHeaders("qqmlwebchannel.h"),
|
||||||
|
clangBin,
|
||||||
|
"--std=c++17 "+pkgConfigCflags("Qt6WebChannel"),
|
||||||
|
outDir,
|
||||||
|
ClangMatchSameHeaderDefinitionOnly,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Qt 6 WebChannel (2/2)
|
||||||
|
// Just the Qt Quick part of qqmlwebchannel
|
||||||
|
generate(
|
||||||
|
"qt6/webchannel/qmlwebchannel",
|
||||||
|
[]string{
|
||||||
|
"/usr/include/x86_64-linux-gnu/qt6/QtWebChannel",
|
||||||
|
},
|
||||||
|
OnlyHeaders("qqmlwebchannel.h"),
|
||||||
clangBin,
|
clangBin,
|
||||||
"--std=c++17 "+pkgConfigCflags("Qt6WebChannel"),
|
"--std=c++17 "+pkgConfigCflags("Qt6WebChannel"),
|
||||||
outDir,
|
outDir,
|
||||||
|
8
qt/network/dtls/cflags.go
Normal file
8
qt/network/dtls/cflags.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package dtls
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo CXXFLAGS: -std=c++11
|
||||||
|
#cgo CFLAGS: -std=gnu11
|
||||||
|
#cgo pkg-config: Qt5Network
|
||||||
|
*/
|
||||||
|
import "C"
|
8
qt/network/sctp/cflags.go
Normal file
8
qt/network/sctp/cflags.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package sctp
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo CXXFLAGS: -std=c++11
|
||||||
|
#cgo CFLAGS: -std=gnu11
|
||||||
|
#cgo pkg-config: Qt5Network
|
||||||
|
*/
|
||||||
|
import "C"
|
6
qt6/network/dtls/cflags.go
Normal file
6
qt6/network/dtls/cflags.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package dtls
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo pkg-config: Qt6Network
|
||||||
|
*/
|
||||||
|
import "C"
|
6
qt6/network/sctp/cflags.go
Normal file
6
qt6/network/sctp/cflags.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package sctp
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo pkg-config: Qt6Network
|
||||||
|
*/
|
||||||
|
import "C"
|
6
qt6/webchannel/qmlwebchannel/cflags.go
Normal file
6
qt6/webchannel/qmlwebchannel/cflags.go
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package qmlwebchannel
|
||||||
|
|
||||||
|
/*
|
||||||
|
#cgo pkg-config: Qt6WebChannel
|
||||||
|
*/
|
||||||
|
import "C"
|
Loading…
x
Reference in New Issue
Block a user