headerFilterOnly
Additional directories to search for headers listed in the headers property in the .def file. It's equivalent to the -headerFilterAdditionalSearchPrefix cinterop tool option.
Usage example
The following example demonstrates how to add multiple directories containing header files in a build.gradle.kts file:
//build.gradle.kts
kotlin {
linuxX64() {
compilations.getByName("main") {
cinterops {
val cinterop by creating {
defFile(project.file("custom.def"))
includeDirs {
headerFilterOnly(project.file("include/libs"))
}
}
}
}
}
}In the example, the directory include/libs is specified as the prefix for the directories listed in the headers declared in the custom.def.
Parameters
The directories to be included as prefixes for the header filters.
Additional directories to search for headers listed in the headers property in the .def file. It's equivalent to the -headerFilterAdditionalSearchPrefix cinterop tool option.
Usage example
The following example demonstrates how to add multiple directories containing header files in a build.gradle.kts file:
//build.gradle.kts
kotlin {
linuxX64() {
compilations.getByName("main") {
cinterops {
val cinterop by creating {
defFile(project.file("custom.def"))
includeDirs {
headerFilterOnly(listOf(project.file("include/libs")))
}
}
}
}
}
}In the example, the directory include/libs is specified as the prefix for the directories listed in the headers declared in the custom.def.
Parameters
The collection of directories to be included as prefixes for the header filters.