includeDirs
A collection of directories to search for headers.
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(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.
A collection of directories to search for headers.
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(Action { allHeaders(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
Action to declare included directories
See also
A collection of directories to search for headers.
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("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
IncludeDirectories configuration