mirror of
https://github.com/mappu/miqt.git
synced 2025-05-03 18:40:21 +00:00
pkg-config: move into docs/, delete the example files
This commit is contained in:
parent
7dd11c6d9b
commit
c7b7e8fdfb
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,9 +7,6 @@ container-build-cache/
|
||||
# local genbindings configuration
|
||||
cmd/genbindings/genbindings.local*
|
||||
|
||||
# local pkg-config configuration
|
||||
pkg-config/*.pc
|
||||
|
||||
# binaries
|
||||
*.exe
|
||||
|
||||
|
@ -118,7 +118,7 @@ MIQT has a custom implementation of Qt `uic` and `rcc` tools, to allow using [Qt
|
||||
|
||||
MIQT uses `pkg-config` to find all used Qt libraries. Every Qt library should have a definition file in `.pc` format, which provides CGO with the necessary `CXXFLAGS`/`LDFLAGS`. Your Qt development environment already included the necessary `.pc` definition files.
|
||||
|
||||
You can use the `PKG_CONFIG_PATH` environment variable to override where CGO looks for `.pc` files. [Read more »](pkg-config/README.md)
|
||||
You can use the `PKG_CONFIG_PATH` environment variable to override where CGO looks for `.pc` files. [Read more »](doc/pkg-config.md)
|
||||
|
||||
### Q8. How can I upgrade a MIQT app from Qt 5 to Qt 6?
|
||||
|
||||
|
@ -38,7 +38,7 @@ You should check the following configuration:
|
||||
|
||||
1. Git clone this repository
|
||||
2. In `docker/genbindings.Dockerfile`, add your library's headers and pkg-config file.
|
||||
- If your library does not include a pkg-config file, [you must create one.](pkg-config/README.md)
|
||||
- If your library does not include a pkg-config file, [you must create one.](../../doc/pkg-config.md)
|
||||
3. Patch `cmd/genbindings/config-libraries.go` to add a new `generate` block for your target library
|
||||
4. Run `genbindings` to regenerate all bindings
|
||||
- The first run must populate clang ASTs into a cache directory and may be slower, but it is fast afterwards
|
||||
|
@ -8,6 +8,7 @@ To specify the CFLAGS/CXXFLAGS and LDFLAGS for a specific library, make a `MyLib
|
||||
|
||||
```pkgconfig
|
||||
Name: My Library
|
||||
Requires: Qt6Widgets
|
||||
Libs: -lfoo
|
||||
Cflags: -I/path/
|
||||
```
|
||||
@ -16,6 +17,8 @@ Then run `PKG_CONFIG_PATH=/path/to/dir/ go build` so CGO will find your library.
|
||||
|
||||
The `PKG_CONFIG_PATH` environment variable is understood both by CGO and by genbindings.
|
||||
|
||||
When running genbindings in the docker/genbindings container, custom pkg-config files are created inline in the Dockerfile.
|
||||
|
||||
## Further reading
|
||||
|
||||
- [Guide to pkg-config](https://people.freedesktop.org/~dbn/pkg-config-guide.html)
|
||||
@ -25,3 +28,23 @@ The `PKG_CONFIG_PATH` environment variable is understood both by CGO and by genb
|
||||
$ pkg-config --variable pc_path pkg-config
|
||||
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
|
||||
```
|
||||
|
||||
List all available packages known to pkg-config:
|
||||
|
||||
```bash
|
||||
pkg-config --list-all
|
||||
```
|
||||
|
||||
A full example for QScintilla (Qt 5) from the [genbindings.Dockerfile](../docker/genbindings.Dockerfile):
|
||||
|
||||
```pkg-config
|
||||
includedir=/usr/include/x86_64-linux-gnu/qt5/Qsci/
|
||||
|
||||
Name: QScintilla
|
||||
Description: Qt5 port of the Scintilla source code editing widget
|
||||
URL: http://www.riverbankcomputing.co.uk/software/qscintilla
|
||||
Version: 2.13.3
|
||||
Requires: Qt5Widgets, Qt5PrintSupport
|
||||
Libs: -lqscintilla2_qt5
|
||||
Cflags: -I${includedir}
|
||||
```
|
@ -1,9 +0,0 @@
|
||||
includedir=/usr/include/x86_64-linux-gnu/qt5/Qsci/
|
||||
|
||||
Name: QScintilla
|
||||
Description: Qt5 port of the Scintilla source code editing widget
|
||||
URL: http://www.riverbankcomputing.co.uk/software/qscintilla
|
||||
Version: 2.13.3
|
||||
Requires: Qt5Widgets, Qt5PrintSupport
|
||||
Libs: -lqscintilla2_qt5
|
||||
Cflags: -I${includedir}
|
@ -1,9 +0,0 @@
|
||||
includedir=/usr/include/x86_64-linux-gnu/qt6/Qsci/
|
||||
|
||||
Name: QScintilla6
|
||||
Description: Qt6 port of the Scintilla source code editing widget
|
||||
URL: http://www.riverbankcomputing.co.uk/software/qscintilla
|
||||
Version: 2.13.3
|
||||
Requires: Qt6Widgets, Qt6PrintSupport
|
||||
Libs: -lqscintilla2_qt6
|
||||
Cflags: -I${includedir}
|
@ -1,9 +0,0 @@
|
||||
srcdir=/usr/local/src/scintilla/
|
||||
|
||||
Name: ScintillaEdit
|
||||
Description: Scintilla's own upstream Qt port
|
||||
URL: https://www.scintilla.org/
|
||||
Version: 5.5.2
|
||||
Requires: Qt5Widgets
|
||||
Libs: -L${srcdir}/bin -lScintillaEdit
|
||||
Cflags: -include stdint.h -I${srcdir}/qt/ScintillaEdit -I${srcdir}/qt/ScintillaEditBase -I${srcdir}/include -I${srcdir}/src
|
Loading…
x
Reference in New Issue
Block a user