Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
toasterofbread committed Aug 17, 2024
1 parent 102771c commit da5dd5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-windows-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: gradle/gradle-build-action@v3

- name: Build Windows x86_64 minimal binaries
run: .\gradlew.bat mingwX64Binaries -PDISABLE_MPV
run: .\gradlew.bat mingwX64Binaries -PMINIMAL

- name: Upload debug binary
uses: actions/upload-artifact@v3
Expand Down
10 changes: 5 additions & 5 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ kotlin {
jvmToolchain(22)

val native_targets: MutableList<KotlinNativeTarget> = mutableListOf()
val current_platform: Platform = Platform.getCurrent()

for (platform in Platform.supported) {
when (platform) {
Platform.JVM -> {
jvm {
withJava()
}
continue
}
Platform.LINUX_X86 -> native_targets.add(linuxX64().apply { configureNativeTarget(platform) })
Platform.LINUX_ARM64 -> native_targets.add(linuxArm64().apply { configureNativeTarget(platform) })
Expand All @@ -43,12 +43,12 @@ kotlin {

kjna {
generate {
include_dirs += listOf(Platform.getCurrent().getNativeDependenciesDir(project).resolve("include").absolutePath)
include_dirs += listOf(current_platform.getNativeDependenciesDir(project).resolve("include").absolutePath)
parser_include_dirs += listOf("/usr/include/linux/", "/usr/lib/gcc/x86_64-pc-linux-gnu/14.1.1/include/")

packages(native_targets) {
add("gen.libmpv") {
enabled = !BuildFlag.DISABLE_MPV.isSet(project) && !BuildFlag.MINIMAL.isSet(project)
enabled = !BuildFlag.MINIMAL.isSet(project)

addHeader("mpv/client.h", "LibMpv")
libraries = listOf("mpv")
Expand All @@ -63,7 +63,7 @@ kotlin {
}

add("gen.libappindicator") {
enabled = !BuildFlag.DISABLE_APPINDICATOR.isSet(project) && !BuildFlag.MINIMAL.isSet(project)
enabled = !BuildFlag.MINIMAL.isSet(project)
disabled_targets = listOf(KJnaBuildTarget.NATIVE_MINGW_X64)

addHeader("libayatana-appindicator3-0.1/libayatana-appindicator/app-indicator.h", "LibAppIndicator") {
Expand Down Expand Up @@ -152,7 +152,7 @@ kotlin {
}

enum class BuildFlag {
DISABLE_MPV, DISABLE_APPINDICATOR, MINIMAL;
MINIMAL;

fun isSet(project: Project): Boolean {
return project.hasProperty(name)
Expand Down

0 comments on commit da5dd5e

Please sign in to comment.