aboutsummaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorTimo Rothenpieler2016-08-28 17:54:29 +0200
committerTimo Rothenpieler2016-08-28 18:58:05 +0200
commit19e75fd8838df668fb4b9af95b3a57874b1af32a (patch)
treebbaa04417becdb0a656f08cfd37e162d68873795 /libavcodec
parent2ee8a4f8873b9f7bb8ae7ed0ba40b45f27f634d4 (diff)
avcodec/nvenc: fix library names on cygwin
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/nvenc.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index d1c7d934a7..c92df532b6 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -21,24 +21,26 @@
#include "config.h"
-#if defined(_WIN32)
-#include <windows.h>
-
-#define CUDA_LIBNAME TEXT("nvcuda.dll")
-#if ARCH_X86_64
-#define NVENC_LIBNAME TEXT("nvEncodeAPI64.dll")
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define CUDA_LIBNAME "nvcuda.dll"
+# if ARCH_X86_64
+# define NVENC_LIBNAME "nvEncodeAPI64.dll"
+# else
+# define NVENC_LIBNAME "nvEncodeAPI.dll"
+# endif
#else
-#define NVENC_LIBNAME TEXT("nvEncodeAPI.dll")
+# define CUDA_LIBNAME "libcuda.so"
+# define NVENC_LIBNAME "libnvidia-encode.so"
#endif
-#define dlopen(filename, flags) LoadLibrary((filename))
+#if defined(_WIN32)
+#include <windows.h>
+
+#define dlopen(filename, flags) LoadLibrary(TEXT(filename))
#define dlsym(handle, symbol) GetProcAddress(handle, symbol)
#define dlclose(handle) FreeLibrary(handle)
#else
#include <dlfcn.h>
-
-#define CUDA_LIBNAME "libcuda.so"
-#define NVENC_LIBNAME "libnvidia-encode.so"
#endif
#include "libavutil/hwcontext.h"