Warning, /graphics/krita/3rdparty/ext_webp/0001-build.patch is written in an unsupported language. File is not indexed.
0001 diff --git a/CMakeLists.txt b/CMakeLists.txt 0002 index 43742c7f7..44b035ebb 100644 0003 --- a/CMakeLists.txt 0004 +++ b/CMakeLists.txt 0005 @@ -248,6 +248,9 @@ ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h") 0006 if(MSVC) 0007 # avoid security warnings for e.g., fopen() used in the examples. 0008 add_definitions(-D_CRT_SECURE_NO_WARNINGS) 0009 + if(BUILD_SHARED_LIBS) 0010 + add_definitions("-DWEBP_DLL") 0011 + endif() 0012 else() 0013 add_definitions(-Wall) 0014 endif() 0015 @@ -635,8 +638,12 @@ if(WEBP_BUILD_EXTRAS) 0016 # webp_quality 0017 add_executable(webp_quality ${WEBP_QUALITY_SRCS}) 0018 target_link_libraries(webp_quality exampleutil imagedec extras) 0019 + if(BUILD_SHARED_LIBS) 0020 + target_link_libraries(webp_quality webpdspdecode) 0021 + endif() 0022 target_include_directories(webp_quality 0023 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} 0024 + ${CMAKE_CURRENT_SOURCE_DIR}/src 0025 ${CMAKE_CURRENT_BINARY_DIR}) 0026 0027 # vwebp_sdl 0028 @@ -651,6 +658,10 @@ if(WEBP_BUILD_EXTRAS) 0029 ${SDL_INCLUDE_DIR}) 0030 set(WEBP_HAVE_SDL 1) 0031 target_compile_definitions(vwebp_sdl PUBLIC WEBP_HAVE_SDL) 0032 + if (MSVC) 0033 + target_link_libraries(vwebp_sdl dxguid winmm) 0034 + endif() 0035 + target_compile_definitions(vwebp_sdl PRIVATE WEBP_HAVE_JUST_SDL_H) 0036 endif() 0037 endif() 0038 0039 @@ -669,7 +680,7 @@ if(WEBP_BUILD_WEBP_JS) 0040 -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ 0041 -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") 0042 set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp) 0043 - target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) 0044 + target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) 0045 endif() 0046 0047 # WASM version 0048 diff --git a/src/webp/types.h b/src/webp/types.h 0049 index 47f7f2b00..a7a706590 100644 0050 --- a/src/webp/types.h 0051 +++ b/src/webp/types.h 0052 @@ -39,7 +39,9 @@ typedef long long int int64_t; 0053 #ifndef WEBP_EXTERN 0054 // This explicitly marks library functions and allows for changing the 0055 // signature for e.g., Windows DLL builds. 0056 -# if defined(__GNUC__) && __GNUC__ >= 4 0057 +# if defined(_MSC_VER) && defined(WEBP_DLL) 0058 +# define WEBP_EXTERN extern __declspec(dllexport) 0059 +# elif defined(__GNUC__) && __GNUC__ >= 4 0060 # define WEBP_EXTERN extern __attribute__ ((visibility ("default"))) 0061 # else 0062 # define WEBP_EXTERN extern