allHeaders
A collection of directories to search for headers. It's the equivalent of the -I<path>
compiler 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 {
allHeaders(project.file("src/main/headersDir1"), project.file("src/main/headersDir2"))
}
}
}
}
}
}
In the example, the directories src/main/headersDir1
and src/main/headersDir2
in the project directory are specified as locations containing the header files required for the cinterop process.
Parameters
The directories to be included.
A collection of directories to search for headers. It's the equivalent of the -I<path>
compiler 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 {
allHeaders(listOf(project.file("src/main/headersDir1"), project.file("src/main/headersDir2")))
}
}
}
}
}
}
In the example, the directories src/main/headersDir1
and src/main/headersDir2
in the project directory are specified as locations containing the header files required for the cinterop process.
Parameters
The collection of directories to be included