diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri index ed77a4c490..25be5aefa7 100644 --- a/bindings/qt/sdk.pri +++ b/bindings/qt/sdk.pri @@ -13,6 +13,9 @@ debug:DEBUG_SUFFIX = "d" else:DEBUG_SUFFIX = "" debug:DASH_DEBUG_SUFFIX = "-d" else:DASH_DEBUG_SUFFIX = "" +debug:UNDERSCORE_DEBUG_SUFFIX = "_d" +else:UNDERSCORE_DEBUG_SUFFIX = "" + debug:win32:DEBUG_SUFFIX_WO = "d" else:DEBUG_SUFFIX_WO = "" @@ -499,7 +502,17 @@ else { LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libfreeimage.a } else { - LIBS += -lfreeimage + vcpkg:LIBS += -lfreeimage$$DEBUG_SUFFIX + !vcpkg:LIBS += -lfreeimage + } + + vcpkg { + LIBS += -ljpeg$$DEBUG_SUFFIX -ltiff$$DEBUG_SUFFIX -llibpng16$$DEBUG_SUFFIX \ + -lIlmImf-2_3$$UNDERSCORE_DEBUG_SUFFIX -lIex-2_3$$UNDERSCORE_DEBUG_SUFFIX -lIlmThread-2_3$$UNDERSCORE_DEBUG_SUFFIX \ + -lIexMath-2_3$$UNDERSCORE_DEBUG_SUFFIX -lIlmImfUtil-2_3$$UNDERSCORE_DEBUG_SUFFIX -lImath-2_3$$UNDERSCORE_DEBUG_SUFFIX \ + -llibwebpmux$$DEBUG_SUFFIX -lwebpdecoder$$DEBUG_SUFFIX -lwebpdemux$$DEBUG_SUFFIX -lwebp$$DEBUG_SUFFIX \ + -ljpegxr$$DEBUG_SUFFIX -ljxrglue$$DEBUG_SUFFIX -lHalf-2_3$$UNDERSCORE_DEBUG_SUFFIX \ + -llzma$$DEBUG_SUFFIX -ljasper$$DEBUG_SUFFIX -lraw$$DEBUG_SUFFIX -lopenjp2 } } } diff --git a/contrib/cmake/preferred-ports.txt b/contrib/cmake/preferred-ports.txt index 09c593fc9c..0eec6e3ae2 100644 --- a/contrib/cmake/preferred-ports.txt +++ b/contrib/cmake/preferred-ports.txt @@ -34,3 +34,11 @@ x264/157-3034848280-7 zlib/1.2.11-5 opengl/0.0-5 freeglut/3.0.0-9 +freeimage/3.18.0-8 +libpng/1.6.37-6 +tiff/4.0.10-8 +libwebp/1.0.2-8 +giflib/5.1.4-3 +jxrlib/2019.10.9 +openexr/2.3.0-5 +sdl1/1.2.15-12 diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/CMakeLists.txt b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/CMakeLists.txt new file mode 100644 index 0000000000..f8fd969297 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/CMakeLists.txt @@ -0,0 +1,154 @@ +cmake_minimum_required(VERSION 3.4) + +include(GNUInstallDirs) + +project(FreeImage C CXX) + +if(MSVC) + add_definitions("-D_CRT_SECURE_NO_WARNINGS") + set(CMAKE_CXX_FLAGS "/wd4828 ${CMAKE_CXX_FLAGS}") +endif() + +if(BUILD_SHARED_LIBS) + add_definitions("-DOPENEXR_DLL") +endif() + +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(TIFF REQUIRED) +find_package(OpenJPEG REQUIRED) +find_package(WebP REQUIRED) +find_package(JXR REQUIRED) +find_package(LibRaw REQUIRED) +find_package(OpenEXR REQUIRED) + +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(INSTALL_HEADERS "Install the development headers" ON) + +set(REAL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source) + +# Add a debug postfix +set(CMAKE_DEBUG_POSTFIX "d") + +# List the public header files +set(PUBLIC_HEADERS ${REAL_SOURCE_DIR}/FreeImage.h) + +# List the private header files +set(ROOT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/CacheFile.h + ${REAL_SOURCE_DIR}/FreeImageIO.h + ${REAL_SOURCE_DIR}/MapIntrospector.h + ${REAL_SOURCE_DIR}/Plugin.h + ${REAL_SOURCE_DIR}/Quantizers.h + ${REAL_SOURCE_DIR}/ToneMapping.h + ${REAL_SOURCE_DIR}/Utilities.h) + +file(GLOB FREEIMAGE_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImage/*.h) +file(GLOB FREEIMAGE_TOOLKIT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.h) +file(GLOB METADATA_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/Metadata/*.h) + +set(PRIVATE_HEADERS ${ROOT_PRIVATE_HEADERS} + ${FREEIMAGE_PRIVATE_HEADERS} + ${FREEIMAGE_TOOLKIT_PRIVATE_HEADERS} + ${METADATA_PRIVATE_HEADERS}) + +# List the source files +file(GLOB DEPRECATION_SRCS ${REAL_SOURCE_DIR}/DeprecationManager/*.cpp) +file(GLOB FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.cpp) +file(GLOB FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/*.cpp) +file(GLOB METADATA_SRCS ${REAL_SOURCE_DIR}/Metadata/*.cpp) + +# The G3 plugin is disabled because it require the private copy of tiff +list(REMOVE_ITEM FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/PluginG3.cpp) + +# The JPEGTransform plugin is disable because it requires a private copy of jpeg +list(REMOVE_ITEM FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/JPEGTransform.cpp) + + +set(SRCS ${DEPRECATION_SRCS} + ${FREEIMAGE_SRCS} + ${FREEIMAGE_TOOLKIT_SRCS} + ${METADATA_SRCS} +) + +# If FreeImage is used as a static library, FREEIMAGE_LIB +# needs to be defined (at the C preprocessor level) to correctly +# define (to nothing instead of _declspec(dllimport) ) the DLL_API macro. +# For this purpouse we include (depending on the BUILD_SHARED_LIBS ) +# the appropriate FreeImageConfig.h . +if(BUILD_SHARED_LIBS) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +endif() +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) + +add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS) +else() + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImage PRIVATE ${REAL_SOURCE_DIR} + ${ZLIB_INCLUDE_DIRS} + ${JPEG_INCLUDE_DIRS} + ${TIFF_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${OPENJPEG_INCLUDE_DIRS} + ${WEBP_INCLUDE_DIRS} + ${JXR_INCLUDE_DIRS} + ${LibRaw_INCLUDE_DIRS} + ${OpenEXR_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR}) + + +target_link_libraries(FreeImage ${ZLIB_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} + ${PNG_LIBRARIES} + ${OPENJPEG_LIBRARIES} + ${WEBP_LIBRARIES} + ${JXR_LIBRARIES} + ${LibRaw_LIBRARIES} + ${OpenEXR_LIBRARIES}) + +target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS}) + +# FreeImagePlus +file(GLOB FREEIMAGEPLUS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/src/*.cpp) +add_library(FreeImagePlus + ${FREEIMAGEPLUS_SOURCES} + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS) +else() + target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImagePlus PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus + ${CMAKE_CURRENT_BINARY_DIR} + ${REAL_SOURCE_DIR}) + +target_link_libraries(FreeImagePlus PUBLIC FreeImage) + +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h) + +install(TARGETS FreeImage + COMPONENT runtime + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) + +install(TARGETS FreeImagePlus + COMPONENT runtime-cpp + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) + +if(INSTALL_HEADERS) + install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif() diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/CONTROL b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/CONTROL new file mode 100644 index 0000000000..53e641a789 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/CONTROL @@ -0,0 +1,5 @@ +Source: freeimage +Version: 3.18.0-8 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[all] (!uwp), libraw, jxrlib, openexr +Homepage: https://sourceforge.net/projects/freeimage/ +Description: Support library for graphics image formats diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/FreeImageConfig-dynamic.h b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/FreeImageConfig-dynamic.h new file mode 100644 index 0000000000..41dcf57d97 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/FreeImageConfig-dynamic.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#undef FREEIMAGE_LIB + +#endif diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/FreeImageConfig-static.h b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/FreeImageConfig-static.h new file mode 100644 index 0000000000..ed723490ee --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/FreeImageConfig-static.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#define FREEIMAGE_LIB + +#endif diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/disable-plugins-depending-on-internal-third-party-libraries.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/disable-plugins-depending-on-internal-third-party-libraries.patch new file mode 100644 index 0000000000..28d0e3a42b --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/disable-plugins-depending-on-internal-third-party-libraries.patch @@ -0,0 +1,71 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index e2d1c5a..cc66b7d 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -410,7 +410,11 @@ FI_ENUM(FREE_IMAGE_FORMAT) { + FIF_DDS = 24, + FIF_GIF = 25, + FIF_HDR = 26, +- FIF_FAXG3 = 27, ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of ++ FreeImage, since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ FIF_FAXG3 = 27, ++#endif + FIF_SGI = 28, + FIF_EXR = 29, + FIF_J2K = 30, +@@ -476,6 +480,9 @@ FI_ENUM(FREE_IMAGE_DITHER) { + /** Lossless JPEG transformations + Constants used in FreeImage_JPEGTransform + */ ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_NONE = 0, //! no transformation + FIJPEG_OP_FLIP_H = 1, //! horizontal flip +@@ -486,6 +493,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation + FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw) + }; ++#endif + + /** Tone mapping operators. + Constants used in FreeImage_ToneMapping. +@@ -1077,6 +1085,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, + // JPEG lossless transformation routines + // -------------------------------------------------------------------------- + ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); +@@ -1085,7 +1096,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); +- ++#endif + + // -------------------------------------------------------------------------- + // Image manipulation toolkit +diff --git a/Source/FreeImage/Plugin.cpp b/Source/FreeImage/Plugin.cpp +index 57ebffd..a93440f 100644 +--- a/Source/FreeImage/Plugin.cpp ++++ b/Source/FreeImage/Plugin.cpp +@@ -263,7 +263,11 @@ FreeImage_Initialise(BOOL load_local_plugins_only) { + s_plugins->AddNode(InitDDS); + s_plugins->AddNode(InitGIF); + s_plugins->AddNode(InitHDR); +- s_plugins->AddNode(InitG3); ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of FreeImage +++ since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ s_plugins->AddNode(InitG3); ++#endif + s_plugins->AddNode(InitSGI); + s_plugins->AddNode(InitEXR); + s_plugins->AddNode(InitJ2K); diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/fix-function-overload.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/fix-function-overload.patch new file mode 100644 index 0000000000..adb1164f6d --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/fix-function-overload.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 8db177d..efa2c4e 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) { + return FALSE. You might want to issue an error message instead. + */ + static BOOL +-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { ++jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { + jpeg_saved_marker_ptr marker; + int num_markers = 0; + int seq_no; +@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) { + BYTE *icc_profile = NULL; + unsigned icc_length = 0; + +- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) { ++ if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) { + // copy ICC profile data + FreeImage_CreateICCProfile(dib, icc_profile, icc_length); + // clean up +@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) { + Write JPEG_APP2 marker (ICC profile) + */ + static BOOL +-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) { ++jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) { + // marker identifying string "ICC_PROFILE" (null-terminated) + BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 }; + +@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) { + jpeg_write_comment(cinfo, dib); + + // write ICC profile +- jpeg_write_icc_profile(cinfo, dib); ++ jpeg_write_icc_profile_(cinfo, dib); + + // write IPTC profile + jpeg_write_iptc_profile(cinfo, dib); diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/CMakeLists.txt b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/CMakeLists.txt new file mode 100644 index 0000000000..7ee47c8878 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/CMakeLists.txt @@ -0,0 +1,153 @@ +cmake_minimum_required(VERSION 3.4) + +include(GNUInstallDirs) + +project(FreeImage C CXX) + +if(MSVC) + add_definitions("-D_CRT_SECURE_NO_WARNINGS") + set(CMAKE_CXX_FLAGS "/wd4828 ${CMAKE_CXX_FLAGS}") +endif() + +#~ if(BUILD_SHARED_LIBS) + #~ add_definitions("-DOPENEXR_DLL") +#~ endif() + +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(TIFF REQUIRED) +find_package(OpenJPEG REQUIRED) +find_package(WebP REQUIRED) +find_package(JXR REQUIRED) +find_package(LibRaw REQUIRED) +#find_package(OpenEXR REQUIRED) + +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(INSTALL_HEADERS "Install the development headers" ON) + +set(REAL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source) + +# Add a debug postfix +set(CMAKE_DEBUG_POSTFIX "d") + +# List the public header files +set(PUBLIC_HEADERS ${REAL_SOURCE_DIR}/FreeImage.h) + +# List the private header files +set(ROOT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/CacheFile.h + ${REAL_SOURCE_DIR}/FreeImageIO.h + ${REAL_SOURCE_DIR}/MapIntrospector.h + ${REAL_SOURCE_DIR}/Plugin.h + ${REAL_SOURCE_DIR}/Quantizers.h + ${REAL_SOURCE_DIR}/ToneMapping.h + ${REAL_SOURCE_DIR}/Utilities.h) + +file(GLOB FREEIMAGE_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImage/*.h) +file(GLOB FREEIMAGE_TOOLKIT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.h) +file(GLOB METADATA_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/Metadata/*.h) + +set(PRIVATE_HEADERS ${ROOT_PRIVATE_HEADERS} + ${FREEIMAGE_PRIVATE_HEADERS} + ${FREEIMAGE_TOOLKIT_PRIVATE_HEADERS} + ${METADATA_PRIVATE_HEADERS}) + +# List the source files +file(GLOB DEPRECATION_SRCS ${REAL_SOURCE_DIR}/DeprecationManager/*.cpp) +file(GLOB FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.cpp) +file(GLOB FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/*.cpp) +file(GLOB METADATA_SRCS ${REAL_SOURCE_DIR}/Metadata/*.cpp) + +# The G3 plugin is disabled because it require the private copy of tiff +list(REMOVE_ITEM FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/PluginG3.cpp) + +# The JPEGTransform plugin is disable because it requires a private copy of jpeg +list(REMOVE_ITEM FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/JPEGTransform.cpp) + + +set(SRCS ${DEPRECATION_SRCS} + ${FREEIMAGE_SRCS} + ${FREEIMAGE_TOOLKIT_SRCS} + ${METADATA_SRCS} +) + +# If FreeImage is used as a static library, FREEIMAGE_LIB +# needs to be defined (at the C preprocessor level) to correctly +# define (to nothing instead of _declspec(dllimport) ) the DLL_API macro. +# For this purpouse we include (depending on the BUILD_SHARED_LIBS ) +# the appropriate FreeImageConfig.h . +if(BUILD_SHARED_LIBS) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +endif() +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) + +add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS) +else() + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImage PRIVATE ${REAL_SOURCE_DIR} + ${ZLIB_INCLUDE_DIRS} + ${JPEG_INCLUDE_DIRS} + ${TIFF_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${OPENJPEG_INCLUDE_DIRS} + ${WEBP_INCLUDE_DIRS} + ${JXR_INCLUDE_DIRS} + ${LibRaw_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR}) + + +target_link_libraries(FreeImage ${ZLIB_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} + ${PNG_LIBRARIES} + ${OPENJPEG_LIBRARIES} + ${WEBP_LIBRARIES} + ${JXR_LIBRARIES} + ${LibRaw_LIBRARIES} + ) + +target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS}) + +# FreeImagePlus +file(GLOB FREEIMAGEPLUS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/src/*.cpp) +add_library(FreeImagePlus + ${FREEIMAGEPLUS_SOURCES} + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS) +else() + target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImagePlus PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus + ${CMAKE_CURRENT_BINARY_DIR} + ${REAL_SOURCE_DIR}) + +target_link_libraries(FreeImagePlus PUBLIC FreeImage) + +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h) + +install(TARGETS FreeImage + COMPONENT runtime + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) + +install(TARGETS FreeImagePlus + COMPONENT runtime-cpp + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) + +if(INSTALL_HEADERS) + install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif() diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/CONTROL b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/CONTROL new file mode 100644 index 0000000000..c62acf7f74 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/CONTROL @@ -0,0 +1,5 @@ +Source: freeimage +Version: 3.18.0-8 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp[all] (!uwp), libraw, jxrlib +Homepage: https://sourceforge.net/projects/freeimage/ +Description: Support library for graphics image formats diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/FreeImageConfig-dynamic.h b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/FreeImageConfig-dynamic.h new file mode 100644 index 0000000000..41dcf57d97 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/FreeImageConfig-dynamic.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#undef FREEIMAGE_LIB + +#endif diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/FreeImageConfig-static.h b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/FreeImageConfig-static.h new file mode 100644 index 0000000000..ed723490ee --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/FreeImageConfig-static.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#define FREEIMAGE_LIB + +#endif diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/disable-plugins-depending-on-internal-third-party-libraries.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/disable-plugins-depending-on-internal-third-party-libraries.patch new file mode 100644 index 0000000000..28d0e3a42b --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/disable-plugins-depending-on-internal-third-party-libraries.patch @@ -0,0 +1,71 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index e2d1c5a..cc66b7d 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -410,7 +410,11 @@ FI_ENUM(FREE_IMAGE_FORMAT) { + FIF_DDS = 24, + FIF_GIF = 25, + FIF_HDR = 26, +- FIF_FAXG3 = 27, ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of ++ FreeImage, since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ FIF_FAXG3 = 27, ++#endif + FIF_SGI = 28, + FIF_EXR = 29, + FIF_J2K = 30, +@@ -476,6 +480,9 @@ FI_ENUM(FREE_IMAGE_DITHER) { + /** Lossless JPEG transformations + Constants used in FreeImage_JPEGTransform + */ ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_NONE = 0, //! no transformation + FIJPEG_OP_FLIP_H = 1, //! horizontal flip +@@ -486,6 +493,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation + FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw) + }; ++#endif + + /** Tone mapping operators. + Constants used in FreeImage_ToneMapping. +@@ -1077,6 +1085,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, + // JPEG lossless transformation routines + // -------------------------------------------------------------------------- + ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); +@@ -1085,7 +1096,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); +- ++#endif + + // -------------------------------------------------------------------------- + // Image manipulation toolkit +diff --git a/Source/FreeImage/Plugin.cpp b/Source/FreeImage/Plugin.cpp +index 57ebffd..a93440f 100644 +--- a/Source/FreeImage/Plugin.cpp ++++ b/Source/FreeImage/Plugin.cpp +@@ -263,7 +263,11 @@ FreeImage_Initialise(BOOL load_local_plugins_only) { + s_plugins->AddNode(InitDDS); + s_plugins->AddNode(InitGIF); + s_plugins->AddNode(InitHDR); +- s_plugins->AddNode(InitG3); ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of FreeImage +++ since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ s_plugins->AddNode(InitG3); ++#endif + s_plugins->AddNode(InitSGI); + s_plugins->AddNode(InitEXR); + s_plugins->AddNode(InitJ2K); diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/fix-function-overload.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/fix-function-overload.patch new file mode 100644 index 0000000000..adb1164f6d --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/fix-function-overload.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 8db177d..efa2c4e 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) { + return FALSE. You might want to issue an error message instead. + */ + static BOOL +-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { ++jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { + jpeg_saved_marker_ptr marker; + int num_markers = 0; + int seq_no; +@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) { + BYTE *icc_profile = NULL; + unsigned icc_length = 0; + +- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) { ++ if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) { + // copy ICC profile data + FreeImage_CreateICCProfile(dib, icc_profile, icc_length); + // clean up +@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) { + Write JPEG_APP2 marker (ICC profile) + */ + static BOOL +-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) { ++jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) { + // marker identifying string "ICC_PROFILE" (null-terminated) + BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 }; + +@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) { + jpeg_write_comment(cinfo, dib); + + // write ICC profile +- jpeg_write_icc_profile(cinfo, dib); ++ jpeg_write_icc_profile_(cinfo, dib); + + // write IPTC profile + jpeg_write_iptc_profile(cinfo, dib); diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/portfile.cmake new file mode 100644 index 0000000000..1fcbbb1109 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/portfile.cmake @@ -0,0 +1,57 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip" + FILENAME "FreeImage3180.zip" + SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/disable-plugins-depending-on-internal-third-party-libraries.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-jpeg.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-jxrlib.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-libtiff.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-openjpeg.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-png-zlib.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-rawlib.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-function-overload.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-typedef-as-already-declared.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-static.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-dynamic.h DESTINATION ${SOURCE_PATH}) + +# This is not strictly necessary, but to make sure +# that no "internal" libraries are used we remove them +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJPEG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibPNG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibTIFF4) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/ZLib) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibOpenJPEG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJXR) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibWebP) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibRawLite) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/OpenEXR) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVCPKG_ROOT_DIR=${VCPKG_ROOT_DIR} + -DTARGET_TRIPLET=${TARGET_TRIPLET} + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/license-fi.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-jpeg.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-jpeg.patch new file mode 100644 index 0000000000..2df2c9d2d4 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-jpeg.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 573989c..aaeefa4 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -35,9 +35,9 @@ extern "C" { + #undef FAR + #include + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" ++#include ++#include ++#include + } + + #include "FreeImage.h" diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-jxrlib.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-jxrlib.patch new file mode 100644 index 0000000000..d86a18e824 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-jxrlib.patch @@ -0,0 +1,14 @@ +diff --git a/Source/FreeImage/PluginJXR.cpp b/Source/FreeImage/PluginJXR.cpp +index 0e14e09..8eb9d5d 100644 +--- a/Source/FreeImage/PluginJXR.cpp ++++ b/Source/FreeImage/PluginJXR.cpp +@@ -23,7 +23,8 @@ + #include "Utilities.h" + #include "../Metadata/FreeImageTag.h" + +-#include "../LibJXR/jxrgluelib/JXRGlue.h" ++#define INITGUID ++#include + + // ========================================================== + // Plugin Interface diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-libtiff.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-libtiff.patch new file mode 100644 index 0000000000..23d5dfd1d0 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-libtiff.patch @@ -0,0 +1,204 @@ +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 5068d94..8947b03 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -37,9 +37,9 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibTIFF4/tiffiop.h" ++#include + #include "../Metadata/FreeImageTag.h" + #include "../OpenEXR/Half/half.h" + + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -199,15 +199,18 @@ Open a TIFF file for reading or writing + @param name + @param mode + */ ++/* + TIFF* + TIFFOpen(const char* name, const char* mode) { + return 0; + } ++*/ + + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- + ++/* + void* + _TIFFmalloc(tmsize_t s) { + return malloc(s); +@@ -245,6 +248,7 @@ int + _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) { + return (memcmp(p1, p2, (size_t) c)); + } ++*/ + + // ---------------------------------------------------------- + // in FreeImage warnings and errors are disabled + +diff --git a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp +index d5be902..8dbcd5d 100644 +--- a/Source/Metadata/XTIFF.cpp ++++ b/Source/Metadata/XTIFF.cpp +@@ -29,7 +29,7 @@ + #pragma warning (disable : 4786) // identifier was truncated to 'number' characters + #endif + +-#include "../LibTIFF4/tiffiop.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" +@@ -40,6 +40,43 @@ + // Extended TIFF Directory GEO Tag Support + // ---------------------------------------------------------- + ++// vcpkg: function imported from libtiff/tif_dirinfo.c, in which it is not exported ++/* ++ * Return size of TIFFDataType in bytes. ++ * ++ * XXX: We need a separate function to determine the space needed ++ * to store the value. For TIFF_RATIONAL values TIFFDataWidth() returns 8, ++ * but we use 4-byte float to represent rationals. ++ */ ++int ++FreeImage_TIFFDataSize(TIFFDataType type) ++{ ++ switch (type) ++ { ++ case TIFF_BYTE: ++ case TIFF_SBYTE: ++ case TIFF_ASCII: ++ case TIFF_UNDEFINED: ++ return 1; ++ case TIFF_SHORT: ++ case TIFF_SSHORT: ++ return 2; ++ case TIFF_LONG: ++ case TIFF_SLONG: ++ case TIFF_FLOAT: ++ case TIFF_IFD: ++ case TIFF_RATIONAL: ++ case TIFF_SRATIONAL: ++ return 4; ++ case TIFF_DOUBLE: ++ case TIFF_LONG8: ++ case TIFF_SLONG8: ++ case TIFF_IFD8: ++ return 8; ++ default: ++ return 0; ++ } ++} + /** + Tiff info structure. + Entry format: +@@ -224,6 +261,33 @@ tiff_write_geotiff_profile(TIFF *tif, FIBITMAP *dib) { + // TIFF EXIF tag reading & writing + // ---------------------------------------------------------- + ++static uint32 exif_tag_ids[] = { ++ EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM, ++ EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF, ++ EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED, ++ EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL, ++ EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE, ++ EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE, ++ EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE, ++ EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH, ++ EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT, ++ EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL, ++ EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE, ++ EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION, ++ EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY, ++ EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION, ++ EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT, ++ EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD, ++ EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN, ++ EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE, ++ EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM, ++ EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST, ++ EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION, ++ EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL, ++ EXIFTAG_IMAGEUNIQUEID ++}; ++static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]); ++ + /** + Read a single Exif tag + +@@ -575,43 +639,10 @@ tiff_read_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + // loop over all Core Directory Tags + // ### uses private data, but there is no other way ++ // -> vcpkg: Best we can do without private headers is to hard-code a list of known EXIF tags and read those + if(md_model == TagLib::EXIF_MAIN) { +- const TIFFDirectory *td = &tif->tif_dir; +- +- uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo) +- +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); +- +- if(tag_id == lastTag) { +- continue; +- } +- +- // test if tag value is set +- // (lifted directly from LibTiff _TIFFWriteDirectory) +- +- if( fld->field_bit == FIELD_CUSTOM ) { +- int is_set = FALSE; +- +- for(int ci = 0; ci < td->td_customValueCount; ci++ ) { +- is_set |= (td->td_customValues[ci].info == fld); +- } +- +- if( !is_set ) { +- continue; +- } +- +- } else if(!TIFFFieldSet(tif, fld->field_bit)) { +- continue; +- } +- +- // process *all* other tags (some will be ignored) +- +- tiff_read_exif_tag(tif, tag_id, dib, md_model); +- +- lastTag = tag_id; ++ for (int i = 0; i < nExifTags; ++i) { ++ tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model); + } + + } +@@ -723,10 +754,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + TagLib& tag_lib = TagLib::instance(); + +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); ++ for (int fi = 0, nfi = nExifTags; nfi > 0; nfi--, fi++) { ++ const uint32 tag_id = exif_tag_ids[fi]; ++ const TIFFField *fld = TIFFFieldWithTag(tif, tag_id); + + if(skip_write_field(tif, tag_id)) { + // skip tags that are already handled by the LibTIFF writing process +@@ -749,7 +779,7 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + continue; + } + // type of storage may differ (e.g. rationnal array vs float array type) +- if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { ++ if((unsigned)FreeImage_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { + // skip tag or _TIFFmemcpy will fail + continue; + } diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-openexr.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-openexr.patch new file mode 100644 index 0000000000..08915da726 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-openexr.patch @@ -0,0 +1,44 @@ +diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp +index b286430..82b3b72 100644 +--- a/Source/FreeImage/PluginEXR.cpp ++++ b/Source/FreeImage/PluginEXR.cpp +@@ -28,16 +28,16 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include "../OpenEXR/IlmImf/ImfIO.h" +-#include "../OpenEXR/Iex/Iex.h" +-#include "../OpenEXR/IlmImf/ImfOutputFile.h" +-#include "../OpenEXR/IlmImf/ImfInputFile.h" +-#include "../OpenEXR/IlmImf/ImfRgbaFile.h" +-#include "../OpenEXR/IlmImf/ImfChannelList.h" +-#include "../OpenEXR/IlmImf/ImfRgba.h" +-#include "../OpenEXR/IlmImf/ImfArray.h" +-#include "../OpenEXR/IlmImf/ImfPreviewImage.h" +-#include "../OpenEXR/Half/half.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + + // ========================================================== +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 562fdd7..ce12649 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -39,7 +39,7 @@ + #include "Utilities.h" + #include + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-openjpeg.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-openjpeg.patch new file mode 100644 index 0000000000..fa4f8e7b6e --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-openjpeg.patch @@ -0,0 +1,39 @@ +diff --git a/Source/FreeImage/J2KHelper.cpp b/Source/FreeImage/J2KHelper.cpp +index 1776c3b..538f1c5 100644 +--- a/Source/FreeImage/J2KHelper.cpp ++++ b/Source/FreeImage/J2KHelper.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // -------------------------------------------------------------------------- +diff --git a/Source/FreeImage/PluginJ2K.cpp b/Source/FreeImage/PluginJ2K.cpp +index b8bcfc8..621a903 100644 +--- a/Source/FreeImage/PluginJ2K.cpp ++++ b/Source/FreeImage/PluginJ2K.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== +diff --git a/Source/FreeImage/PluginJP2.cpp b/Source/FreeImage/PluginJP2.cpp +index 742fe2c..c57f626 100644 +--- a/Source/FreeImage/PluginJP2.cpp ++++ b/Source/FreeImage/PluginJP2.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-png-zlib.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-png-zlib.patch new file mode 100644 index 0000000000..fc7837e434 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-png-zlib.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginPNG.cpp b/Source/FreeImage/PluginPNG.cpp +index ba2ef17..c3c5cd6 100644 +--- a/Source/FreeImage/PluginPNG.cpp ++++ b/Source/FreeImage/PluginPNG.cpp +@@ -40,8 +40,8 @@ + + // ---------------------------------------------------------- + +-#include "../ZLib/zlib.h" +-#include "../LibPNG/png.h" ++#include ++#include + + // ---------------------------------------------------------- + +diff --git a/Source/FreeImage/ZLibInterface.cpp b/Source/FreeImage/ZLibInterface.cpp +index 3ab6d32..725618b 100644 +--- a/Source/FreeImage/ZLibInterface.cpp ++++ b/Source/FreeImage/ZLibInterface.cpp +@@ -19,10 +19,9 @@ + // Use at your own risk! + // ========================================================== + +-#include "../ZLib/zlib.h" ++#include + #include "FreeImage.h" + #include "Utilities.h" +-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ + + /** + Compresses a source buffer into a target buffer, using the ZLib library. +@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_s + return 0; + case Z_OK: { + // patch header, setup crc and length (stolen from mod_trace_output) +- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code ++ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code + crc = crc32(crc, source, source_size); + memcpy(target + 4 + dest_len, &crc, 4); + memcpy(target + 8 + dest_len, &source_size, 4); diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-rawlib.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-rawlib.patch new file mode 100644 index 0000000000..6afa0bffa2 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-rawlib.patch @@ -0,0 +1,13 @@ +diff --git a/Source/FreeImage/PluginRAW.cpp b/Source/FreeImage/PluginRAW.cpp +index e9bd5bf..c7f8758 100644 +--- a/Source/FreeImage/PluginRAW.cpp ++++ b/Source/FreeImage/PluginRAW.cpp +@@ -19,7 +19,7 @@ + // Use at your own risk! + // ========================================================== + +-#include "../LibRawLite/libraw/libraw.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-webp.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-webp.patch new file mode 100644 index 0000000000..4d1757c395 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-external-webp.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginWebP.cpp b/Source/FreeImage/PluginWebP.cpp +index 7c9f62f..c401447 100644 +--- a/Source/FreeImage/PluginWebP.cpp ++++ b/Source/FreeImage/PluginWebP.cpp +@@ -24,9 +24,9 @@ + + #include "../Metadata/FreeImageTag.h" + +-#include "../LibWebP/src/webp/decode.h" +-#include "../LibWebP/src/webp/encode.h" +-#include "../LibWebP/src/webp/mux.h" ++#include ++#include ++#include + + // ========================================================== + // Plugin Interface diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-freeimage-config-include.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-freeimage-config-include.patch new file mode 100644 index 0000000000..579f08845e --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-freeimage-config-include.patch @@ -0,0 +1,16 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 12182cd..86a1e68 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -32,6 +32,11 @@ + #define FREEIMAGE_MINOR_VERSION 18 + #define FREEIMAGE_RELEASE_SERIAL 0 + ++// vcpkg specific includes -------------------------------------------------- ++// Include FreeImageConfig.h to define FREEIMAGE_LIB in static builds, ++// or do not define it in dynamic builds ++#include "FreeImageConfig.h" ++ + // Compiler options --------------------------------------------------------- + + #include // needed for UNICODE functions diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-typedef-as-already-declared.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-typedef-as-already-declared.patch new file mode 100644 index 0000000000..80d367bcb5 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/mod/use-typedef-as-already-declared.patch @@ -0,0 +1,15 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 1fd9c2f..59de277 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -160,8 +160,8 @@ typedef uint8_t BYTE; + typedef uint16_t WORD; + typedef uint32_t DWORD; + typedef int32_t LONG; +-typedef int64_t INT64; +-typedef uint64_t UINT64; ++typedef long long int INT64; ++typedef long long unsigned int UINT64; + #else + // MS is not C99 ISO compliant + typedef long BOOL; diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/portfile.cmake new file mode 100644 index 0000000000..1fcbbb1109 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/portfile.cmake @@ -0,0 +1,57 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip" + FILENAME "FreeImage3180.zip" + SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/disable-plugins-depending-on-internal-third-party-libraries.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-jpeg.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-jxrlib.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-libtiff.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-openjpeg.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-png-zlib.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-rawlib.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-webp.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-external-openexr.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-freeimage-config-include.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-function-overload.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-typedef-as-already-declared.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-static.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-dynamic.h DESTINATION ${SOURCE_PATH}) + +# This is not strictly necessary, but to make sure +# that no "internal" libraries are used we remove them +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJPEG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibPNG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibTIFF4) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/ZLib) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibOpenJPEG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJXR) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibWebP) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibRawLite) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/OpenEXR) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVCPKG_ROOT_DIR=${VCPKG_ROOT_DIR} + -DTARGET_TRIPLET=${TARGET_TRIPLET} + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/license-fi.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-jpeg.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-jpeg.patch new file mode 100644 index 0000000000..2df2c9d2d4 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-jpeg.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 573989c..aaeefa4 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -35,9 +35,9 @@ extern "C" { + #undef FAR + #include + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" ++#include ++#include ++#include + } + + #include "FreeImage.h" diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-jxrlib.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-jxrlib.patch new file mode 100644 index 0000000000..d86a18e824 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-jxrlib.patch @@ -0,0 +1,14 @@ +diff --git a/Source/FreeImage/PluginJXR.cpp b/Source/FreeImage/PluginJXR.cpp +index 0e14e09..8eb9d5d 100644 +--- a/Source/FreeImage/PluginJXR.cpp ++++ b/Source/FreeImage/PluginJXR.cpp +@@ -23,7 +23,8 @@ + #include "Utilities.h" + #include "../Metadata/FreeImageTag.h" + +-#include "../LibJXR/jxrgluelib/JXRGlue.h" ++#define INITGUID ++#include + + // ========================================================== + // Plugin Interface diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-libtiff.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-libtiff.patch new file mode 100644 index 0000000000..23d5dfd1d0 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-libtiff.patch @@ -0,0 +1,204 @@ +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 5068d94..8947b03 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -37,9 +37,9 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibTIFF4/tiffiop.h" ++#include + #include "../Metadata/FreeImageTag.h" + #include "../OpenEXR/Half/half.h" + + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -199,15 +199,18 @@ Open a TIFF file for reading or writing + @param name + @param mode + */ ++/* + TIFF* + TIFFOpen(const char* name, const char* mode) { + return 0; + } ++*/ + + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- + ++/* + void* + _TIFFmalloc(tmsize_t s) { + return malloc(s); +@@ -245,6 +248,7 @@ int + _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) { + return (memcmp(p1, p2, (size_t) c)); + } ++*/ + + // ---------------------------------------------------------- + // in FreeImage warnings and errors are disabled + +diff --git a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp +index d5be902..8dbcd5d 100644 +--- a/Source/Metadata/XTIFF.cpp ++++ b/Source/Metadata/XTIFF.cpp +@@ -29,7 +29,7 @@ + #pragma warning (disable : 4786) // identifier was truncated to 'number' characters + #endif + +-#include "../LibTIFF4/tiffiop.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" +@@ -40,6 +40,43 @@ + // Extended TIFF Directory GEO Tag Support + // ---------------------------------------------------------- + ++// vcpkg: function imported from libtiff/tif_dirinfo.c, in which it is not exported ++/* ++ * Return size of TIFFDataType in bytes. ++ * ++ * XXX: We need a separate function to determine the space needed ++ * to store the value. For TIFF_RATIONAL values TIFFDataWidth() returns 8, ++ * but we use 4-byte float to represent rationals. ++ */ ++int ++FreeImage_TIFFDataSize(TIFFDataType type) ++{ ++ switch (type) ++ { ++ case TIFF_BYTE: ++ case TIFF_SBYTE: ++ case TIFF_ASCII: ++ case TIFF_UNDEFINED: ++ return 1; ++ case TIFF_SHORT: ++ case TIFF_SSHORT: ++ return 2; ++ case TIFF_LONG: ++ case TIFF_SLONG: ++ case TIFF_FLOAT: ++ case TIFF_IFD: ++ case TIFF_RATIONAL: ++ case TIFF_SRATIONAL: ++ return 4; ++ case TIFF_DOUBLE: ++ case TIFF_LONG8: ++ case TIFF_SLONG8: ++ case TIFF_IFD8: ++ return 8; ++ default: ++ return 0; ++ } ++} + /** + Tiff info structure. + Entry format: +@@ -224,6 +261,33 @@ tiff_write_geotiff_profile(TIFF *tif, FIBITMAP *dib) { + // TIFF EXIF tag reading & writing + // ---------------------------------------------------------- + ++static uint32 exif_tag_ids[] = { ++ EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM, ++ EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF, ++ EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED, ++ EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL, ++ EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE, ++ EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE, ++ EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE, ++ EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH, ++ EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT, ++ EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL, ++ EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE, ++ EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION, ++ EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY, ++ EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION, ++ EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT, ++ EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD, ++ EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN, ++ EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE, ++ EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM, ++ EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST, ++ EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION, ++ EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL, ++ EXIFTAG_IMAGEUNIQUEID ++}; ++static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]); ++ + /** + Read a single Exif tag + +@@ -575,43 +639,10 @@ tiff_read_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + // loop over all Core Directory Tags + // ### uses private data, but there is no other way ++ // -> vcpkg: Best we can do without private headers is to hard-code a list of known EXIF tags and read those + if(md_model == TagLib::EXIF_MAIN) { +- const TIFFDirectory *td = &tif->tif_dir; +- +- uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo) +- +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); +- +- if(tag_id == lastTag) { +- continue; +- } +- +- // test if tag value is set +- // (lifted directly from LibTiff _TIFFWriteDirectory) +- +- if( fld->field_bit == FIELD_CUSTOM ) { +- int is_set = FALSE; +- +- for(int ci = 0; ci < td->td_customValueCount; ci++ ) { +- is_set |= (td->td_customValues[ci].info == fld); +- } +- +- if( !is_set ) { +- continue; +- } +- +- } else if(!TIFFFieldSet(tif, fld->field_bit)) { +- continue; +- } +- +- // process *all* other tags (some will be ignored) +- +- tiff_read_exif_tag(tif, tag_id, dib, md_model); +- +- lastTag = tag_id; ++ for (int i = 0; i < nExifTags; ++i) { ++ tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model); + } + + } +@@ -723,10 +754,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + TagLib& tag_lib = TagLib::instance(); + +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); ++ for (int fi = 0, nfi = nExifTags; nfi > 0; nfi--, fi++) { ++ const uint32 tag_id = exif_tag_ids[fi]; ++ const TIFFField *fld = TIFFFieldWithTag(tif, tag_id); + + if(skip_write_field(tif, tag_id)) { + // skip tags that are already handled by the LibTIFF writing process +@@ -749,7 +779,7 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + continue; + } + // type of storage may differ (e.g. rationnal array vs float array type) +- if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { ++ if((unsigned)FreeImage_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { + // skip tag or _TIFFmemcpy will fail + continue; + } diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-openexr.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-openexr.patch new file mode 100644 index 0000000000..08915da726 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-openexr.patch @@ -0,0 +1,44 @@ +diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp +index b286430..82b3b72 100644 +--- a/Source/FreeImage/PluginEXR.cpp ++++ b/Source/FreeImage/PluginEXR.cpp +@@ -28,16 +28,16 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include "../OpenEXR/IlmImf/ImfIO.h" +-#include "../OpenEXR/Iex/Iex.h" +-#include "../OpenEXR/IlmImf/ImfOutputFile.h" +-#include "../OpenEXR/IlmImf/ImfInputFile.h" +-#include "../OpenEXR/IlmImf/ImfRgbaFile.h" +-#include "../OpenEXR/IlmImf/ImfChannelList.h" +-#include "../OpenEXR/IlmImf/ImfRgba.h" +-#include "../OpenEXR/IlmImf/ImfArray.h" +-#include "../OpenEXR/IlmImf/ImfPreviewImage.h" +-#include "../OpenEXR/Half/half.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + + // ========================================================== +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 562fdd7..ce12649 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -39,7 +39,7 @@ + #include "Utilities.h" + #include + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-openjpeg.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-openjpeg.patch new file mode 100644 index 0000000000..fa4f8e7b6e --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-openjpeg.patch @@ -0,0 +1,39 @@ +diff --git a/Source/FreeImage/J2KHelper.cpp b/Source/FreeImage/J2KHelper.cpp +index 1776c3b..538f1c5 100644 +--- a/Source/FreeImage/J2KHelper.cpp ++++ b/Source/FreeImage/J2KHelper.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // -------------------------------------------------------------------------- +diff --git a/Source/FreeImage/PluginJ2K.cpp b/Source/FreeImage/PluginJ2K.cpp +index b8bcfc8..621a903 100644 +--- a/Source/FreeImage/PluginJ2K.cpp ++++ b/Source/FreeImage/PluginJ2K.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== +diff --git a/Source/FreeImage/PluginJP2.cpp b/Source/FreeImage/PluginJP2.cpp +index 742fe2c..c57f626 100644 +--- a/Source/FreeImage/PluginJP2.cpp ++++ b/Source/FreeImage/PluginJP2.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-png-zlib.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-png-zlib.patch new file mode 100644 index 0000000000..fc7837e434 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-png-zlib.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginPNG.cpp b/Source/FreeImage/PluginPNG.cpp +index ba2ef17..c3c5cd6 100644 +--- a/Source/FreeImage/PluginPNG.cpp ++++ b/Source/FreeImage/PluginPNG.cpp +@@ -40,8 +40,8 @@ + + // ---------------------------------------------------------- + +-#include "../ZLib/zlib.h" +-#include "../LibPNG/png.h" ++#include ++#include + + // ---------------------------------------------------------- + +diff --git a/Source/FreeImage/ZLibInterface.cpp b/Source/FreeImage/ZLibInterface.cpp +index 3ab6d32..725618b 100644 +--- a/Source/FreeImage/ZLibInterface.cpp ++++ b/Source/FreeImage/ZLibInterface.cpp +@@ -19,10 +19,9 @@ + // Use at your own risk! + // ========================================================== + +-#include "../ZLib/zlib.h" ++#include + #include "FreeImage.h" + #include "Utilities.h" +-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ + + /** + Compresses a source buffer into a target buffer, using the ZLib library. +@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_s + return 0; + case Z_OK: { + // patch header, setup crc and length (stolen from mod_trace_output) +- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code ++ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code + crc = crc32(crc, source, source_size); + memcpy(target + 4 + dest_len, &crc, 4); + memcpy(target + 8 + dest_len, &source_size, 4); diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-rawlib.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-rawlib.patch new file mode 100644 index 0000000000..6afa0bffa2 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-rawlib.patch @@ -0,0 +1,13 @@ +diff --git a/Source/FreeImage/PluginRAW.cpp b/Source/FreeImage/PluginRAW.cpp +index e9bd5bf..c7f8758 100644 +--- a/Source/FreeImage/PluginRAW.cpp ++++ b/Source/FreeImage/PluginRAW.cpp +@@ -19,7 +19,7 @@ + // Use at your own risk! + // ========================================================== + +-#include "../LibRawLite/libraw/libraw.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-webp.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-webp.patch new file mode 100644 index 0000000000..4d1757c395 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-external-webp.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginWebP.cpp b/Source/FreeImage/PluginWebP.cpp +index 7c9f62f..c401447 100644 +--- a/Source/FreeImage/PluginWebP.cpp ++++ b/Source/FreeImage/PluginWebP.cpp +@@ -24,9 +24,9 @@ + + #include "../Metadata/FreeImageTag.h" + +-#include "../LibWebP/src/webp/decode.h" +-#include "../LibWebP/src/webp/encode.h" +-#include "../LibWebP/src/webp/mux.h" ++#include ++#include ++#include + + // ========================================================== + // Plugin Interface diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-freeimage-config-include.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-freeimage-config-include.patch new file mode 100644 index 0000000000..579f08845e --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-freeimage-config-include.patch @@ -0,0 +1,16 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 12182cd..86a1e68 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -32,6 +32,11 @@ + #define FREEIMAGE_MINOR_VERSION 18 + #define FREEIMAGE_RELEASE_SERIAL 0 + ++// vcpkg specific includes -------------------------------------------------- ++// Include FreeImageConfig.h to define FREEIMAGE_LIB in static builds, ++// or do not define it in dynamic builds ++#include "FreeImageConfig.h" ++ + // Compiler options --------------------------------------------------------- + + #include // needed for UNICODE functions diff --git a/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-typedef-as-already-declared.patch b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-typedef-as-already-declared.patch new file mode 100644 index 0000000000..80d367bcb5 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/freeimage/3.18.0-8/use-typedef-as-already-declared.patch @@ -0,0 +1,15 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 1fd9c2f..59de277 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -160,8 +160,8 @@ typedef uint8_t BYTE; + typedef uint16_t WORD; + typedef uint32_t DWORD; + typedef int32_t LONG; +-typedef int64_t INT64; +-typedef uint64_t UINT64; ++typedef long long int INT64; ++typedef long long unsigned int UINT64; + #else + // MS is not C99 ISO compliant + typedef long BOOL; diff --git a/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/CMakeLists.txt b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/CMakeLists.txt new file mode 100644 index 0000000000..a5b084ffcc --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.4) + +project(giflib C) + +set(GIFLIB_HEADERS + lib/gif_lib.h +) + +set(GIFLIB_SOURCES + lib/dgif_lib.c + lib/egif_lib.c + lib/gif_err.c + lib/gif_font.c + lib/gif_hash.c + lib/gifalloc.c + lib/openbsd-reallocarray.c + lib/quantize.c +) + +add_definitions(-D_CRT_SECURE_NO_WARNINGS) +add_library(gif ${GIFLIB_SOURCES}) + +if (NOT GIFLIB_SKIP_HEADERS) + install(FILES ${GIFLIB_HEADERS} DESTINATION include) +endif () + +install(TARGETS gif + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/CONTROL b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/CONTROL new file mode 100644 index 0000000000..4de8f8e224 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/CONTROL @@ -0,0 +1,4 @@ +Source: giflib +Version: 5.1.4-3 +Homepage: https://sourceforge.net/projects/giflib/ +Description: A library for reading and writing gif images. diff --git a/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/fix-compile-error.patch b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/fix-compile-error.patch new file mode 100644 index 0000000000..93cf467ff2 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/fix-compile-error.patch @@ -0,0 +1,76 @@ +diff --git a/lib/dgif_lib.c b/lib/dgif_lib.c +index fddc0d2..7a6ab9c 100644 +--- a/lib/dgif_lib.c ++++ b/lib/dgif_lib.c +@@ -54,7 +54,7 @@ DGifOpenFileName(const char *FileName, int *Error) + int FileHandle; + GifFileType *GifFile; + +- if ((FileHandle = open(FileName, O_RDONLY)) == -1) { ++ if ((FileHandle = _open(FileName, O_RDONLY)) == -1) { + if (Error != NULL) + *Error = D_GIF_ERR_OPEN_FAILED; + return NULL; +@@ -81,7 +81,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + if (GifFile == NULL) { + if (Error != NULL) + *Error = D_GIF_ERR_NOT_ENOUGH_MEM; +- (void)close(FileHandle); ++ (void)_close(FileHandle); + return NULL; + } + +@@ -95,7 +95,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + if (Private == NULL) { + if (Error != NULL) + *Error = D_GIF_ERR_NOT_ENOUGH_MEM; +- (void)close(FileHandle); ++ (void)_close(FileHandle); + free((char *)GifFile); + return NULL; + } +@@ -106,7 +106,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ + #endif /* _WIN32 */ + +- f = fdopen(FileHandle, "rb"); /* Make it into a stream: */ ++ f = _fdopen(FileHandle, "rb"); /* Make it into a stream: */ + + /*@-mustfreeonly@*/ + GifFile->Private = (void *)Private; +diff --git a/lib/egif_lib.c b/lib/egif_lib.c +index f30b61b..18dc4a2 100644 +--- a/lib/egif_lib.c ++++ b/lib/egif_lib.c +@@ -60,10 +60,10 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) + GifFileType *GifFile; + + if (TestExistence) +- FileHandle = open(FileName, O_WRONLY | O_CREAT | O_EXCL, ++ FileHandle = _open(FileName, O_WRONLY | O_CREAT | O_EXCL, + S_IREAD | S_IWRITE); + else +- FileHandle = open(FileName, O_WRONLY | O_CREAT | O_TRUNC, ++ FileHandle = _open(FileName, O_WRONLY | O_CREAT | O_TRUNC, + S_IREAD | S_IWRITE); + + if (FileHandle == -1) { +@@ -73,7 +73,7 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) + } + GifFile = EGifOpenFileHandle(FileHandle, Error); + if (GifFile == (GifFileType *) NULL) +- (void)close(FileHandle); ++ (void)_close(FileHandle); + return GifFile; + } + +@@ -118,7 +118,7 @@ EGifOpenFileHandle(const int FileHandle, int *Error) + _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ + #endif /* _WIN32 */ + +- f = fdopen(FileHandle, "wb"); /* Make it into a stream: */ ++ f = _fdopen(FileHandle, "wb"); /* Make it into a stream: */ + + GifFile->Private = (void *)Private; + Private->FileHandle = FileHandle; + diff --git a/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/msvc-guard-unistd-h.patch b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/msvc-guard-unistd-h.patch new file mode 100644 index 0000000000..5140e6ee3e --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/msvc-guard-unistd-h.patch @@ -0,0 +1,52 @@ +diff -Naur a/lib/dgif_lib.c b/lib/dgif_lib.c +--- a/lib/dgif_lib.c 2016-04-02 21:34:00.000000000 +0600 ++++ b/lib/dgif_lib.c 2017-04-21 07:06:48.781271400 +0700 +@@ -12,7 +12,9 @@ + #include + #include + #include ++#ifndef _MSC_VER + #include ++#endif + #include + #include + +diff -Naur a/lib/egif_lib.c b/lib/egif_lib.c +--- a/lib/egif_lib.c 2016-01-22 16:36:36.000000000 +0600 ++++ b/lib/egif_lib.c 2017-04-21 07:07:08.728159900 +0700 +@@ -8,7 +8,9 @@ + + *****************************************************************************/ + ++#ifndef _MSC_VER + #include ++#endif + #include + #include + #include +diff -Naur a/lib/gif_hash.c b/lib/gif_hash.c +--- a/lib/gif_hash.c 2014-05-16 17:46:53.000000000 +0700 ++++ b/lib/gif_hash.c 2017-04-21 07:07:17.718719500 +0700 +@@ -11,7 +11,9 @@ + + *****************************************************************************/ + ++#ifndef _MSC_VER + #include ++#endif + #include + #include + #include +diff -Naur a/lib/gif_hash.h b/lib/gif_hash.h +--- a/lib/gif_hash.h 2014-05-16 17:46:53.000000000 +0700 ++++ b/lib/gif_hash.h 2017-04-21 07:07:32.316346800 +0700 +@@ -7,7 +7,9 @@ + #ifndef _GIF_HASH_H_ + #define _GIF_HASH_H_ + ++#ifndef _MSC_VER + #include ++#endif + #include + + #define HT_SIZE 8192 /* 12bits = 4096 or twice as big! */ diff --git a/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/portfile.cmake new file mode 100644 index 0000000000..7ca1478f7f --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/giflib/5.1.4-3/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(GIFLIB_VERSION 5.1.4) +vcpkg_download_distfile(ARCHIVE + URLS "https://nchc.dl.sourceforge.net/project/giflib/giflib-${GIFLIB_VERSION}.tar.bz2" + FILENAME "giflib-${GIFLIB_VERSION}.tar.bz2" + SHA512 32b5e342056c210e6478e9cb3b6ceec9594dcfaf34feea1eb4dad633a081ed4465bceee578c19165907cb47cb83912ac359ceea666a8e07dbbb5420f9928f96d +) + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + set(ADDITIONAL_PATCH "fix-compile-error.patch") +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GIFLIB_VERSION} + PATCHES + msvc-guard-unistd-h.patch + ${ADDITIONAL_PATCH} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DGIFLIB_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/giflib RENAME copyright) diff --git a/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/CMakeLists.txt b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/CMakeLists.txt new file mode 100644 index 0000000000..727b969069 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/CMakeLists.txt @@ -0,0 +1,106 @@ +# Copyright Mathieu Malaterre +# BSD (Same as jxrlib) +# Based on https://jxrlib.codeplex.com/discussions/440294 +# and modified for vcpkg packaging +cmake_minimum_required(VERSION 2.8) +project(jxrlib C) + +# Need shared libs for ABI +option(BUILD_SHARED_LIBS "Build shared libraries" ON) + +# Add a debug postfix +set(CMAKE_DEBUG_POSTFIX "d") + +# helper macro to preserve original Makefile convention +macro(JXR_MAKE_OBJ SET_NAME) + foreach(src ${SRC_${SET_NAME}}) + list(APPEND OBJ_${SET_NAME} ${DIR_${SET_NAME}}/${src}) + endforeach() +endmacro() + +if(NOT MSVC) + add_definitions(-D__ANSI__) +endif() + +include(TestBigEndian) +test_big_endian(ISBIGENDIAN) +if(ISBIGENDIAN) + set(DEF_ENDIAN _BIG__ENDIAN_) +endif() + +set(DIR_SYS image/sys) +set(DIR_DEC image/decode) +set(DIR_ENC image/encode) + +set(DIR_GLUE jxrgluelib) +set(DIR_TEST jxrtestlib) +set(DIR_EXEC jxrencoderdecoder) + +if(NOT JXRLIB_INSTALL_BIN_DIR) + set(JXRLIB_INSTALL_BIN_DIR "bin") +endif() + +if(NOT JXRLIB_INSTALL_LIB_DIR) + set(JXRLIB_INSTALL_LIB_DIR "lib") +endif() + +if(NOT JXRLIB_INSTALL_INCLUDE_DIR) + set(JXRLIB_INSTALL_INCLUDE_DIR "include/jxrlib") +endif() + +include_directories( + common/include + ${DIR_SYS} + ${DIR_GLUE} + ${DIR_TEST} +) + + +# JPEG-XR +set(SRC_SYS adapthuff.c image.c strcodec.c strPredQuant.c strTransform.c perfTimerANSI.c) +JXR_MAKE_OBJ(SYS) +set(SRC_DEC decode.c postprocess.c segdec.c strdec.c strInvTransform.c strPredQuantDec.c JXRTranscode.c) +JXR_MAKE_OBJ(DEC) +set(SRC_ENC encode.c segenc.c strenc.c strFwdTransform.c strPredQuantEnc.c) +JXR_MAKE_OBJ(ENC) + +add_library(jpegxr ${OBJ_ENC} ${OBJ_DEC} ${OBJ_SYS}) +set_property(TARGET jpegxr + PROPERTY COMPILE_DEFINITIONS DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} +) +set_property(TARGET jpegxr PROPERTY LINK_INTERFACE_LIBRARIES "") +install(TARGETS jpegxr + EXPORT JXRLibTargets + RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} + LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} + ARCHIVE DESTINATION ${JXRLIB_INSTALL_LIB_DIR} +) + +# JXR-GLUE +set(SRC_GLUE JXRGlue.c JXRMeta.c JXRGluePFC.c JXRGlueJxr.c) +JXR_MAKE_OBJ(GLUE) +set(SRC_TEST JXRTest.c JXRTestBmp.c JXRTestHdr.c JXRTestPnm.c JXRTestTif.c JXRTestYUV.c) +JXR_MAKE_OBJ(TEST) + +add_library(jxrglue ${OBJ_GLUE} ${OBJ_TEST}) +set_property(TARGET jxrglue + PROPERTY COMPILE_DEFINITIONS DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} +) +set_property(TARGET jxrglue PROPERTY LINK_INTERFACE_LIBRARIES "") +install(TARGETS jxrglue + EXPORT JXRLibTargets + RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} + LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} + ARCHIVE DESTINATION ${JXRLIB_INSTALL_LIB_DIR} +) + +target_link_libraries(jxrglue jpegxr) + +# install rules +install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h + image/sys/windowsmediaphoto.h + DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR} COMPONENT Headers +) +install(DIRECTORY common/include/ DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR} + FILES_MATCHING PATTERN "*.h" +) diff --git a/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/CONTROL b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/CONTROL new file mode 100644 index 0000000000..329b34a1d7 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/CONTROL @@ -0,0 +1,4 @@ +Source: jxrlib +Version: 2019.10.9 +Homepage: https://github.com/4creators/jxrlib +Description: Open source implementation of the jpegxr image format standard. diff --git a/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/FindJXR.cmake b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/FindJXR.cmake new file mode 100644 index 0000000000..7e4a5d45e8 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/FindJXR.cmake @@ -0,0 +1,28 @@ +# - Find JXR +# Find the JXR library +# This module defines +# JXR_INCLUDE_DIRS, where to find jxrlib/JXRGlue.h +# JXR_LIBRARIES, the libraries needed to use JXR +# + +find_path(JXR_INCLUDE_DIRS + NAMES JXRGlue.h + PATH_SUFFIXES jxrlib +) +mark_as_advanced(JXR_INCLUDE_DIRS) + +include(SelectLibraryConfigurations) + +find_library(JPEGXR_LIBRARY_RELEASE NAMES jpegxr PATH_SUFFIXES lib) +find_library(JPEGXR_LIBRARY_DEBUG NAMES jpegxrd PATH_SUFFIXES lib) +select_library_configurations(JPEGXR) + +find_library(JXRGLUE_LIBRARY_RELEASE NAMES jxrglue PATH_SUFFIXES lib) +find_library(JXRGLUE_LIBRARY_DEBUG NAMES jxrglued PATH_SUFFIXES lib) +select_library_configurations(JXRGLUE) + +set(JXR_LIBRARIES ${JPEGXR_LIBRARY} ${JXRGLUE_LIBRARY}) +mark_as_advanced(JXR_LIBRARIES) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(JXR DEFAULT_MSG JXR_INCLUDE_DIRS JXR_LIBRARIES) diff --git a/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/portfile.cmake new file mode 100644 index 0000000000..bf131d431b --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO 4creators/jxrlib + REF f7521879862b9085318e814c6157490dd9dbbdb4 + SHA512 f5617cbe73b6b905cc6bba181e6a3efedd59584f7a8c90e0f34db580cfdad4239a2ab753df4e221f26a5c0db51475b021052e3b9e3ab3673573573b1d57f3fdb + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Darwin AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Linux) + # The file guiddef.h is part of the Windows SDK, + # we then remove the local copy shipped with jxrlib + file(REMOVE ${SOURCE_PATH}/common/include/guiddef.h) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +#install FindJXR.cmake file +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) diff --git a/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/vcpkg-cmake-wrapper.cmake b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000000..e95a66bdc4 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/jxrlib/2019.10.9/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +set(JXR_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +if(NOT JXR_LIBRARIES) + _find_package(${ARGS}) +endif() + +set(CMAKE_MODULE_PATH ${JXR_PREV_MODULE_PATH}) diff --git a/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/CONTROL b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/CONTROL new file mode 100644 index 0000000000..d03709b008 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/CONTROL @@ -0,0 +1,8 @@ +Source: libpng +Version: 1.6.37-6 +Build-Depends: zlib +Homepage: https://github.com/glennrp/libpng +Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. + +Feature: apng +Description: This is backward compatible with the regular libpng, both in library usage and format. diff --git a/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/cmake.patch b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/cmake.patch new file mode 100644 index 0000000000..f2eb6aa8e1 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/cmake.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6451fcf..6599e1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ if(NOT PNG_BUILD_ZLIB) + endif() + + if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU) +- find_library(M_LIBRARY m) ++ set(M_LIBRARY m) + else() + # libm is not needed and/or not available + set(M_LIBRARY "") +@@ -551,21 +551,14 @@ endif() + + if(PNG_STATIC) + # does not work without changing name +- set(PNG_LIB_NAME_STATIC png_static) + add_library(png_static STATIC ${libpng_sources}) + add_dependencies(png_static genfiles) + # MSVC doesn't use a different file extension for shared vs. static + # libs. We are able to change OUTPUT_NAME to remove the _static + # for all other platforms. +- if(NOT MSVC) +- set_target_properties(png_static PROPERTIES +- OUTPUT_NAME "${PNG_LIB_NAME}" +- CLEAN_DIRECT_OUTPUT 1) +- else() +- set_target_properties(png_static PROPERTIES +- OUTPUT_NAME "${PNG_LIB_NAME}_static" +- CLEAN_DIRECT_OUTPUT 1) +- endif() ++ set_target_properties(png_static PROPERTIES ++ OUTPUT_NAME "${PNG_LIB_NAME}" ++ CLEAN_DIRECT_OUTPUT 1) + list(APPEND PNG_LIB_TARGETS png_static) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name +@@ -915,7 +908,7 @@ endif() + + # Create an export file that CMake users can include() to import our targets. + if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL) +- install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) ++ install(EXPORT libpng DESTINATION lib/libpng FILE libpngConfig.cmake) + endif() + + # what's with libpng-manual.txt and all the extra files? diff --git a/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/portfile.cmake new file mode 100644 index 0000000000..e9a2004554 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/portfile.cmake @@ -0,0 +1,71 @@ +include(vcpkg_common_functions) + +set(LIBPNG_VER 1.6.37) + +# Download the apng patch +set(LIBPNG_APNG_OPTION ) +if ("apng" IN_LIST FEATURES) + set(LIBPNG_APG_PATCH_NAME libpng-${LIBPNG_VER}-apng.patch) + set(LIBPNG_APG_PATCH_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIBPNG_APG_PATCH_NAME}) + if (NOT EXISTS ${LIBPNG_APG_PATCH_PATH}) + vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE + URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_VER}/${LIBPNG_APG_PATCH_NAME}.gz" + FILENAME "${LIBPNG_APG_PATCH_NAME}.gz" + SHA512 226adcb3a8c60f2267fe2976ab531329ae43c2603dab4d0cf8f16217d64069936b879f3d6516b75d259c47d6f5c5b1f24f887602206c8e46abde0fb7f5c7946b + ) + + vcpkg_find_acquire_program(7Z) + + vcpkg_execute_required_process( + COMMAND ${7Z} x ${LIBPNG_APNG_PATCH_ARCHIVE} -aoa + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src + LOGNAME extract-patch.log + ) + endif() + + set(APNG_EXTRA_PATCH ${LIBPNG_APG_PATCH_PATH}) + set(LIBPNG_APNG_OPTION "-DPNG_PREFIX=a") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO glennrp/libpng + REF v${LIBPNG_VER} + SHA512 ccb3705c23b2724e86d072e2ac8cfc380f41fadfd6977a248d588a8ad57b6abe0e4155e525243011f245e98d9b7afbe2e8cc7fd4ff7d82fcefb40c0f48f88918 + HEAD_REF master + PATCHES + use_abort.patch + cmake.patch + ${APNG_EXTRA_PATCH} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(PNG_STATIC_LIBS OFF) + set(PNG_SHARED_LIBS ON) +else() + set(PNG_STATIC_LIBS ON) + set(PNG_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${LIBPNG_APNG_OPTION} + -DPNG_STATIC=${PNG_STATIC_LIBS} + -DPNG_SHARED=${PNG_SHARED_LIBS} + -DPNG_TESTS=OFF + -DSKIP_INSTALL_PROGRAMS=ON + -DSKIP_INSTALL_EXECUTABLES=ON + -DSKIP_INSTALL_FILES=ON + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpng) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/use_abort.patch b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/use_abort.patch new file mode 100644 index 0000000000..c52df5c2b7 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libpng/1.6.37-6/use_abort.patch @@ -0,0 +1,17 @@ +diff --git a/pngpriv.h b/pngpriv.h +index 583c26f..135651c 100644 +--- a/pngpriv.h ++++ b/pngpriv.h +@@ -556,11 +556,7 @@ + + /* Memory model/platform independent fns */ + #ifndef PNG_ABORT +-# ifdef _WINDOWS_ +-# define PNG_ABORT() ExitProcess(0) +-# else +-# define PNG_ABORT() abort() +-# endif ++# define PNG_ABORT() abort() + #endif + + /* These macros may need to be architecture dependent. */ diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0001-build-fixes.patch b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0001-build-fixes.patch new file mode 100644 index 0000000000..4909787279 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0001-build-fixes.patch @@ -0,0 +1,165 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 499ddce..895fda9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -159,6 +159,12 @@ add_definitions(-DHAVE_CONFIG_H) + if(MSVC) + # avoid security warnings for e.g., fopen() used in the examples. + add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ add_definitions(-DWEBP_HAVE_JUST_SDL_H) ++ if(BUILD_SHARED_LIBS) ++ add_definitions(-DWEBP_EXTERN=__declspec\(dllexport\)) ++ else() ++ add_definitions(-DFREEGLUT_STATIC) ++ endif() + else() + add_definitions(-Wall) + endif() +@@ -342,19 +346,23 @@ if(WEBP_BUILD_ANIM_UTILS + "example_util_[^ ]*") + list(APPEND EXAMPLEUTIL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h) + add_library(exampleutil ${EXAMPLEUTIL_SRCS}) ++ set_target_properties(exampleutil PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + target_include_directories( + exampleutil + PUBLIC $) ++ target_link_libraries(exampleutil imageioutil) + + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEIOUTILS_SRCS" + "imageio_util_[^ ]*") + add_library(imageioutil ${IMAGEIOUTILS_SRCS}) ++ set_target_properties(imageioutil PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + target_link_libraries(imageioutil webp) + + # Image-decoding utility library. + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEDEC_SRCS" + "imagedec_[^ ]*") + add_library(imagedec ${IMAGEDEC_SRCS}) ++ set_target_properties(imagedec PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + target_link_libraries(imagedec + imageioutil + webpdemux +@@ -365,7 +373,8 @@ if(WEBP_BUILD_ANIM_UTILS + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/imageio "IMAGEENC_SRCS" + "imageenc_[^ ]*") + add_library(imageenc ${IMAGEENC_SRCS}) +- target_link_libraries(imageenc webp) ++ set_target_properties(imageenc PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) ++ target_link_libraries(imageenc imageioutil webp) + + set_property(TARGET exampleutil + imageioutil +@@ -380,7 +389,7 @@ if(WEBP_BUILD_DWEBP) + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "DWEBP_SRCS" "dwebp") + add_executable(dwebp ${DWEBP_SRCS}) + target_link_libraries(dwebp exampleutil imagedec imageenc) +- target_include_directories(dwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(dwebp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + install(TARGETS dwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +@@ -389,13 +398,14 @@ if(WEBP_BUILD_CWEBP) + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/examples "CWEBP_SRCS" "cwebp") + add_executable(cwebp ${CWEBP_SRCS}) + target_link_libraries(cwebp exampleutil imagedec webp) +- target_include_directories(cwebp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(cwebp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + + if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") + add_library(libwebpmux ${WEBP_MUX_SRCS}) ++ set_target_properties(libwebpmux PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + target_link_libraries(libwebpmux webp) + target_include_directories(libwebpmux + PRIVATE ${CMAKE_CURRENT_BINARY_DIR} +@@ -411,7 +421,7 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) + "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\ + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\ + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;") +- set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) ++ #set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) + list(APPEND INSTALLED_LIBRARIES libwebpmux) + configure_pkg_config("src/mux/libwebpmux.pc") + endif() +@@ -428,7 +438,7 @@ if(WEBP_BUILD_GIF2WEBP) + webp + libwebpmux + ${WEBP_DEP_GIF_LIBRARIES}) +- target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(gif2webp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + install(TARGETS gif2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +@@ -444,7 +454,7 @@ if(WEBP_BUILD_IMG2WEBP) + imageioutil + webp + libwebpmux) +- target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(img2webp PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + install(TARGETS img2webp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +@@ -464,6 +474,7 @@ if(WEBP_BUILD_VWEBP) + webpdemux) + target_include_directories(vwebp + PRIVATE GLUT::GLUT ++ ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_BINARY_DIR}/src + ${OPENGL_INCLUDE_DIR}) + install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +@@ -483,7 +494,7 @@ if(WEBP_BUILD_WEBPINFO) + "webpinfo") + add_executable(webpinfo ${WEBPINFO_SRCS}) + target_link_libraries(webpinfo exampleutil imageioutil) +- target_include_directories(webpinfo PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(webpinfo PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + install(TARGETS webpinfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +@@ -493,7 +504,7 @@ if(WEBP_BUILD_WEBPMUX) + "webpmux") + add_executable(webpmux ${WEBPMUX_SRCS}) + target_link_libraries(webpmux exampleutil imageioutil libwebpmux webp) +- target_include_directories(webpmux PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(webpmux PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + install(TARGETS webpmux RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +@@ -540,7 +551,7 @@ if(WEBP_BUILD_WEBP_JS) + # JavaScript version + add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) + target_link_libraries(webp_js webpdecoder SDL) +- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + set(WEBP_HAVE_SDL 1) + set_target_properties( + webp_js +@@ -553,7 +564,7 @@ if(WEBP_BUILD_WEBP_JS) + # WASM version + add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) + target_link_libraries(webp_wasm webpdecoder SDL) +- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + set_target_properties( + webp_wasm + PROPERTIES LINK_FLAGS "-s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm\"' \ +@@ -579,7 +590,7 @@ if(WEBP_BUILD_ANIM_UTILS) + libwebpmux + webpdemux + ${WEBP_DEP_GIF_LIBRARIES}) +- target_include_directories(anim_diff PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(anim_diff PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + + # anim_dump + include_directories(${WEBP_DEP_IMG_INCLUDE_DIRS} ${WEBP_DEP_GIF_INCLUDE_DIRS}) +@@ -595,7 +606,7 @@ if(WEBP_BUILD_ANIM_UTILS) + libwebpmux + webpdemux + ${WEBP_DEP_GIF_LIBRARIES}) +- target_include_directories(anim_dump PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src) ++ target_include_directories(anim_dump PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src) + endif() + + # Install the different headers and libraries. diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0002-cmake-config-add-backwards-compatibility.patch b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0002-cmake-config-add-backwards-compatibility.patch new file mode 100644 index 0000000000..2ed199ec8f --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0002-cmake-config-add-backwards-compatibility.patch @@ -0,0 +1,69 @@ +diff --git a/cmake/WebPConfig.cmake.in b/cmake/WebPConfig.cmake.in +index bb22164..3ad256f 100644 +--- a/cmake/WebPConfig.cmake.in ++++ b/cmake/WebPConfig.cmake.in +@@ -4,8 +4,60 @@ set(WEBP_VERSION ${WebP_VERSION}) + @PACKAGE_INIT@ + + include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") ++include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +-set(WebP_INCLUDE_DIRS "webp") +-set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS}) +-set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@") +-set(WEBP_LIBRARIES "${WebP_LIBRARIES}") ++find_path(WEBP_INCLUDE_DIR NAMES webp/types.h) ++set(WebP_INCLUDE_DIR ${WEBP_INCLUDE_DIR}) ++set(WebP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR}) ++set(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR}) ++ ++if(NOT WEBP_BASE_LIBRARY AND NOT WebP_BASE_LIBRARY) ++ find_library(WEBP_BASE_LIBRARY_RELEASE NAMES webp) ++ find_library(WEBP_BASE_LIBRARY_DEBUG NAMES webpd) ++ select_library_configurations(WEBP_BASE) ++ set(WebP_BASE_LIBRARY ${WEBP_BASE_LIBRARY}) ++ if(WEBP_BASE_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_BASE_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_BASE_LIBRARY}") ++ endif() ++endif() ++ ++if(NOT WEBP_DECODER_LIBRARY AND NOT WebP_DECODER_LIBRARY) ++ find_library(WEBP_DECODER_LIBRARY_RELEASE NAMES webpdecoder) ++ find_library(WEBP_DECODER_LIBRARY_DEBUG NAMES webpdecoderd) ++ select_library_configurations(WEBP_DECODER) ++ set(WebP_DECODER_LIBRARY ${WEBP_DECODER_LIBRARY}) ++ if(WEBP_DECODER_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_DECODER_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_DECODER_LIBRARY}") ++ endif() ++endif() ++ ++if(NOT WEBP_DEMUX_LIBRARY AND NOT WebP_DEMUX_LIBRARY) ++ find_library(WEBP_DEMUX_LIBRARY_RELEASE NAMES webpdemux) ++ find_library(WEBP_DEMUX_LIBRARY_DEBUG NAMES webpdemuxd) ++ select_library_configurations(WEBP_DEMUX) ++ set(WebP_DEMUX_LIBRARY ${WEBP_DEMUX_LIBRARY}) ++ if(WEBP_DEMUX_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_DEMUX_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_DEMUX_LIBRARY}") ++ endif() ++endif() ++ ++if(NOT WEBP_MUX_LIBRARY AND NOT WebP_MUX_LIBRARY) ++ find_library(WEBP_MUX_LIBRARY_RELEASE NAMES libwebpmux) ++ find_library(WEBP_MUX_LIBRARY_DEBUG NAMES libwebpmuxd) ++ select_library_configurations(WEBP_MUX) ++ set(WebP_MUX_LIBRARY ${WEBP_MUX_LIBRARY}) ++ if(WEBP_MUX_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_MUX_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_MUX_LIBRARY}") ++ endif() ++endif() ++ ++set(WEBP_LIBRARY ${WEBP_BASE_LIBRARY}) ++set(WebP_LIBRARY ${WebP_BASE_LIBRARY}) ++if(WEBP_BASE_LIBRARY AND WEBP_INCLUDE_DIR) ++ set(WEBP_FOUND 1) ++ set(WebP_FOUND 1) ++endif() diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0003-remove-missing-symbol.patch b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0003-remove-missing-symbol.patch new file mode 100644 index 0000000000..218481bbc1 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0003-remove-missing-symbol.patch @@ -0,0 +1,13 @@ +diff --git a/examples/gifdec.c b/examples/gifdec.c +index 4219352..ab0592a 100644 +--- a/examples/gifdec.c ++++ b/examples/gifdec.c +@@ -310,7 +310,7 @@ void GIFDisplayError(const GifFileType* const gif, int gif_error) { + #else + (void)gif; + fprintf(stderr, "GIFLib Error %d: ", gif_error); +- PrintGifError(); ++ //PrintGifError(); + fprintf(stderr, "\n"); + #endif + } diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0004-add-missing-linked-library.patch b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0004-add-missing-linked-library.patch new file mode 100644 index 0000000000..49a34ef4d2 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0004-add-missing-linked-library.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a98540c..a3697cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -479,6 +479,10 @@ if(WEBP_BUILD_VWEBP) + ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_BINARY_DIR}/src + ${OPENGL_INCLUDE_DIR}) ++ if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) ++ find_package(X11 REQUIRED) ++ target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB}) ++ endif() + install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + check_c_compiler_flag("-Wno-deprecated-declarations" HAS_NO_DEPRECATED) diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0005-fix-static-build.patch b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0005-fix-static-build.patch new file mode 100644 index 0000000000..f17713efd5 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0005-fix-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7585fac..83edb3a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -540,7 +540,7 @@ if(WEBP_BUILD_EXTRAS) + find_package(SDL) + if(SDL_FOUND) + add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) +- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) ++ target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp dxguid winmm) + target_include_directories(vwebp_sdl + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0006-fix-dependecies-platform.patch b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0006-fix-dependecies-platform.patch new file mode 100644 index 0000000000..fdb5ec0b37 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0006-fix-dependecies-platform.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83edb3a..f634094 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -540,7 +540,10 @@ if(WEBP_BUILD_EXTRAS) + find_package(SDL) + if(SDL_FOUND) + add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) +- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp dxguid winmm) ++ target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) ++ if (MSVC) ++ target_link_libraries(vwebp_sdl dxguid winmm) ++ endif() + target_include_directories(vwebp_sdl + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0007-fix-arm-build.patch b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0007-fix-arm-build.patch new file mode 100644 index 0000000000..aae5e39574 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/0007-fix-arm-build.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake +index da9a42a4..ce7a69f3 100644 +--- a/cmake/cpu.cmake ++++ b/cmake/cpu.cmake +@@ -73,7 +73,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE}) + set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG}) + webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD}) + else() +- if(MSVC) ++ if(MSVC AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM")) + list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG) + else() + set(SIMD_COMPILE_FLAG " ") diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/CONTROL b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/CONTROL new file mode 100644 index 0000000000..8dbe1d0a25 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/CONTROL @@ -0,0 +1,8 @@ +Source: libwebp +Version: 1.0.2-8 +Homepage: https://github.com/webmproject/libwebp +Description: Lossy compression of digital photographic images. + +Feature: all +Description: enable all webp features +Build-Depends: giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows), opengl diff --git a/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/portfile.cmake new file mode 100644 index 0000000000..240aaad5cd --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/libwebp/1.0.2-8/portfile.cmake @@ -0,0 +1,129 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO webmproject/libwebp + REF v1.0.2 + SHA512 27ca4e7c87d3114a5d3dba6801b5608207a9adc44d0fa62f7523d39be789d389d342d9db5e28c9301eff8fcb1471809c76680a68abd4ff97217b17dd13c4e22b + HEAD_REF master + PATCHES + 0001-build-fixes.patch + 0002-cmake-config-add-backwards-compatibility.patch + 0003-remove-missing-symbol.patch + 0004-add-missing-linked-library.patch + 0005-fix-static-build.patch + 0006-fix-dependecies-platform.patch + 0007-fix-arm-build.patch +) + +set(WEBP_BUILD_ANIM_UTILS OFF) +set(WEBP_BUILD_GIF2WEBP OFF) +set(WEBP_BUILD_IMG2WEBP OFF) +set(WEBP_BUILD_VWEBP OFF) +set(WEBP_BUILD_WEBPINFO OFF) +set(WEBP_BUILD_WEBPMUX OFF) +set(WEBP_BUILD_EXTRAS OFF) +set(WEBP_NEAR_LOSSLESS OFF) +if("all" IN_LIST FEATURES) + set(WEBP_BUILD_ANIM_UTILS ON) + set(WEBP_NEAR_LOSSLESS ON) + set(WEBP_BUILD_GIF2WEBP ON) + set(WEBP_BUILD_IMG2WEBP ON) + set(WEBP_BUILD_VWEBP ON) + set(WEBP_BUILD_WEBPINFO ON) + set(WEBP_BUILD_WEBPMUX ON) + set(WEBP_BUILD_EXTRAS ON) +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + message("WebP currently requires the following library from the system package manager:\n Xxf86vm\n\nThis can be installed on Ubuntu systems via apt-get install libxxf86vm-dev") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(WEBP_BUILD_VWEBP OFF) + set(WEBP_BUILD_EXTRAS OFF) + message("Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP on Mac. It has been disabled together with extras.") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWEBP_ENABLE_SIMD:BOOL=ON + -DWEBP_BUILD_ANIM_UTILS:BOOL=${WEBP_BUILD_ANIM_UTILS} + -DWEBP_BUILD_CWEBP:BOOL=OFF + -DWEBP_BUILD_DWEBP:BOOL=OFF + -DWEBP_BUILD_GIF2WEBP:BOOL=${WEBP_BUILD_GIF2WEBP} + -DWEBP_BUILD_IMG2WEBP:BOOL=${WEBP_BUILD_IMG2WEBP} + -DWEBP_BUILD_VWEBP:BOOL=${WEBP_BUILD_VWEBP} + -DWEBP_BUILD_WEBPINFO:BOOL=${WEBP_BUILD_WEBPINFO} + -DWEBP_BUILD_WEBPMUX:BOOL=${WEBP_BUILD_WEBPMUX} + -DWEBP_BUILD_EXTRAS:BOOL=${WEBP_BUILD_EXTRAS} + -DWEBP_BUILD_WEBP_JS:BOOL=OFF + -DWEBP_NEAR_LOSSLESS:BOOL=${WEBP_NEAR_LOSSLESS} + -DWEBP_ENABLE_SWAP_16BIT_CSP:BOOL=OFF + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/WebP) +file(GLOB CMAKE_FILES ${CURRENT_PACKAGES_DIR}/share/${PORT}/*) +file(COPY ${CMAKE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/webp/) + +#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it +if(CMAKE_HOST_WIN32) +set(EXECUTABLE_SUFFIX ".exe") +else() +set(EXECUTABLE_SUFFIX "") +endif() + +if("all" IN_LIST FEATURES) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/get_disto${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/gif2webp${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/img2webp${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vwebp${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vwebp_sdl${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webpinfo${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webpmux${EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/webp_quality${EXECUTABLE_SUFFIX}) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libwebp/) + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/get_disto${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/get_disto${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/get_disto${EXECUTABLE_SUFFIX}) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/gif2webp${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/gif2webp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/gif2webp${EXECUTABLE_SUFFIX}) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/img2webp${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/img2webp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/img2webp${EXECUTABLE_SUFFIX}) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vwebp${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/vwebp${EXECUTABLE_SUFFIX}) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/vwebp_sdl${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vwebp_sdl${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/vwebp_sdl${EXECUTABLE_SUFFIX}) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpinfo${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webpinfo${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webpinfo${EXECUTABLE_SUFFIX}) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webpmux${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webpmux${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webpmux${EXECUTABLE_SUFFIX}) + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/webp_quality${EXECUTABLE_SUFFIX}") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/webp_quality${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/libwebp/webp_quality${EXECUTABLE_SUFFIX}) + endif() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libwebp) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebp RENAME copyright) diff --git a/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/CONTROL b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/CONTROL new file mode 100644 index 0000000000..7d8759237f --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/CONTROL @@ -0,0 +1,5 @@ +Source: openexr +Version: 2.3.0-5 +Homepage: https://www.openexr.com/ +Description: OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications +Build-Depends: zlib diff --git a/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/FindOpenEXR.cmake b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/FindOpenEXR.cmake new file mode 100644 index 0000000000..f036c742e1 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/FindOpenEXR.cmake @@ -0,0 +1,94 @@ +include(FindPackageHandleStandardArgs) + +find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h) +find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR) + +file(STRINGS "${OpenEXR_INCLUDE_DIRS}/OpenEXR/OpenEXRConfig.h" OPENEXR_CONFIG_H) + +string(REGEX REPLACE "^.*define OPENEXR_VERSION_MAJOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MAJOR "${OPENEXR_CONFIG_H}") +string(REGEX REPLACE "^.*define OPENEXR_VERSION_MINOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MINOR "${OPENEXR_CONFIG_H}") +set(OpenEXR_LIB_SUFFIX "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}") + +include(SelectLibraryConfigurations) + +if(NOT OpenEXR_BASE_LIBRARY) + find_library(OpenEXR_BASE_LIBRARY_RELEASE NAMES IlmImf-${OpenEXR_LIB_SUFFIX}) + find_library(OpenEXR_BASE_LIBRARY_DEBUG NAMES IlmImf-${OpenEXR_LIB_SUFFIX}_d) + select_library_configurations(OpenEXR_BASE) +endif() + +if(NOT OpenEXR_UTIL_LIBRARY) + find_library(OpenEXR_UTIL_LIBRARY_RELEASE NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}) + find_library(OpenEXR_UTIL_LIBRARY_DEBUG NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}_d) + select_library_configurations(OpenEXR_UTIL) +endif() + +if(NOT OpenEXR_HALF_LIBRARY) + find_library(OpenEXR_HALF_LIBRARY_RELEASE NAMES Half-${OpenEXR_LIB_SUFFIX}) + find_library(OpenEXR_HALF_LIBRARY_DEBUG NAMES Half-${OpenEXR_LIB_SUFFIX}_d) + select_library_configurations(OpenEXR_HALF) +endif() + +if(NOT OpenEXR_IEX_LIBRARY) + find_library(OpenEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OpenEXR_LIB_SUFFIX}) + find_library(OpenEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OpenEXR_LIB_SUFFIX}_d) + select_library_configurations(OpenEXR_IEX) +endif() + +if(NOT OpenEXR_MATH_LIBRARY) + find_library(OpenEXR_MATH_LIBRARY_RELEASE NAMES Imath-${OpenEXR_LIB_SUFFIX}) + find_library(OpenEXR_MATH_LIBRARY_DEBUG NAMES Imath-${OpenEXR_LIB_SUFFIX}_d) + select_library_configurations(OpenEXR_MATH) +endif() + +if(NOT OpenEXR_THREAD_LIBRARY) + find_library(OpenEXR_THREAD_LIBRARY_RELEASE NAMES IlmThread-${OpenEXR_LIB_SUFFIX}) + find_library(OpenEXR_THREAD_LIBRARY_DEBUG NAMES IlmThread-${OpenEXR_LIB_SUFFIX}_d) + select_library_configurations(OpenEXR_THREAD) +endif() + +if(NOT OpenEXR_IEXMATH_LIBRARY) + find_library(OpenEXR_IEXMATH_LIBRARY_RELEASE NAMES IexMath-${OpenEXR_LIB_SUFFIX}) + find_library(OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES IexMath-${OpenEXR_LIB_SUFFIX}_d) + select_library_configurations(OpenEXR_IEXMATH) +endif() + +set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}") +set(OPENEXR_Half_LIBRARY "${OpenEXR_HALF_LIBRARY}") +set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}") +set(OPENEXR_Iex_LIBRARY "${OpenEXR_IEX_LIBRARY}") +set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}") +set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}") +set(OPENEXR_IlmImf_LIBRARY "${OpenEXR_BASE_LIBRARY}") +set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}") +set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}") + +set(OpenEXR_LIBRARY "${OpenEXR_BASE_LIBRARY}") + +set(OpenEXR_LIBRARIES + ${OpenEXR_LIBRARY} + ${OpenEXR_MATH_LIBRARY} + ${OpenEXR_IEXMATH_LIBRARY} + ${OpenEXR_UTIL_LIBRARY} + ${OpenEXR_HALF_LIBRARY} + ${OpenEXR_IEX_LIBRARY} + ${OpenEXR_THREAD_LIBRARY} +) + +set(OPENEXR_LIBRARIES + ${OPENEXR_HALF_LIBRARY} + ${OPENEXR_IEX_LIBRARY} + ${OPENEXR_IMATH_LIBRARY} + ${OPENEXR_ILMIMF_LIBRARY} + ${OPENEXR_ILMTHREAD_LIBRARY} +) + +set(OpenEXR_INCLUDE_DIR ${OpenEXR_INCLUDE_DIRS}) +set(OPENEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIRS}) +set(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATHS}) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS) + +if(OpenEXR_FOUND) + set(OPENEXR_FOUND 1) +endif() diff --git a/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_clang_not_setting_modern_cplusplus.patch b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_clang_not_setting_modern_cplusplus.patch new file mode 100644 index 0000000000..05e86b50c6 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_clang_not_setting_modern_cplusplus.patch @@ -0,0 +1,13 @@ +diff --git a/IlmBase/CMakeLists.txt b/IlmBase/CMakeLists.txt +index e13c768..95942c8 100644 +--- a/IlmBase/CMakeLists.txt ++++ b/IlmBase/CMakeLists.txt +@@ -110,7 +110,7 @@ ENDIF () + + IF (OPENEXR_FORCE_CXX03) + FILE ( APPEND ${ILMBASE_TMP_CONFIG} "#define ILMBASE_FORCE_CXX03 1\n" ) +-ELSEIF (NOT WIN32) ++ELSEIF (NOT WIN32 AND NOT APPLE) + # really only care about c++11 right now for the threading bits, but this can be changed to 14 + # when needed... + # Note that the __cplusplus check is not valid under MSVC diff --git a/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_install_ilmimf.patch b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_install_ilmimf.patch new file mode 100644 index 0000000000..db65be7368 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_install_ilmimf.patch @@ -0,0 +1,19 @@ +diff --git a/OpenEXR/IlmImf/CMakeLists.txt b/OpenEXR/IlmImf/CMakeLists.txt +index e1a8740..d31cf68 100644 +--- a/OpenEXR/IlmImf/CMakeLists.txt ++++ b/OpenEXR/IlmImf/CMakeLists.txt +@@ -2,14 +2,6 @@ + + SET(CMAKE_INCLUDE_CURRENT_DIR 1) + +-IF (WIN32) +- SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/bin) +- SET(WORKING_DIR ${RUNTIME_DIR}) +-ELSE () +- SET(RUNTIME_DIR ${OPENEXR_PACKAGE_PREFIX}/lib) +- SET(WORKING_DIR .) +-ENDIF () +- + SET(BUILD_B44EXPLOGTABLE OFF) + IF (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h") + SET(BUILD_B44EXPLOGTABLE ON) diff --git a/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_linux_static_library_names.patch b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_linux_static_library_names.patch new file mode 100644 index 0000000000..e7a41daa7e --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/fix_linux_static_library_names.patch @@ -0,0 +1,109 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b06d97e..ad360f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,10 +53,13 @@ endif() + if (WIN32 AND OPENEXR_BUILD_ILMBASE AND OPENEXR_BUILD_OPENEXR AND OPENEXR_BUILD_SHARED) + # necessary for building dwa lookup tables, and b44log tables on windows + set(BUILD_ILMBASE_STATIC ON) ++ set(OPENEXR_STATIC_SUFFIX "_s") + elseif (OPENEXR_BUILD_ILMBASE AND OPENEXR_BUILD_STATIC) + set(BUILD_ILMBASE_STATIC ON) ++ set(OPENEXR_STATIC_SUFFIX "") + else() + set(BUILD_ILMBASE_STATIC OFF) ++ set(OPENEXR_STATIC_SUFFIX "") + endif() + + if (NOT OPENEXR_BUILD_SHARED) +diff --git a/IlmBase/Half/CMakeLists.txt b/IlmBase/Half/CMakeLists.txt +index 3d24cd7..d92aa67 100644 +--- a/IlmBase/Half/CMakeLists.txt ++++ b/IlmBase/Half/CMakeLists.txt +@@ -60,7 +60,7 @@ IF (BUILD_ILMBASE_STATIC) + SET_TARGET_PROPERTIES ( Half_static + PROPERTIES + VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH} +- OUTPUT_NAME "Half${ILMBASE_LIBSUFFIX}_s" ++ OUTPUT_NAME "Half${ILMBASE_LIBSUFFIX}${OPENEXR_STATIC_SUFFIX}" + ) + + ADD_DEPENDENCIES ( Half_static toFloat eLut ) +diff --git a/IlmBase/Iex/CMakeLists.txt b/IlmBase/Iex/CMakeLists.txt +index 847518c..9425430 100644 +--- a/IlmBase/Iex/CMakeLists.txt ++++ b/IlmBase/Iex/CMakeLists.txt +@@ -34,7 +34,7 @@ IF (BUILD_ILMBASE_STATIC) + SET_TARGET_PROPERTIES ( Iex_static + PROPERTIES + VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH} +- OUTPUT_NAME "Iex${ILMBASE_LIBSUFFIX}_s" ++ OUTPUT_NAME "Iex${ILMBASE_LIBSUFFIX}${OPENEXR_STATIC_SUFFIX}" + ) + ENDIF() + +diff --git a/IlmBase/IexMath/CMakeLists.txt b/IlmBase/IexMath/CMakeLists.txt +index 472fd33..1427fa8 100644 +--- a/IlmBase/IexMath/CMakeLists.txt ++++ b/IlmBase/IexMath/CMakeLists.txt +@@ -36,7 +36,7 @@ IF (BUILD_ILMBASE_STATIC) + SET_TARGET_PROPERTIES ( IexMath_static + PROPERTIES + VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH} +- OUTPUT_NAME "IexMath${ILMBASE_LIBSUFFIX}_s" ++ OUTPUT_NAME "IexMath${ILMBASE_LIBSUFFIX}${OPENEXR_STATIC_SUFFIX}" + ) + ENDIF( ) + +diff --git a/IlmBase/IlmThread/CMakeLists.txt b/IlmBase/IlmThread/CMakeLists.txt +index 3a24823..b281916 100644 +--- a/IlmBase/IlmThread/CMakeLists.txt ++++ b/IlmBase/IlmThread/CMakeLists.txt +@@ -49,7 +49,7 @@ IF (BUILD_ILMBASE_STATIC) + SET_TARGET_PROPERTIES ( IlmThread_static + PROPERTIES + VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH} +- OUTPUT_NAME "IlmThread${ILMBASE_LIBSUFFIX}_s" ++ OUTPUT_NAME "IlmThread${ILMBASE_LIBSUFFIX}${OPENEXR_STATIC_SUFFIX}" + ) + ENDIF () + +diff --git a/IlmBase/Imath/CMakeLists.txt b/IlmBase/Imath/CMakeLists.txt +index 8faa97a..bf29000 100644 +--- a/IlmBase/Imath/CMakeLists.txt ++++ b/IlmBase/Imath/CMakeLists.txt +@@ -37,7 +37,7 @@ IF (BUILD_ILMBASE_STATIC) + SET_TARGET_PROPERTIES ( Imath_static + PROPERTIES + VERSION ${ILMBASE_VERSION_MAJOR}.${ILMBASE_VERSION_MINOR}.${ILMBASE_VERSION_PATCH} +- OUTPUT_NAME "Imath${ILMBASE_LIBSUFFIX}_s" ++ OUTPUT_NAME "Imath${ILMBASE_LIBSUFFIX}${OPENEXR_STATIC_SUFFIX}" + ) + ENDIF () + +diff --git a/OpenEXR/IlmImf/CMakeLists.txt b/OpenEXR/IlmImf/CMakeLists.txt +index d31cf68..52c2b6e 100644 +--- a/OpenEXR/IlmImf/CMakeLists.txt ++++ b/OpenEXR/IlmImf/CMakeLists.txt +@@ -226,7 +226,7 @@ IF (OPENEXR_BUILD_STATIC) + SET_TARGET_PROPERTIES ( IlmImf_static + PROPERTIES + VERSION ${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR}.${OPENEXR_VERSION_PATCH} +- OUTPUT_NAME "IlmImf${OPENEXR_LIBSUFFIX}_s" ++ OUTPUT_NAME "IlmImf${OPENEXR_LIBSUFFIX}${OPENEXR_STATIC_SUFFIX}" + ) + SET_ILMBASE_INCLUDE_DIRS(IlmImf_static) + +diff --git a/OpenEXR/IlmImfUtil/CMakeLists.txt b/OpenEXR/IlmImfUtil/CMakeLists.txt +index 4cc53de..26df90e 100644 +--- a/OpenEXR/IlmImfUtil/CMakeLists.txt ++++ b/OpenEXR/IlmImfUtil/CMakeLists.txt +@@ -60,7 +60,7 @@ IF ( OPENEXR_BUILD_STATIC ) + PROPERTIES + VERSION ${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR}.${OPENEXR_VERSION_PATCH} + SOVERSION ${OPENEXR_SOVERSION} +- OUTPUT_NAME "IlmImfUtil${OPENEXR_LIBSUFFIX}_s" ++ OUTPUT_NAME "IlmImfUtil${OPENEXR_LIBSUFFIX}${OPENEXR_STATIC_SUFFIX}" + ) + ENDIF() + diff --git a/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/portfile.cmake new file mode 100644 index 0000000000..31b0582ed4 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/portfile.cmake @@ -0,0 +1,73 @@ +include(vcpkg_common_functions) + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP build not supported") +endif() + +set(OPENEXR_VERSION 2.3.0) +set(OPENEXR_HASH 268ae64b40d21d662f405fba97c307dad1456b7d996a447aadafd41b640ca736d4851d9544b4741a94e7b7c335fe6e9d3b16180e710671abfc0c8b2740b147b2) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openexr/openexr + REF v${OPENEXR_VERSION} + SHA512 ${OPENEXR_HASH} + HEAD_REF master + PATCHES + fix_clang_not_setting_modern_cplusplus.patch + fix_install_ilmimf.patch + fix_linux_static_library_names.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" OPENEXR_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OPENEXR_BUILD_SHARED) + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPENEXR_BUILD_PYTHON_LIBS:BOOL=FALSE + -DOPENEXR_BUILD_STATIC=${OPENEXR_BUILD_STATIC} + -DOPENEXR_BUILD_SHARED=${OPENEXR_BUILD_SHARED} + OPTIONS_DEBUG + -DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}/debug + OPTIONS_RELEASE + -DILMBASE_PACKAGE_PREFIX=${CURRENT_INSTALLED_DIR}) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# NOTE: Only use ".exe" extension on Windows executables. +# Is there a cleaner way to do this? +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrenvmap${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrheader${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmakepreview${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmaketiled${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultipart${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultiview${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrstdattr${EXECUTABLE_SUFFIX}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openexr/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrenvmap${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrenvmap${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrheader${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrheader${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmakepreview${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmakepreview${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmaketiled${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmaketiled${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultipart${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultipart${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultiview${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultiview${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrstdattr${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrstdattr${EXECUTABLE_SUFFIX}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openexr) + +vcpkg_copy_pdbs() + +if (VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOpenEXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/vcpkg-cmake-wrapper.cmake b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000000..a977a420e8 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/openexr/2.3.0-5/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +set(OPENEXR_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +if(NOT OpenEXR_LIBRARIES OR OPENEXR_LIBRARIES) + _find_package(${ARGS}) +endif() + +set(CMAKE_MODULE_PATH ${OPENEXR_PREV_MODULE_PATH}) diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/CONTROL b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/CONTROL new file mode 100644 index 0000000000..6c442ec7f3 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/CONTROL @@ -0,0 +1,4 @@ +Source: sdl1 +Version: 1.2.15-12 +Homepage: https://www.libsdl.org +Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL1_2017.sln b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL1_2017.sln new file mode 100644 index 0000000000..811f89448a --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL1_2017.sln @@ -0,0 +1,65 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2003 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release_NoSTDIO|ARM64 = Release_NoSTDIO|ARM64 + Release_NoSTDIO|Win32 = Release_NoSTDIO|Win32 + Release_NoSTDIO|x64 = Release_NoSTDIO|x64 + Release|ARM64 = Release|ARM64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.Build.0 = Debug|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.Build.0 = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.Build.0 = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.Build.0 = Debug|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.ActiveCfg = Release_NoSTDIO|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.Build.0 = Release_NoSTDIO|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.ActiveCfg = Release|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.Build.0 = Release|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D0FB7C52-B8AE-4A23-A002-2F7DEF5F6BD6} + EndGlobalSection +EndGlobal diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL_dynamic.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL_dynamic.vcxproj new file mode 100644 index 0000000000..959daf56d9 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL_dynamic.vcxproj @@ -0,0 +1,462 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL_static.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL_static.vcxproj new file mode 100644 index 0000000000..b4098d8080 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDL_static.vcxproj @@ -0,0 +1,354 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDebug + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDebug + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDLmain_dynamic.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDLmain_dynamic.vcxproj new file mode 100644 index 0000000000..12288800cf --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDLmain_dynamic.vcxproj @@ -0,0 +1,313 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + ARM64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + \ No newline at end of file diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDLmain_static.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDLmain_static.vcxproj new file mode 100644 index 0000000000..0cf95e85e2 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/SDLmain_static.vcxproj @@ -0,0 +1,215 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebug + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebug + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + \ No newline at end of file diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/export-symbols-only-in-shared-build.patch b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/export-symbols-only-in-shared-build.patch new file mode 100644 index 0000000000..c1ea96dc3b --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/export-symbols-only-in-shared-build.patch @@ -0,0 +1,15 @@ +diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h +--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700 ++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300 +@@ -54,8 +54,10 @@ + # else + # define DECLSPEC __declspec(dllimport) + # endif ++# elif defined(_DLL) ++# define DECLSPEC __declspec(dllexport) + # else +-# define DECLSPEC __declspec(dllexport) ++# define DECLSPEC + # endif + # elif defined(__OS2__) + # ifdef __WATCOMC__ diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/fix-linux-build.patch b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/fix-linux-build.patch new file mode 100644 index 0000000000..f6ad36c2d6 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/fix-linux-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h +index 4875b98..10bf365 100644 +--- a/src/video/x11/SDL_x11sym.h ++++ b/src/video/x11/SDL_x11sym.h +@@ -165,7 +165,7 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return) + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) +-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++SDL_X11_SYM(int,_XData32,(Display *dpy,_Xconst register long *data,unsigned len),(dpy,data,len),return) + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif + diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/portfile.cmake new file mode 100644 index 0000000000..6dd7da6876 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-12/portfile.cmake @@ -0,0 +1,74 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SDL-Mirror/SDL + REF release-1.2.15 + SHA512 38b94a650ec205377ae1503d0ec8a5254ef6d50ed0acac8d985b57b64bc16ea042cfa41e19e5ef8317980c4afb83186829f5bc3da9433d0a649dfd10554801b5 + HEAD_REF master + PATCHES + export-symbols-only-in-shared-build.patch + fix-linux-build.patch +) + +configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY) + + +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL1_2017.sln DESTINATION ${SOURCE_PATH}/VisualC/ ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDL_static.vcxproj ${SOURCE_PATH}/VisualC/SDL/SDL.vcxproj COPYONLY) + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDLmain_static.vcxproj ${SOURCE_PATH}/VisualC/SDLmain/SDLmain.vcxproj COPYONLY) + else() + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDL_dynamic.vcxproj ${SOURCE_PATH}/VisualC/SDL/SDL.vcxproj COPYONLY) + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDLmain_dynamic.vcxproj ${SOURCE_PATH}/VisualC/SDLmain/SDLmain.vcxproj COPYONLY) + endif() + + # This text file gets copied as a library, and included as one in the package + file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB) + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH VisualC/SDL1_2017.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + ALLOW_ROOT_INCLUDES + ) + + #Take all the fils into include/SDL to sovle conflict with SDL2 port + file(GLOB files ${CURRENT_PACKAGES_DIR}/include/*) + foreach(file ${files}) + file(COPY ${file} DESTINATION ${CURRENT_PACKAGES_DIR}/include/SDL) + file(REMOVE ${file}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/SDL/doxyfile) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDLmain.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDLmaind.lib) + endif() +else() + message("libgles2-mesa-dev must be installed before sdl1 can build. Install it with \"apt install libgles2-mesa-dev\".") + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig(IGNORE_FLAGS -Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib + -Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib + SYSTEM_LIBRARIES pthread) + + file(GLOB SDL1_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") + foreach (SDL1_TOOL ${SDL1_TOOLS}) + file(COPY ${SDL1_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${SDL1_TOOL}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() \ No newline at end of file diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/CONTROL b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/CONTROL new file mode 100644 index 0000000000..808fef451a --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/CONTROL @@ -0,0 +1,3 @@ +Source: sdl1 +Version: 1.2.15-9 +Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL1_2017.sln b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL1_2017.sln new file mode 100644 index 0000000000..811f89448a --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL1_2017.sln @@ -0,0 +1,65 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2003 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release_NoSTDIO|ARM64 = Release_NoSTDIO|ARM64 + Release_NoSTDIO|Win32 = Release_NoSTDIO|Win32 + Release_NoSTDIO|x64 = Release_NoSTDIO|x64 + Release|ARM64 = Release|ARM64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.Build.0 = Debug|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.Build.0 = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.Build.0 = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.Build.0 = Debug|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.ActiveCfg = Release_NoSTDIO|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.Build.0 = Release_NoSTDIO|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.ActiveCfg = Release|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.Build.0 = Release|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D0FB7C52-B8AE-4A23-A002-2F7DEF5F6BD6} + EndGlobalSection +EndGlobal diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL_dynamic.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL_dynamic.vcxproj new file mode 100644 index 0000000000..959daf56d9 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL_dynamic.vcxproj @@ -0,0 +1,462 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL_static.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL_static.vcxproj new file mode 100644 index 0000000000..95644e6bb2 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDL_static.vcxproj @@ -0,0 +1,354 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDebug + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDebug + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDLmain_dynamic.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDLmain_dynamic.vcxproj new file mode 100644 index 0000000000..f0a42a4022 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDLmain_dynamic.vcxproj @@ -0,0 +1,313 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + ARM64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDLmain_static.vcxproj b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDLmain_static.vcxproj new file mode 100644 index 0000000000..65a58fe5d1 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/SDLmain_static.vcxproj @@ -0,0 +1,215 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebug + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebug + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/export-symbols-only-in-shared-build.patch b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/export-symbols-only-in-shared-build.patch new file mode 100644 index 0000000000..c1ea96dc3b --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/export-symbols-only-in-shared-build.patch @@ -0,0 +1,15 @@ +diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h +--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700 ++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300 +@@ -54,8 +54,10 @@ + # else + # define DECLSPEC __declspec(dllimport) + # endif ++# elif defined(_DLL) ++# define DECLSPEC __declspec(dllexport) + # else +-# define DECLSPEC __declspec(dllexport) ++# define DECLSPEC + # endif + # elif defined(__OS2__) + # ifdef __WATCOMC__ diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/fix-linux-build.patch b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/fix-linux-build.patch new file mode 100644 index 0000000000..f6ad36c2d6 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/fix-linux-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h +index 4875b98..10bf365 100644 +--- a/src/video/x11/SDL_x11sym.h ++++ b/src/video/x11/SDL_x11sym.h +@@ -165,7 +165,7 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return) + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) +-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++SDL_X11_SYM(int,_XData32,(Display *dpy,_Xconst register long *data,unsigned len),(dpy,data,len),return) + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif + diff --git a/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/portfile.cmake new file mode 100644 index 0000000000..e69048945c --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/sdl1/1.2.15-9_mine/portfile.cmake @@ -0,0 +1,86 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SDL-Mirror/SDL + REF release-1.2.15 + SHA512 38b94a650ec205377ae1503d0ec8a5254ef6d50ed0acac8d985b57b64bc16ea042cfa41e19e5ef8317980c4afb83186829f5bc3da9433d0a649dfd10554801b5 + HEAD_REF master + PATCHES + export-symbols-only-in-shared-build.patch + fix-linux-build.patch +) + +configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY) + + +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL1_2017.sln DESTINATION ${SOURCE_PATH}/VisualC/ ) + + #~ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + #~ file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDL_static.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDL RENAME SDL.vcxproj) + #~ file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDLmain_static.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDLmain RENAME SDLmain.vcxproj) + #~ else() + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDL_dynamic.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDL RENAME SDL.vcxproj) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/SDLmain_dynamic.vcxproj DESTINATION ${SOURCE_PATH}/VisualC/SDLmain RENAME SDLmain.vcxproj) + #~ endif() + + # This text file gets copied as a library, and included as one in the package + file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB) + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH VisualC/SDL1_2017.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + ALLOW_ROOT_INCLUDES + ) + + #Take all the fils into include/SDL to sovle conflict with SDL2 port + file(GLOB files ${CURRENT_PACKAGES_DIR}/include/*) + foreach(file ${files}) + file(COPY ${file} DESTINATION ${CURRENT_PACKAGES_DIR}/include/SDL) + file(REMOVE ${file}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/SDL/doxyfile) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDLmain.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDLmaind.lib) + endif() +else() + message("libgles2-mesa-dev must be installed before sdl1 can build. Install it with \"apt install libgles2-mesa-dev\".") + + #~ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED yes) + set(BUILD_STATIC no) + #~ else() + #~ set(BUILD_SHARED no) + #~ set(BUILD_STATIC yes) + #~ endif() + + file(REMOVE_RECURSE ${SOURCE_PATH}/m4) + file(MAKE_DIRECTORY ${SOURCE_PATH}/m4) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + NO_DEBUG + PRERUN_SHELL autogen.sh + OPTIONS + --enable-shared=${BUILD_SHARED} + --enable-static=${BUILD_STATIC} + ) + + vcpkg_install_make() + + file(GLOB SDL1_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") + foreach (SDL1_TOOL ${SDL1_TOOLS}) + file(COPY ${SDL1_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${SDL1_TOOL}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/CONTROL b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/CONTROL new file mode 100644 index 0000000000..270455ca26 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/CONTROL @@ -0,0 +1,8 @@ +Source: tiff +Version: 4.0.10-8 +Build-Depends: zlib, libjpeg-turbo, liblzma +Homepage: https://download.osgeo.org/libtiff +Description: A library that supports the manipulation of TIFF image files + +Feature: tool +Description: Build tools diff --git a/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/cmakelists.patch b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/cmakelists.patch new file mode 100644 index 0000000000..597c980c55 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/cmakelists.patch @@ -0,0 +1,99 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 845ddf0..9ccb9b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -181,9 +181,7 @@ foreach(flag ${test_flags}) + endif (${test_c_flag}) + endforeach(flag ${test_flags}) + +-if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") +-endif() ++set(CMAKE_DEBUG_POSTFIX "d") + + option(ld-version-script "Enable linker version script" ON) + # Check if LD supports linker scripts. +@@ -601,12 +599,15 @@ check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H) + check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H) + + # Win32 IO +-set(win32_io FALSE) +-if(WIN32) +- set(win32_io TRUE) ++set(USE_WIN32_FILEIO FALSE CACHE BOOL "") ++if(MSVC) ++ if (NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") #on UWP we use the unix I/O api ++ set(USE_WIN32_FILEIO TRUE CACHE BOOL "" FORCE) ++ add_definitions(-DUSE_WIN32_FILEIO) ++ endif() ++ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS /wd4996) + endif() + +-set(USE_WIN32_FILEIO ${win32_io}) + + # Orthogonal features + +@@ -708,16 +709,28 @@ endif() + + #report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS) + ++option(BUILD_TOOLS "Build tool executables" ON) ++option(BUILD_DOCS "Build docs" ON) ++option(BUILD_CONTRIB "Build contributed executables" ON) ++option(BUILD_TESTS "Build tests" ON) ++ + # Process subdirectories + add_subdirectory(port) + add_subdirectory(libtiff) +-add_subdirectory(tools) +-add_subdirectory(test) +-add_subdirectory(contrib) +-add_subdirectory(build) +-add_subdirectory(man) +-add_subdirectory(html) +- ++if(BUILD_TOOLS) ++ add_subdirectory(tools) ++endif() ++if(BUILD_TESTS) ++ add_subdirectory(test) ++endif() ++if(BUILD_CONTRIB) ++ add_subdirectory(contrib) ++endif() ++if(BUILD_DOCS) ++ add_subdirectory(build) ++ add_subdirectory(man) ++ add_subdirectory(html) ++endif() + #message(STATUS "EXTRA_DIST: ${EXTRA_DIST}") + + message(STATUS "") +diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt +index 1cf1b75..4ee29f6 100644 +--- a/libtiff/CMakeLists.txt ++++ b/libtiff/CMakeLists.txt +@@ -104,11 +104,11 @@ set(tiffxx_HEADERS + set(tiffxx_SOURCES + tif_stream.cxx) + +-if(WIN32_IO) +- extra_dist(tif_unix.c) ++if(USE_WIN32_FILEIO) ++ extra_dist(tif_win32.c) + list(APPEND tiff_SOURCES tif_win32.c) + else() +- extra_dist(tif_win32.c) ++ extra_dist(tif_unix.c) + list(APPEND tiff_SOURCES tif_unix.c) + endif() + +@@ -143,7 +143,7 @@ install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS} + DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + + if(CXX_SUPPORT) +- add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS}) ++ add_library(tiffxx STATIC ${tiffxx_SOURCES} ${tiffxx_HEADERS}) + target_link_libraries(tiffxx tiff) + set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) + if(NOT CYGWIN) diff --git a/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/fix-stddef.patch b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/fix-stddef.patch new file mode 100644 index 0000000000..a9c2ddf0b0 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/fix-stddef.patch @@ -0,0 +1,13 @@ +diff --git a/port/lfind.c port/lfind.c +index 087dfa9..20fa8b4 100644 +--- a/port/lfind.c ++++ b/port/lfind.c +@@ -38,7 +38,7 @@ + #ifdef _WIN32_WCE + # include + #else +-# include ++# include + #endif + + #ifndef NULL diff --git a/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/portfile.cmake b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/portfile.cmake new file mode 100644 index 0000000000..d09aa10efc --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) + +set(LIBTIFF_VERSION 4.0.10) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz" + FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz" + SHA512 d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBTIFF_VERSION} + PATCHES + fix-stddef.patch + cmakelists.patch +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set (TIFF_CXX_TARGET -Dcxx=OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_DOCS=OFF + -DBUILD_CONTRIB=OFF + -DBUILD_TESTS=OFF + -Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing. + -Djpeg12=OFF + -Dwebp=OFF + -Dzstd=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON + -DCMAKE_DISABLE_FIND_PACKAGE_GLUT=ON + ${TIFF_CXX_TARGET} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share +) + + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff RENAME copyright) + +if ("tool" IN_LIST FEATURES) + file(GLOB TIFF_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(INSTALL ${TIFF_TOOLS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE ${TIFF_TOOLS}) + file(GLOB TIFF_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${TIFF_TOOLS}) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +endif() + +vcpkg_copy_pdbs() diff --git a/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/vcpkg-cmake-wrapper.cmake b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000000..a35deceee5 --- /dev/null +++ b/contrib/cmake/vcpkg_extra_ports/tiff/4.0.10-8/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,23 @@ +_find_package(${ARGS}) + +find_package(LibLZMA CONFIG) +find_package(JPEG) +find_package(ZLIB) +if(TARGET TIFF::TIFF) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA JPEG::JPEG ZLIB::ZLIB) + if(UNIX) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m) + endif() +endif() +if(TIFF_LIBRARIES) + list(APPEND TIFF_LIBRARIES ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(UNIX) + list(APPEND TIFF_LIBRARIES m) + endif() +endif() +if(TIFF_LIBRARY) + list(APPEND TIFF_LIBRARY ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(UNIX) + list(APPEND TIFF_LIBRARY m) + endif() +endif() diff --git a/contrib/cmake/vcpkg_extra_triplets/x64-windows-mega.cmake b/contrib/cmake/vcpkg_extra_triplets/x64-windows-mega.cmake index 982eda0bce..61799f3ef8 100644 --- a/contrib/cmake/vcpkg_extra_triplets/x64-windows-mega.cmake +++ b/contrib/cmake/vcpkg_extra_triplets/x64-windows-mega.cmake @@ -17,6 +17,7 @@ set(VCPKG_CRT_LINKAGE dynamic) if(PORT MATCHES "ffmpeg" OR PORT MATCHES "openssl" OR PORT MATCHES "curl" OR + PORT MATCHES "sdl1" OR PORT MATCHES "c-ares") # build this library as DLL (usually because it is LGPL licensed) set(VCPKG_LIBRARY_LINKAGE dynamic)