diff --git a/doc/notes/3.3.3.md b/doc/notes/3.3.3.md index c8ec6dc7e6..208a6f6b22 100644 --- a/doc/notes/3.3.3.md +++ b/doc/notes/3.3.3.md @@ -14,6 +14,7 @@ This build includes the following changes: #### Fixes +- CUDA: Fixed library name on Linux. (#884) - OpenGL: Added support for [libglvnd](https://github.com/NVIDIA/libglvnd). (#880) * LWJGL will now try to load `libGLX.so.0` before `libGL.so.1` on Linux, matching GLFW. * Use `Configuration.OPENGL_LIBRARY_NAME` and `GLFWNativeGLX::setPath` to override this behavior. diff --git a/modules/lwjgl/cuda/src/generated/java/org/lwjgl/cuda/CU.java b/modules/lwjgl/cuda/src/generated/java/org/lwjgl/cuda/CU.java index 522535fe94..5f75be08e4 100644 --- a/modules/lwjgl/cuda/src/generated/java/org/lwjgl/cuda/CU.java +++ b/modules/lwjgl/cuda/src/generated/java/org/lwjgl/cuda/CU.java @@ -31,7 +31,7 @@ */ public class CU { - private static final SharedLibrary NVCUDA = Library.loadNative(CU.class, "org.lwjgl.cuda", Configuration.CUDA_LIBRARY_NAME, "nvcuda"); + private static final SharedLibrary NVCUDA = Library.loadNative(CU.class, "org.lwjgl.cuda", Configuration.CUDA_LIBRARY_NAME, Platform.get() == Platform.WINDOWS ? "nvcuda" : "cuda"); /** Contains the function pointers loaded from the NVCUDA {@link SharedLibrary}. */ public static final class Functions { diff --git a/modules/lwjgl/cuda/src/templates/kotlin/cuda/CUDATypes.kt b/modules/lwjgl/cuda/src/templates/kotlin/cuda/CUDATypes.kt index 9900b1bfe0..b1e2549a0a 100644 --- a/modules/lwjgl/cuda/src/templates/kotlin/cuda/CUDATypes.kt +++ b/modules/lwjgl/cuda/src/templates/kotlin/cuda/CUDATypes.kt @@ -6,7 +6,7 @@ package cuda import org.lwjgl.generator.* -val NVCUDA_BINDING = simpleBinding(Module.CUDA, libraryName = "NVCUDA", libraryExpression = "Configuration.CUDA_LIBRARY_NAME, \"nvcuda\"") +val NVCUDA_BINDING = simpleBinding(Module.CUDA, libraryName = "NVCUDA", libraryExpression = "Configuration.CUDA_LIBRARY_NAME, Platform.get() == Platform.WINDOWS ? \"nvcuda\" : \"cuda\"") val NVCUDA_BINDING_DELEGATE = NVCUDA_BINDING.delegate("CU.getLibrary()") internal fun Func.versioned(version: Int = 2): Func = NativeName("__CUDA_API_VERSION(\"${this.name}\", $version)")..this