mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 21:28:22 +01:00
Merge "windows exports: use dllexport attribute, instead of visibility." into main
This commit is contained in:
commit
661c1b6641
@ -135,7 +135,7 @@ if(WEBP_UNICODE)
|
||||
add_definitions(-DUNICODE -D_UNICODE)
|
||||
endif()
|
||||
|
||||
if(MSVC AND BUILD_SHARED_LIBS)
|
||||
if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
add_definitions(-DWEBP_DLL)
|
||||
endif()
|
||||
|
||||
@ -163,7 +163,9 @@ if(MSVC)
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "${webp_libname_prefix}")
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
endif()
|
||||
|
||||
if(WEBP_ENABLE_WUNUSED_RESULT)
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.21.0)
|
||||
|
@ -763,7 +763,8 @@ AC_CONFIG_FILES([Makefile src/Makefile man/Makefile \
|
||||
src/libwebp.pc src/libwebpdecoder.pc \
|
||||
src/demux/libwebpdemux.pc src/mux/libwebpmux.pc])
|
||||
|
||||
|
||||
dnl fix exports from MinGW builds
|
||||
AC_CONFIG_COMMANDS_POST([$SED -i 's/-DDLL_EXPORT/-DWEBP_DLL/' config.status])
|
||||
AC_OUTPUT
|
||||
|
||||
AC_MSG_NOTICE([
|
||||
|
@ -22,15 +22,13 @@ extern "C" {
|
||||
#else
|
||||
// This explicitly marks library functions and allows for changing the
|
||||
// signature for e.g., Windows DLL builds.
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#if defined(_WIN32) && defined(WEBP_DLL)
|
||||
#define SHARPYUV_EXTERN __declspec(dllexport)
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define SHARPYUV_EXTERN extern __attribute__((visibility("default")))
|
||||
#else
|
||||
#if defined(_MSC_VER) && defined(WEBP_DLL)
|
||||
#define SHARPYUV_EXTERN __declspec(dllexport)
|
||||
#else
|
||||
#define SHARPYUV_EXTERN extern
|
||||
#endif /* _MSC_VER && WEBP_DLL */
|
||||
#endif /* __GNUC__ >= 4 */
|
||||
#endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
||||
#endif /* WEBP_EXTERN */
|
||||
#endif /* SHARPYUV_EXTERN */
|
||||
|
||||
|
@ -56,15 +56,13 @@ typedef long long int int64_t;
|
||||
#ifndef WEBP_EXTERN
|
||||
// This explicitly marks library functions and allows for changing the
|
||||
// signature for e.g., Windows DLL builds.
|
||||
# if defined(__GNUC__) && __GNUC__ >= 4
|
||||
# if defined(_WIN32) && defined(WEBP_DLL)
|
||||
# define WEBP_EXTERN __declspec(dllexport)
|
||||
# elif defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define WEBP_EXTERN extern __attribute__ ((visibility ("default")))
|
||||
# else
|
||||
# if defined(_MSC_VER) && defined(WEBP_DLL)
|
||||
# define WEBP_EXTERN __declspec(dllexport)
|
||||
# else
|
||||
# define WEBP_EXTERN extern
|
||||
# endif
|
||||
# endif /* __GNUC__ >= 4 */
|
||||
# define WEBP_EXTERN extern
|
||||
# endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
||||
#endif /* WEBP_EXTERN */
|
||||
|
||||
// Macro to check ABI compatibility (same major revision number)
|
||||
|
Loading…
Reference in New Issue
Block a user