OpenCL / Vulkan: enable support for Windows

This commit is contained in:
李通洲
2022-10-09 02:04:41 +08:00
parent 510d57e7dd
commit 7c98450acc
6 changed files with 19 additions and 6 deletions
+11
View File
@@ -19,6 +19,14 @@
static void* libraryLoad(const char* path, int maxVersion)
{
void* result = dlopen(path, FF_DLOPEN_FLAGS);
#if defined(_WIN32) || defined(__MSYS__)
// libX.dll.1 never exists on Windows, while libX-1.dll may exist
FF_UNUSED(maxVersion)
#else
if(result != NULL || maxVersion < 0)
return result;
@@ -40,6 +48,9 @@ static void* libraryLoad(const char* path, int maxVersion)
}
ffStrbufDestroy(&pathbuf);
#endif
return result;
}
+3 -1
View File
@@ -5,7 +5,9 @@
#include <dlfcn.h>
#ifdef __APPLE__
#if defined(_WIN32) || defined(__MSYS__)
#define FF_LIBRARY_EXTENSION ".dll"
#elif defined(__APPLE__)
#define FF_LIBRARY_EXTENSION ".dylib"
#else
#define FF_LIBRARY_EXTENSION ".so"