Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static glfw #2

Closed
Dominaezzz opened this issue Jan 30, 2019 · 2 comments
Closed

Static glfw #2

Dominaezzz opened this issue Jan 30, 2019 · 2 comments

Comments

@Dominaezzz
Copy link
Owner

At the moment, glfw is setup for dynamic linking. So users of kgl-glfw need to have glfw installed on their system. In most cases, glfw 3.2.1 has to be built from source and is not available from a package manager, this is not very beginner friendly :).
So I want to bundle a static build of glfw with the KLIBs, so that way, they are self-contained and link automatically.
I'm currently looking at the implications of doing it this way.

@Dominaezzz
Copy link
Owner Author

Found a decent work around JetBrains/kotlin-native#2314 (comment)
The plan now is to setup another module kgl-glfw-bundled/kgl-glfw-static to simply bundle a static lib version of glfw so users can simply add it to their dependencies and have it link automatically.

So usually one would have

dependencies {
    implementation("com.kgl.kgl-glfw:1.0.0")
}

which would automatically (not always) find the dynamic library installed on the system.

Now one could just do

dependencies {
    implementation("com.kgl.kgl-glfw:1.0.0")
    implementation("com.kgl.kgl-glfw-static:1.0.0") // optional
}

and have it link automatically without installing anything. Or leave out the optional line and specify linkerOpts themselves to setup dynamic (or even static) linking.

@Dominaezzz
Copy link
Owner Author

Merged into master!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant