mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +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)
|
add_definitions(-DUNICODE -D_UNICODE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC AND BUILD_SHARED_LIBS)
|
if(WIN32 AND BUILD_SHARED_LIBS)
|
||||||
add_definitions(-DWEBP_DLL)
|
add_definitions(-DWEBP_DLL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -163,7 +163,9 @@ if(MSVC)
|
|||||||
set(CMAKE_STATIC_LIBRARY_PREFIX "${webp_libname_prefix}")
|
set(CMAKE_STATIC_LIBRARY_PREFIX "${webp_libname_prefix}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT WIN32)
|
||||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WEBP_ENABLE_WUNUSED_RESULT)
|
if(WEBP_ENABLE_WUNUSED_RESULT)
|
||||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.21.0)
|
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/libwebp.pc src/libwebpdecoder.pc \
|
||||||
src/demux/libwebpdemux.pc src/mux/libwebpmux.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_OUTPUT
|
||||||
|
|
||||||
AC_MSG_NOTICE([
|
AC_MSG_NOTICE([
|
||||||
|
@ -22,15 +22,13 @@ extern "C" {
|
|||||||
#else
|
#else
|
||||||
// This explicitly marks library functions and allows for changing the
|
// This explicitly marks library functions and allows for changing the
|
||||||
// signature for e.g., Windows DLL builds.
|
// 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")))
|
#define SHARPYUV_EXTERN extern __attribute__((visibility("default")))
|
||||||
#else
|
#else
|
||||||
#if defined(_MSC_VER) && defined(WEBP_DLL)
|
|
||||||
#define SHARPYUV_EXTERN __declspec(dllexport)
|
|
||||||
#else
|
|
||||||
#define SHARPYUV_EXTERN extern
|
#define SHARPYUV_EXTERN extern
|
||||||
#endif /* _MSC_VER && WEBP_DLL */
|
#endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
||||||
#endif /* __GNUC__ >= 4 */
|
|
||||||
#endif /* WEBP_EXTERN */
|
#endif /* WEBP_EXTERN */
|
||||||
#endif /* SHARPYUV_EXTERN */
|
#endif /* SHARPYUV_EXTERN */
|
||||||
|
|
||||||
|
@ -56,15 +56,13 @@ typedef long long int int64_t;
|
|||||||
#ifndef WEBP_EXTERN
|
#ifndef WEBP_EXTERN
|
||||||
// This explicitly marks library functions and allows for changing the
|
// This explicitly marks library functions and allows for changing the
|
||||||
// signature for e.g., Windows DLL builds.
|
// 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")))
|
# define WEBP_EXTERN extern __attribute__ ((visibility ("default")))
|
||||||
# else
|
# else
|
||||||
# if defined(_MSC_VER) && defined(WEBP_DLL)
|
# define WEBP_EXTERN extern
|
||||||
# define WEBP_EXTERN __declspec(dllexport)
|
# endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
||||||
# else
|
|
||||||
# define WEBP_EXTERN extern
|
|
||||||
# endif
|
|
||||||
# endif /* __GNUC__ >= 4 */
|
|
||||||
#endif /* WEBP_EXTERN */
|
#endif /* WEBP_EXTERN */
|
||||||
|
|
||||||
// Macro to check ABI compatibility (same major revision number)
|
// Macro to check ABI compatibility (same major revision number)
|
||||||
|
Loading…
Reference in New Issue
Block a user