mirror of
https://github.com/mappu/miqt.git
synced 2025-01-03 14:18:37 +00:00
genbindings/main: support parsing a single header instead of a directory
This commit is contained in:
parent
5afa94f2cc
commit
20f6d7878b
@ -130,7 +130,11 @@ func generate(packageName string, srcDirs []string, clangBin string, cflags []st
|
|||||||
|
|
||||||
var includeFiles []string
|
var includeFiles []string
|
||||||
for _, srcDir := range srcDirs {
|
for _, srcDir := range srcDirs {
|
||||||
includeFiles = append(includeFiles, findHeadersInDir(srcDir)...)
|
if strings.HasSuffix(srcDir, `.h`) {
|
||||||
|
includeFiles = append(includeFiles, srcDir) // single .h
|
||||||
|
} else {
|
||||||
|
includeFiles = append(includeFiles, findHeadersInDir(srcDir)...)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("Found %d header files to process.", len(includeFiles))
|
log.Printf("Found %d header files to process.", len(includeFiles))
|
||||||
|
Loading…
Reference in New Issue
Block a user