mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
Fix exporting functions in library.
Rewrites definition of macro KVZ_PUBLIC in kvazaar.h so that KVZ_STATIC_LIB need not be defined when building a static library.
This commit is contained in:
parent
8427a85d36
commit
eb6fa3d980
|
@ -34,27 +34,31 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(KVZ_STATIC_LIB) && defined(PIC)
|
||||
#undef KVZ_STATIC_LIB
|
||||
#endif
|
||||
|
||||
#if defined(KVZ_STATIC_LIB)
|
||||
// Using or building kvazaar as a static library.
|
||||
#if defined(KVZ_DLL_EXPORTS)
|
||||
#if !defined(PIC)
|
||||
// Building static kvazaar library.
|
||||
#define KVZ_PUBLIC
|
||||
#elif defined(_WIN32) || defined(__CYGWIN__)
|
||||
#ifdef KVZ_DLL_EXPORTS
|
||||
// Building kvazaar on windows.
|
||||
// Building kvazaar DLL on Windows.
|
||||
#define KVZ_PUBLIC __declspec(dllexport)
|
||||
#else
|
||||
// Using kvazaar as a DLL on windows.
|
||||
#define KVZ_PUBLIC __declspec(dllimport)
|
||||
#endif
|
||||
#elif defined(__GNUC__)
|
||||
// Using GCC and not on windows.
|
||||
// Building kvazaar shared library with GCC.
|
||||
#define KVZ_PUBLIC __attribute__ ((visibility ("default")))
|
||||
#else
|
||||
#define KVZ_PUBLIC
|
||||
#endif
|
||||
#else
|
||||
#if defined(KVZ_STATIC_LIB)
|
||||
// Using static kvazaar library.
|
||||
#define KVZ_PUBLIC
|
||||
#elif defined(_WIN32) || defined(__CYGWIN__)
|
||||
// Using kvazaar DLL on Windows.
|
||||
#define KVZ_PUBLIC __declspec(dllimport)
|
||||
#else
|
||||
// Using kvazaar shared library and not on Windows.
|
||||
#define KVZ_PUBLIC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Maximum length of a GoP structure.
|
||||
|
|
Loading…
Reference in a new issue