Techt3o commited on
Commit
29a52d6
·
verified ·
1 Parent(s): 775e27e

d5063f977d34a1cca71c2316efefcc131e813744a074d9d85cdaec4f23302827

Browse files
Files changed (50) hide show
  1. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libuvc/vcpkg.json +21 -0
  2. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/CMakeLists.txt +84 -0
  3. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/Config.cmake.in +4 -0
  4. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/portfile.cmake +32 -0
  5. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/vcpkg.json +12 -0
  6. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/0001-Dont-export-vorbisenc-functions.patch +16 -0
  7. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch +15 -0
  8. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/0003-def-mingw-compat.patch +33 -0
  9. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/portfile.cmake +25 -0
  10. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/usage +13 -0
  11. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/vcpkg.json +19 -0
  12. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch +21 -0
  13. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/0003-add-uwp-and-v142-support.patch +154 -0
  14. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/0004-remove-library-suffixes.patch +13 -0
  15. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/portfile.cmake +281 -0
  16. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/unofficial-libvpx-config.cmake.in +49 -0
  17. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/vcpkg.json +15 -0
  18. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/vpx.pc.in +13 -0
  19. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/configure.lib.patch +105 -0
  20. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/configure.patch +14 -0
  21. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/curl.patch +22 -0
  22. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/openssl.patch +22 -0
  23. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/portfile.cmake +36 -0
  24. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/vcpkg.json +19 -0
  25. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebm/Fix-cmake.patch +96 -0
  26. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebm/portfile.cmake +33 -0
  27. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebm/vcpkg.json +17 -0
  28. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0001-build.patch +45 -0
  29. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch +69 -0
  30. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0003-always-mux.patch +13 -0
  31. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0004-add-missing-linked-library.patch +15 -0
  32. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0006-fix-dependecies-platform.patch +17 -0
  33. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0007-fix-arm-build.patch +13 -0
  34. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0008-sdl.patch +37 -0
  35. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0009-glut.patch +23 -0
  36. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/portfile.cmake +96 -0
  37. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/vcpkg.json +155 -0
  38. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/export-include-path.patch +37 -0
  39. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/fix-build-error.patch +25 -0
  40. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/fix-dependency-libuv.patch +13 -0
  41. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/fix-find-openssl.patch +11 -0
  42. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/portfile.cmake +191 -0
  43. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/vcpkg.json +25 -0
  44. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxdiff/portfile.cmake +43 -0
  45. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxdiff/vcpkg.json +8 -0
  46. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxlsxwriter/portfile.cmake +28 -0
  47. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxlsxwriter/vcpkg.json +13 -0
  48. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxml2/fix-uwp.patch +12 -0
  49. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxml2/fix_cmakelist.patch +119 -0
  50. third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxml2/portfile.cmake +94 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libuvc/vcpkg.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libuvc",
3
+ "version-date": "2020-11-24",
4
+ "port-version": 3,
5
+ "description": "a cross-platform library for USB video devices",
6
+ "homepage": "https://github.com/libuvc/libuvc",
7
+ "supports": "linux",
8
+ "dependencies": [
9
+ "libjpeg-turbo",
10
+ "libusb",
11
+ "libusb",
12
+ {
13
+ "name": "vcpkg-cmake",
14
+ "host": true
15
+ },
16
+ {
17
+ "name": "vcpkg-cmake-config",
18
+ "host": true
19
+ }
20
+ ]
21
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/CMakeLists.txt ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.12)
2
+
3
+ project(libvmdk C)
4
+
5
+ find_package(ZLIB REQUIRED)
6
+
7
+ if(MSVC)
8
+ add_compile_definitions(_CRT_SECURE_NO_DEPRECATE)
9
+ add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE)
10
+ endif()
11
+
12
+ add_compile_definitions(HAVE_LOCAL_LIBCAES)
13
+ add_compile_definitions(HAVE_LOCAL_LIBCERROR)
14
+ add_compile_definitions(HAVE_LOCAL_LIBCTHREADS)
15
+ add_compile_definitions(HAVE_LOCAL_LIBCDATA)
16
+ add_compile_definitions(HAVE_LOCAL_LIBCLOCALE)
17
+ add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY)
18
+ add_compile_definitions(HAVE_LOCAL_LIBCSPLIT)
19
+ add_compile_definitions(HAVE_LOCAL_LIBCFILE)
20
+ add_compile_definitions(HAVE_LOCAL_LIBCPATH)
21
+ add_compile_definitions(HAVE_LOCAL_LIBUNA)
22
+ add_compile_definitions(HAVE_LOCAL_LIBBFIO)
23
+ add_compile_definitions(HAVE_LOCAL_LIBFCACHE)
24
+ add_compile_definitions(HAVE_LOCAL_LIBFDATA)
25
+ add_compile_definitions(HAVE_LOCAL_LIBFVALUE)
26
+ add_compile_definitions(ZLIB_DLL)
27
+
28
+ if(UNIX)
29
+ configure_file(common/config.h.in common/config.h)
30
+ add_compile_definitions(HAVE_CONFIG_H)
31
+ add_compile_definitions(LOCALEDIR="/usr/share/locale")
32
+ endif()
33
+
34
+ if(MSVC)
35
+ add_compile_definitions(LIBVMDK_DLL_EXPORT)
36
+ set(LIB_RC libvmdk/libvmdk.rc)
37
+ endif()
38
+
39
+
40
+ include(GNUInstallDirs)
41
+ include(CMakePackageConfigHelpers)
42
+
43
+ # Add CMake find_package() integration
44
+ set(PROJECT_TARGET_NAME "${PROJECT_NAME}")
45
+ set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
46
+ set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake")
47
+ set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets")
48
+ set(NAMESPACE "libvmdk::")
49
+
50
+ # Source files
51
+ file(GLOB LIB_SRC lib*/*.c)
52
+
53
+ # Headers
54
+ file(GLOB LIB_INST_HEADERS include/libvmdk/*.h)
55
+
56
+ add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC})
57
+
58
+ target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common)
59
+ target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcdata ./libcerror ./libcfile ./libclocale)
60
+ target_include_directories(${PROJECT_NAME} PRIVATE ./libcnotify ./libcpath ./libcsplit ./libcthreads)
61
+ target_include_directories(${PROJECT_NAME} PRIVATE ./libfcache ./libfdata ./libfvalue ./libuna)
62
+
63
+ target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB)
64
+
65
+ install(TARGETS ${PROJECT_NAME}
66
+ EXPORT ${TARGETS_EXPORT_NAME}
67
+ RUNTIME DESTINATION bin
68
+ LIBRARY DESTINATION lib
69
+ ARCHIVE DESTINATION lib
70
+ INCLUDES DESTINATION include)
71
+
72
+ install(FILES ${LIB_INST_HEADERS} DESTINATION include/libvmdk)
73
+ install(FILES include/libvmdk.h DESTINATION include)
74
+
75
+
76
+ # Generate and install libvmdkConfig.cmake
77
+ configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}")
78
+ install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}")
79
+
80
+ # Generate and install libvmdkTargets*.cmake
81
+ install(EXPORT ${TARGETS_EXPORT_NAME}
82
+ NAMESPACE ${NAMESPACE}
83
+ DESTINATION "${CONFIG_INSTALL_DIR}")
84
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/Config.cmake.in ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ @PACKAGE_INIT@
2
+
3
+ include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
4
+ check_required_components("@PROJECT_NAME@")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/portfile.cmake ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(LIB_VERSION 20200926)
2
+ set(LIB_FILENAME libvmdk-alpha-${LIB_VERSION}.tar.gz)
3
+
4
+ vcpkg_download_distfile(ARCHIVE
5
+ URLS "https://github.com/libyal/libvmdk/releases/download/${LIB_VERSION}/${LIB_FILENAME}"
6
+ FILENAME "${LIB_FILENAME}"
7
+ SHA512 e70c42580dc58ad0a6459fe461504a8ef128f8d5df9d500f84f316e627232606f22eb4906fc1debc3e75e71daa6a07951af80822695de13d5e466adda4cfd5e0
8
+ )
9
+
10
+ vcpkg_extract_source_archive_ex(
11
+ OUT_SOURCE_PATH SOURCE_PATH
12
+ ARCHIVE ${ARCHIVE}
13
+ REF ${LIB_VERSION}
14
+ )
15
+
16
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
17
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}")
18
+
19
+ vcpkg_configure_cmake(
20
+ SOURCE_PATH ${SOURCE_PATH}
21
+ PREFER_NINJA
22
+ )
23
+
24
+ vcpkg_install_cmake()
25
+
26
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libvmdk" TARGET_PATH "share/libvmdk")
27
+
28
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
29
+
30
+ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
31
+
32
+ vcpkg_copy_pdbs()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvmdk/vcpkg.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libvmdk",
3
+ "version-string": "20200926",
4
+ "port-version": 2,
5
+ "description": "Library and tools to access the VMware Virtual Disk (VMDK) format",
6
+ "homepage": "https://github.com/libyal/libvmdk",
7
+ "supports": "!uwp",
8
+ "dependencies": [
9
+ "gettext",
10
+ "zlib"
11
+ ]
12
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/0001-Dont-export-vorbisenc-functions.patch ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/win32/vorbis.def b/win32/vorbis.def
2
+ index 9cca64d..a80fff7 100644
3
+ --- a/win32/vorbis.def
4
+ +++ b/win32/vorbis.def
5
+ @@ -49,11 +49,4 @@ vorbis_synthesis_idheader
6
+ ;
7
+ vorbis_window
8
+ ;_analysis_output_always
9
+ -vorbis_encode_init
10
+ -vorbis_encode_setup_managed
11
+ -vorbis_encode_setup_vbr
12
+ -vorbis_encode_init_vbr
13
+ -vorbis_encode_setup_init
14
+ -vorbis_encode_ctl
15
+ -;
16
+ vorbis_version_string
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index f377c428..07530304 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
6
+ # Find math library
7
+
8
+ check_library_exists(m floor "" HAVE_LIBM)
9
+ +if(HAVE_LIBM)
10
+ + set(VORBIS_LIBS "-lm")
11
+ +endif()
12
+
13
+ # Find ogg dependency
14
+ find_package(Ogg REQUIRED)
15
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/0003-def-mingw-compat.patch ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/win32/vorbis.def b/win32/vorbis.def
2
+ index 1310b6c..de14385 100644
3
+ --- a/win32/vorbis.def
4
+ +++ b/win32/vorbis.def
5
+ @@ -1,6 +1,5 @@
6
+ ; vorbis.def
7
+ ;
8
+ -LIBRARY
9
+ EXPORTS
10
+ _floor_P
11
+ _mapping_P
12
+ diff --git a/win32/vorbisenc.def b/win32/vorbisenc.def
13
+ index 79af064..40a3e39 100644
14
+ --- a/win32/vorbisenc.def
15
+ +++ b/win32/vorbisenc.def
16
+ @@ -1,6 +1,5 @@
17
+ ; vorbisenc.def
18
+ ;
19
+ -LIBRARY
20
+
21
+ EXPORTS
22
+ vorbis_encode_init
23
+ diff --git a/win32/vorbisfile.def b/win32/vorbisfile.def
24
+ index 4dc5549..243795d 100644
25
+ --- a/win32/vorbisfile.def
26
+ +++ b/win32/vorbisfile.def
27
+ @@ -1,6 +1,5 @@
28
+ ; vorbisfile.def
29
+ ;
30
+ -LIBRARY
31
+ EXPORTS
32
+ ov_clear
33
+ ov_open
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/portfile.cmake ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO xiph/vorbis
4
+ REF v1.3.7
5
+ SHA512 bfb6f5dbfd49ed38b2b08b3667c06d02e68f649068a050f21a3cc7e1e56b27afd546aaa3199c4f6448f03f6e66a82f9a9dc2241c826d3d1d4acbd38339b9e9fb
6
+ HEAD_REF master
7
+ PATCHES
8
+ 0001-Dont-export-vorbisenc-functions.patch
9
+ 0002-Fixup-pkgconfig-libs.patch
10
+ 0003-def-mingw-compat.patch
11
+ )
12
+
13
+ vcpkg_cmake_configure(
14
+ SOURCE_PATH "${SOURCE_PATH}"
15
+ )
16
+
17
+ vcpkg_cmake_install()
18
+ vcpkg_cmake_config_fixup(PACKAGE_NAME Vorbis CONFIG_PATH "lib/cmake/Vorbis")
19
+ vcpkg_fixup_pkgconfig()
20
+ vcpkg_copy_pdbs()
21
+
22
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
23
+
24
+ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
25
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/usage ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The package libvorbis provides CMake targets:
2
+
3
+ # Vorbis reference encoder and decoder, low-level API
4
+ find_package(Vorbis CONFIG REQUIRED)
5
+ target_link_libraries(main PRIVATE Vorbis::vorbis)
6
+
7
+ # Audio stream decoding and basic manipulation, high-level API
8
+ find_package(Vorbis CONFIG REQUIRED)
9
+ target_link_libraries(main PRIVATE Vorbis::vorbisfile)
10
+
11
+ # Convenience API for setting up an encoding environment
12
+ find_package(Vorbis CONFIG REQUIRED)
13
+ target_link_libraries(main PRIVATE Vorbis::vorbisenc)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvorbis/vcpkg.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libvorbis",
3
+ "version": "1.3.7",
4
+ "port-version": 2,
5
+ "description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format",
6
+ "homepage": "https://github.com/xiph/vorbis",
7
+ "license": "BSD-3-Clause",
8
+ "dependencies": [
9
+ "libogg",
10
+ {
11
+ "name": "vcpkg-cmake",
12
+ "host": true
13
+ },
14
+ {
15
+ "name": "vcpkg-cmake-config",
16
+ "host": true
17
+ }
18
+ ]
19
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/0002-Fix-nasm-debug-format-flag.patch ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/build/make/configure.sh b/build/make/configure.sh
2
+ index 81d30a16c..d4f19cd97 100644
3
+ --- a/build/make/configure.sh
4
+ +++ b/build/make/configure.sh
5
+ @@ -1370,12 +1370,14 @@ EOF
6
+ case ${tgt_os} in
7
+ win32)
8
+ add_asflags -f win32
9
+ - enabled debug && add_asflags -g cv8
10
+ + enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
11
+ + enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
12
+ EXE_SFX=.exe
13
+ ;;
14
+ win64)
15
+ add_asflags -f win64
16
+ - enabled debug && add_asflags -g cv8
17
+ + enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
18
+ + enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
19
+ EXE_SFX=.exe
20
+ ;;
21
+ linux*|solaris*|android*)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/0003-add-uwp-and-v142-support.patch ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/build/make/configure.sh b/build/make/configure.sh
2
+ index d4f19cd97..fb51368b1 100644
3
+ --- a/build/make/configure.sh
4
+ +++ b/build/make/configure.sh
5
+ @@ -1016,7 +1016,7 @@ EOF
6
+ # A number of ARM-based Windows platforms are constrained by their
7
+ # respective SDKs' limitations. Fortunately, these are all 32-bit ABIs
8
+ # and so can be selected as 'win32'.
9
+ - if [ ${tgt_os} = "win32" ]; then
10
+ + if [ ${tgt_os} = "win32" ] || [ ${tgt_isa} = "armv7" ]; then
11
+ asm_conversion_cmd="${source_path_mk}/build/make/ads2armasm_ms.pl"
12
+ AS_SFX=.S
13
+ msvs_arch_dir=arm-msvs
14
+ @@ -1250,6 +1250,9 @@ EOF
15
+ android)
16
+ soft_enable realtime_only
17
+ ;;
18
+ + uwp)
19
+ + enabled gcc && add_cflags -fno-common
20
+ + ;;
21
+ win*)
22
+ enabled gcc && add_cflags -fno-common
23
+ ;;
24
+ @@ -1368,6 +1371,16 @@ EOF
25
+ fi
26
+ AS_SFX=.asm
27
+ case ${tgt_os} in
28
+ + uwp)
29
+ + if [ {$tgt_isa} = "x86" ] || [ {$tgt_isa} = "armv7" ]; then
30
+ + add_asflags -f win32
31
+ + else
32
+ + add_asflags -f win64
33
+ + fi
34
+ + enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
35
+ + enabled debug && [ "${AS}" = nasm ] && add_asflags -gcv8
36
+ + EXE_SFX=.exe
37
+ + ;;
38
+ win32)
39
+ add_asflags -f win32
40
+ enabled debug && [ "${AS}" = yasm ] && add_asflags -g cv8
41
+ @@ -1488,6 +1501,8 @@ EOF
42
+ # Almost every platform uses pthreads.
43
+ if enabled multithread; then
44
+ case ${toolchain} in
45
+ + *-uwp-vs*)
46
+ + ;;
47
+ *-win*-vs*)
48
+ ;;
49
+ *-android-gcc)
50
+ diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
51
+ index 6f91ad478..916851662 100755
52
+ --- a/build/make/gen_msvs_vcxproj.sh
53
+ +++ b/build/make/gen_msvs_vcxproj.sh
54
+ @@ -296,7 +296,22 @@ generate_vcxproj() {
55
+ tag_content ProjectGuid "{${guid}}"
56
+ tag_content RootNamespace ${name}
57
+ tag_content Keyword ManagedCProj
58
+ - if [ $vs_ver -ge 12 ] && [ "${platforms[0]}" = "ARM" ]; then
59
+ + if [ $vs_ver -ge 16 ]; then
60
+ + if [[ $target =~ [^-]*-uwp-.* ]]; then
61
+ + # Universal Windows Applications
62
+ + tag_content AppContainerApplication true
63
+ + tag_content ApplicationType "Windows Store"
64
+ + tag_content ApplicationTypeRevision 10.0
65
+ + fi
66
+ + if [[ $target =~ [^-]*-uwp-.* ]] || [ "${platforms[0]}" = "ARM" ] || [ "${platforms[0]}" = "ARM64" ]; then
67
+ + # Default to the latest Windows 10 SDK
68
+ + tag_content WindowsTargetPlatformVersion 10.0
69
+ + else
70
+ + # Minimum supported version of Windows for the desktop
71
+ + tag_content WindowsTargetPlatformVersion 8.1
72
+ + fi
73
+ + tag_content MinimumVisualStudioVersion 16.0
74
+ + elif [ $vs_ver -ge 12 ] && [ "${platforms[0]}" = "ARM" ]; then
75
+ tag_content AppContainerApplication true
76
+ # The application type can be one of "Windows Store",
77
+ # "Windows Phone" or "Windows Phone Silverlight". The
78
+ @@ -391,7 +406,7 @@ generate_vcxproj() {
79
+ Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'"
80
+ if [ "$name" == "vpx" ]; then
81
+ hostplat=$plat
82
+ - if [ "$hostplat" == "ARM" ]; then
83
+ + if [ "$hostplat" == "ARM" ] && [ $vs_ver -le 15 ]; then
84
+ hostplat=Win32
85
+ fi
86
+ fi
87
+ diff --git a/configure b/configure
88
+ index da631a45e..da93474e5 100755
89
+ --- a/configure
90
+ +++ b/configure
91
+ @@ -101,16 +101,20 @@ all_platforms="${all_platforms} arm64-android-gcc"
92
+ all_platforms="${all_platforms} arm64-darwin-gcc"
93
+ all_platforms="${all_platforms} arm64-darwin20-gcc"
94
+ all_platforms="${all_platforms} arm64-linux-gcc"
95
+ +all_platforms="${all_platforms} arm64-uwp-vs16"
96
+ all_platforms="${all_platforms} arm64-win64-gcc"
97
+ all_platforms="${all_platforms} arm64-win64-vs15"
98
+ +all_platforms="${all_platforms} arm64-win64-vs16"
99
+ all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8
100
+ all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8
101
+ all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8
102
+ all_platforms="${all_platforms} armv7-linux-gcc" #neon Cortex-A8
103
+ all_platforms="${all_platforms} armv7-none-rvct" #neon Cortex-A8
104
+ +all_platforms="${all_platforms} armv7-uwp-vs16"
105
+ all_platforms="${all_platforms} armv7-win32-gcc"
106
+ all_platforms="${all_platforms} armv7-win32-vs14"
107
+ all_platforms="${all_platforms} armv7-win32-vs15"
108
+ +all_platforms="${all_platforms} armv7-win32-vs16"
109
+ all_platforms="${all_platforms} armv7s-darwin-gcc"
110
+ all_platforms="${all_platforms} armv8-linux-gcc"
111
+ all_platforms="${all_platforms} mips32-linux-gcc"
112
+ @@ -135,6 +139,7 @@ all_platforms="${all_platforms} x86-linux-gcc"
113
+ all_platforms="${all_platforms} x86-linux-icc"
114
+ all_platforms="${all_platforms} x86-os2-gcc"
115
+ all_platforms="${all_platforms} x86-solaris-gcc"
116
+ +all_platforms="${all_platforms} x86-uwp-vs16"
117
+ all_platforms="${all_platforms} x86-win32-gcc"
118
+ all_platforms="${all_platforms} x86-win32-vs14"
119
+ all_platforms="${all_platforms} x86-win32-vs15"
120
+ @@ -156,6 +161,7 @@ all_platforms="${all_platforms} x86_64-iphonesimulator-gcc"
121
+ all_platforms="${all_platforms} x86_64-linux-gcc"
122
+ all_platforms="${all_platforms} x86_64-linux-icc"
123
+ all_platforms="${all_platforms} x86_64-solaris-gcc"
124
+ +all_platforms="${all_platforms} x86_64-uwp-vs16"
125
+ all_platforms="${all_platforms} x86_64-win64-gcc"
126
+ all_platforms="${all_platforms} x86_64-win64-vs14"
127
+ all_platforms="${all_platforms} x86_64-win64-vs15"
128
+ @@ -476,11 +482,10 @@ process_targets() {
129
+ ! enabled multithread && DIST_DIR="${DIST_DIR}-nomt"
130
+ ! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs"
131
+ DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}"
132
+ - case "${tgt_os}" in
133
+ - win*) enabled static_msvcrt && DIST_DIR="${DIST_DIR}mt" || DIST_DIR="${DIST_DIR}md"
134
+ - DIST_DIR="${DIST_DIR}-${tgt_cc}"
135
+ - ;;
136
+ - esac
137
+ + if [[ ${tgt_os} =~ win.* ]] || [ "${tgt_os}" = "uwp" ]; then
138
+ + enabled static_msvcrt && DIST_DIR="${DIST_DIR}mt" || DIST_DIR="${DIST_DIR}md"
139
+ + DIST_DIR="${DIST_DIR}-${tgt_cc}"
140
+ + fi
141
+ if [ -f "${source_path}/build/make/version.sh" ]; then
142
+ ver=`"$source_path/build/make/version.sh" --bare "$source_path"`
143
+ DIST_DIR="${DIST_DIR}-${ver}"
144
+ @@ -569,6 +574,10 @@ process_detect() {
145
+
146
+ # Specialize windows and POSIX environments.
147
+ case $toolchain in
148
+ + *-uwp-*)
149
+ + # Don't check for any headers in UWP builds.
150
+ + false
151
+ + ;;
152
+ *-win*-*)
153
+ # Don't check for any headers in Windows builds.
154
+ false
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/0004-remove-library-suffixes.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/build/make/gen_msvs_vcxproj.sh b/build/make/gen_msvs_vcxproj.sh
2
+ index 916851662..e60405bc9 100755
3
+ --- a/build/make/gen_msvs_vcxproj.sh
4
+ +++ b/build/make/gen_msvs_vcxproj.sh
5
+ @@ -394,7 +394,7 @@ generate_vcxproj() {
6
+ else
7
+ config_suffix=""
8
+ fi
9
+ - tag_content TargetName "${name}${lib_sfx}${config_suffix}"
10
+ + tag_content TargetName "${name}"
11
+ fi
12
+ close_tag PropertyGroup
13
+ done
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/portfile.cmake ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ set(LIBVPX_VERSION 1.10.0)
4
+
5
+ vcpkg_from_github(
6
+ OUT_SOURCE_PATH SOURCE_PATH
7
+ REPO webmproject/libvpx
8
+ REF v${LIBVPX_VERSION}
9
+ SHA512 f88c588145b5164e98531b75215e119056cd806a9dbe6599bb9dab35c0af0ecd4b3daabee7d795e412a58aeb543d5c7dc0107457c4bd8f4d434e966e8e22a32d
10
+ HEAD_REF master
11
+ PATCHES
12
+ 0002-Fix-nasm-debug-format-flag.patch
13
+ 0003-add-uwp-and-v142-support.patch
14
+ 0004-remove-library-suffixes.patch
15
+ )
16
+
17
+ vcpkg_find_acquire_program(PERL)
18
+
19
+ get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
20
+
21
+ if(CMAKE_HOST_WIN32)
22
+ vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
23
+ set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
24
+ set(ENV{PATH} "${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}")
25
+ else()
26
+ set(BASH /bin/bash)
27
+ set(ENV{PATH} "${MSYS_ROOT}/usr/bin:$ENV{PATH}:${PERL_EXE_PATH}")
28
+ endif()
29
+
30
+ vcpkg_find_acquire_program(NASM)
31
+ get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
32
+ vcpkg_add_to_path(${NASM_EXE_PATH})
33
+
34
+ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
35
+
36
+ file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
37
+
38
+ if(VCPKG_CRT_LINKAGE STREQUAL static)
39
+ set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt)
40
+ set(LIBVPX_CRT_SUFFIX mt)
41
+ else()
42
+ set(LIBVPX_CRT_SUFFIX md)
43
+ endif()
44
+
45
+ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore AND VCPKG_PLATFORM_TOOLSET STREQUAL v142)
46
+ set(LIBVPX_TARGET_OS "uwp")
47
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
48
+ set(LIBVPX_TARGET_OS "win32")
49
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
50
+ set(LIBVPX_TARGET_OS "win64")
51
+ endif()
52
+
53
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
54
+ set(LIBVPX_TARGET_ARCH "x86-${LIBVPX_TARGET_OS}")
55
+ set(LIBVPX_ARCH_DIR "Win32")
56
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
57
+ set(LIBVPX_TARGET_ARCH "x86_64-${LIBVPX_TARGET_OS}")
58
+ set(LIBVPX_ARCH_DIR "x64")
59
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
60
+ set(LIBVPX_TARGET_ARCH "arm64-${LIBVPX_TARGET_OS}")
61
+ set(LIBVPX_ARCH_DIR "ARM64")
62
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
63
+ set(LIBVPX_TARGET_ARCH "armv7-${LIBVPX_TARGET_OS}")
64
+ set(LIBVPX_ARCH_DIR "ARM")
65
+ endif()
66
+
67
+ if(VCPKG_PLATFORM_TOOLSET STREQUAL v142)
68
+ set(LIBVPX_TARGET_VS "vs16")
69
+ else()
70
+ set(LIBVPX_TARGET_VS "vs15")
71
+ endif()
72
+
73
+ set(OPTIONS "--disable-examples --disable-tools --disable-docs --enable-pic")
74
+
75
+ if("realtime" IN_LIST FEATURES)
76
+ set(OPTIONS "${OPTIONS} --enable-realtime-only")
77
+ endif()
78
+
79
+ if("highbitdepth" IN_LIST FEATURES)
80
+ set(OPTIONS "${OPTIONS} --enable-vp9-highbitdepth")
81
+ endif()
82
+
83
+ message(STATUS "Generating makefile")
84
+ file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
85
+ vcpkg_execute_required_process(
86
+ COMMAND
87
+ ${BASH} --noprofile --norc
88
+ "${SOURCE_PATH}/configure"
89
+ --target=${LIBVPX_TARGET_ARCH}-${LIBVPX_TARGET_VS}
90
+ ${LIBVPX_CRT_LINKAGE}
91
+ ${OPTIONS}
92
+ --as=nasm
93
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
94
+ LOGNAME configure-${TARGET_TRIPLET})
95
+
96
+ message(STATUS "Generating MSBuild projects")
97
+ vcpkg_execute_required_process(
98
+ COMMAND
99
+ ${BASH} --noprofile --norc -c "make dist"
100
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}"
101
+ LOGNAME generate-${TARGET_TRIPLET})
102
+
103
+ vcpkg_build_msbuild(
104
+ PROJECT_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx.vcxproj"
105
+ OPTIONS /p:UseEnv=True
106
+ )
107
+
108
+ # note: pdb file names are hardcoded in the lib file, cannot rename
109
+ set(LIBVPX_OUTPUT_PREFIX "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}")
110
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
111
+ file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
112
+ if (EXISTS "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.pdb")
113
+ file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
114
+ else()
115
+ file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
116
+ endif()
117
+ endif()
118
+
119
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
120
+ file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
121
+ if (EXISTS "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.pdb")
122
+ file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
123
+ else()
124
+ file(INSTALL "${LIBVPX_OUTPUT_PREFIX}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
125
+ endif()
126
+ endif()
127
+
128
+ if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
129
+ set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
130
+ elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
131
+ set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nomt-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
132
+ else()
133
+ set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx")
134
+ endif()
135
+ file(
136
+ INSTALL
137
+ "${LIBVPX_INCLUDE_DIR}"
138
+ DESTINATION
139
+ "${CURRENT_PACKAGES_DIR}/include"
140
+ RENAME
141
+ "vpx")
142
+ if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
143
+ set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}")
144
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/vpx.pc" @ONLY)
145
+ endif()
146
+
147
+ if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
148
+ set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}/debug")
149
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/vpx.pc" @ONLY)
150
+ endif()
151
+
152
+ else()
153
+
154
+ set(OPTIONS "--disable-examples --disable-tools --disable-docs --disable-unit-tests --enable-pic")
155
+
156
+ set(OPTIONS_DEBUG "--enable-debug-libs --enable-debug --prefix=${CURRENT_PACKAGES_DIR}/debug")
157
+ set(OPTIONS_RELEASE "--prefix=${CURRENT_PACKAGES_DIR}")
158
+
159
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
160
+ set(OPTIONS "${OPTIONS} --disable-static --enable-shared")
161
+ else()
162
+ set(OPTIONS "${OPTIONS} --enable-static --disable-shared")
163
+ endif()
164
+
165
+ if("realtime" IN_LIST FEATURES)
166
+ set(OPTIONS "${OPTIONS} --enable-realtime-only")
167
+ endif()
168
+
169
+ if("highbitdepth" IN_LIST FEATURES)
170
+ set(OPTIONS "${OPTIONS} --enable-vp9-highbitdepth")
171
+ endif()
172
+
173
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
174
+ set(LIBVPX_TARGET_ARCH "x86")
175
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
176
+ set(LIBVPX_TARGET_ARCH "x86_64")
177
+ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64)
178
+ set(LIBVPX_TARGET_ARCH "arm64")
179
+ else()
180
+ message(FATAL_ERROR "libvpx does not support architecture ${VCPKG_TARGET_ARCHITECTURE}")
181
+ endif()
182
+
183
+ if(VCPKG_TARGET_IS_MINGW)
184
+ if(LIBVPX_TARGET_ARCH STREQUAL "x86")
185
+ set(LIBVPX_TARGET "x86-win32-gcc")
186
+ else()
187
+ set(LIBVPX_TARGET "x86_64-win64-gcc")
188
+ endif()
189
+ elseif(VCPKG_TARGET_IS_LINUX)
190
+ set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-linux-gcc")
191
+ elseif(VCPKG_TARGET_IS_OSX)
192
+ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
193
+ set(LIBVPX_TARGET "arm64-darwin20-gcc")
194
+ else()
195
+ set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-darwin17-gcc") # enable latest CPU instructions for best performance and less CPU usage on MacOS
196
+ endif()
197
+ else()
198
+ set(LIBVPX_TARGET "generic-gnu") # use default target
199
+ endif()
200
+
201
+ message(STATUS "Build info. Target: ${LIBVPX_TARGET}; Options: ${OPTIONS}")
202
+
203
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
204
+ message(STATUS "Configuring libvpx for Release")
205
+ file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
206
+ vcpkg_execute_required_process(
207
+ COMMAND
208
+ ${BASH} --noprofile --norc
209
+ "${SOURCE_PATH}/configure"
210
+ --target=${LIBVPX_TARGET}
211
+ ${OPTIONS}
212
+ ${OPTIONS_RELEASE}
213
+ --as=nasm
214
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
215
+ LOGNAME configure-${TARGET_TRIPLET}-rel)
216
+
217
+ message(STATUS "Building libvpx for Release")
218
+ vcpkg_execute_required_process(
219
+ COMMAND
220
+ ${BASH} --noprofile --norc -c "make -j8"
221
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
222
+ LOGNAME build-${TARGET_TRIPLET}-rel
223
+ )
224
+
225
+ message(STATUS "Installing libvpx for Release")
226
+ vcpkg_execute_required_process(
227
+ COMMAND
228
+ ${BASH} --noprofile --norc -c "make install"
229
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel"
230
+ LOGNAME install-${TARGET_TRIPLET}-rel
231
+ )
232
+ endif()
233
+
234
+ # --- --- ---
235
+
236
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
237
+ message(STATUS "Configuring libvpx for Debug")
238
+ file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
239
+ vcpkg_execute_required_process(
240
+ COMMAND
241
+ ${BASH} --noprofile --norc
242
+ "${SOURCE_PATH}/configure"
243
+ --target=${LIBVPX_TARGET}
244
+ ${OPTIONS}
245
+ ${OPTIONS_DEBUG}
246
+ --as=nasm
247
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
248
+ LOGNAME configure-${TARGET_TRIPLET}-dbg)
249
+
250
+ message(STATUS "Building libvpx for Debug")
251
+ vcpkg_execute_required_process(
252
+ COMMAND
253
+ ${BASH} --noprofile --norc -c "make -j8"
254
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
255
+ LOGNAME build-${TARGET_TRIPLET}-dbg
256
+ )
257
+
258
+ message(STATUS "Installing libvpx for Debug")
259
+ vcpkg_execute_required_process(
260
+ COMMAND
261
+ ${BASH} --noprofile --norc -c "make install"
262
+ WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg"
263
+ LOGNAME install-${TARGET_TRIPLET}-dbg
264
+ )
265
+
266
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
267
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libvpx_g.a")
268
+ endif()
269
+ endif()
270
+
271
+ vcpkg_fixup_pkgconfig()
272
+
273
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
274
+ set(LIBVPX_CONFIG_DEBUG ON)
275
+ else()
276
+ set(LIBVPX_CONFIG_DEBUG OFF)
277
+ endif()
278
+
279
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/unofficial-libvpx-config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-libvpx/unofficial-libvpx-config.cmake" @ONLY)
280
+
281
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/unofficial-libvpx-config.cmake.in ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(NOT TARGET unofficial::libvpx::libvpx)
2
+ # Compute the installation prefix relative to this file.
3
+ get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
4
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
5
+ get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
6
+
7
+ # Add library target (note: vpx always has a static build in vcpkg).
8
+ add_library(unofficial::libvpx::libvpx STATIC IMPORTED)
9
+
10
+ # Add interface include directories and link interface languages (applies to all configurations).
11
+ set_target_properties(unofficial::libvpx::libvpx PROPERTIES
12
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
13
+ IMPORTED_LINK_INTERFACE_LANGUAGES "C"
14
+ )
15
+ list(APPEND _IMPORT_CHECK_FILES "${_IMPORT_PREFIX}/include/vpx/vpx_codec.h")
16
+
17
+ # Add release configuration properties.
18
+ find_library(_LIBFILE_RELEASE NAMES vpx PATHS "${_IMPORT_PREFIX}/lib/" NO_DEFAULT_PATH)
19
+ set_property(TARGET unofficial::libvpx::libvpx
20
+ APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
21
+ set_target_properties(unofficial::libvpx::libvpx PROPERTIES
22
+ IMPORTED_LOCATION_RELEASE ${_LIBFILE_RELEASE})
23
+ list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_RELEASE})
24
+ unset(_LIBFILE_RELEASE CACHE)
25
+
26
+ # Add debug configuration properties.
27
+ if(@LIBVPX_CONFIG_DEBUG@)
28
+ find_library(_LIBFILE_DEBUG NAMES vpx PATHS "${_IMPORT_PREFIX}/debug/lib/" NO_DEFAULT_PATH)
29
+ set_property(TARGET unofficial::libvpx::libvpx
30
+ APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
31
+ set_target_properties(unofficial::libvpx::libvpx PROPERTIES
32
+ IMPORTED_LOCATION_DEBUG ${_LIBFILE_DEBUG})
33
+ list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_DEBUG})
34
+ unset(_LIBFILE_DEBUG CACHE)
35
+ endif()
36
+
37
+ # Check header and library files are present.
38
+ foreach(file ${_IMPORT_CHECK_FILES} )
39
+ if(NOT EXISTS "${file}" )
40
+ message(FATAL_ERROR "unofficial::libvpx::libvpx references the file
41
+ \"${file}\"
42
+ but this file does not exist. Possible reasons include:
43
+ * The file was deleted, renamed, or moved to another location.
44
+ * An install or uninstall procedure did not complete successfully.
45
+ ")
46
+ endif()
47
+ endforeach()
48
+ unset(_IMPORT_CHECK_FILES)
49
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/vcpkg.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libvpx",
3
+ "version-semver": "1.10.0",
4
+ "port-version": 2,
5
+ "description": "The reference software implementation for the video coding formats VP8 and VP9.",
6
+ "homepage": "https://github.com/webmproject/libvpx",
7
+ "features": {
8
+ "highbitdepth": {
9
+ "description": "use VP9 high bit depth (10/12) profiles"
10
+ },
11
+ "realtime": {
12
+ "description": "enable this option while building for real-time encoding"
13
+ }
14
+ }
15
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libvpx/vpx.pc.in ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ prefix=@LIBVPX_PREFIX@
2
+ # pkg-config file from libvpx v1.10.0
3
+ exec_prefix=${prefix}
4
+ libdir=${prefix}/lib
5
+ includedir=${prefix}/include
6
+
7
+ Name: vpx
8
+ Description: WebM Project VPx codec implementation
9
+ Version: @LIBVPX_VERSION@
10
+ Requires:
11
+ Conflicts:
12
+ Libs: -L"${libdir}" -lvpx
13
+ Cflags: -I"${includedir}"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/configure.lib.patch ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure.ac b/configure.ac
2
+ index 4579fbb3d..f6be008c8 100644
3
+ --- a/configure.ac
4
+ +++ b/configure.ac
5
+ @@ -112,10 +112,11 @@ AC_HEADER_STDC
6
+ AC_CHECK_HEADERS(stddef.h inttypes.h sys/prctl.h)
7
+
8
+ # Checks for various "optional" libraries
9
+ -AC_CHECK_LIB(pthread, pthread_create, have_pthread=1, have_pthread=0)
10
+ +# AC_CHECK_LIB(pthread, pthread_create, have_pthread=1, have_pthread=0)
11
+ +AC_SEARCH_LIBS(pthread_create, [pthreadGC pthreadVC pthread], have_pthread=1, have_pthread=0)
12
+
13
+ if test "$have_pthread" = 1; then
14
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lpthread"
15
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_pthread_create"
16
+ AC_DEFINE(HAVE_LIBPTHREAD, 1, [Set to 1 if pthreads are supported])
17
+ fi
18
+
19
+ @@ -128,12 +129,13 @@ AC_ARG_WITH([bzip2],
20
+
21
+ AS_IF([test "x$with_bzip2" != "xno"],
22
+ [
23
+ - AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, have_bzip=yes, have_bzip=no)
24
+ + AC_SEARCH_LIBS(BZ2_bzDecompressInit, [bz2 bz2d bzip2 bzip2d], have_bzip=yes, have_bzip=no)
25
+ + # AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, have_bzip=yes, have_bzip=no)
26
+ ], [have_bzip=no])
27
+
28
+ AS_IF([test "x$have_bzip" = "xyes"], [
29
+ - if test "$ac_cv_lib_bz2_BZ2_bzDecompressInit" != "none required"; then
30
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lbz2"
31
+ + if test "$ac_cv_search_BZ2_bzDecompressInit" != "none required"; then
32
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_BZ2_bzDecompressInit"
33
+ fi
34
+ with_bzip2=yes
35
+ AC_DEFINE(HAVE_LIBBZ2, 1, "Compiled with bzip2 support")],
36
+ @@ -149,12 +151,13 @@ AC_ARG_WITH([zlib],
37
+
38
+ AS_IF([test "x$with_zlib" != "xno"],
39
+ [
40
+ - AC_CHECK_LIB(z, deflate, have_zlib=yes, have_zlib=no)
41
+ + AC_SEARCH_LIBS(deflate, [z zlib zlibd zd], have_zlib=yes, have_zlib=no)
42
+ + # AC_CHECK_LIB(z, deflate, have_zlib=yes, have_zlib=no)
43
+ ], [have_zlib=no])
44
+
45
+ AS_IF([test "x$have_zlib" = "xyes"], [
46
+ - if test "$ac_cv_lib_z_deflate" != "none required"; then
47
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lz"
48
+ + if test "$ac_cv_search_deflate" != "none required"; then
49
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_deflate"
50
+ fi
51
+ AC_DEFINE(HAVE_LIBZ, 1, "Compiled with zlib support")
52
+ with_zlib=yes],
53
+ @@ -193,12 +196,13 @@ AC_ARG_WITH([lzma],
54
+
55
+ AS_IF([test "x$with_lzma" != "xno"],
56
+ [
57
+ - AC_CHECK_HEADER(lzma.h, have_lzma=yes, have_lzma=no)
58
+ + # AC_CHECK_HEADER(lzma.h, have_lzma=yes, have_lzma=no)
59
+ + AC_SEARCH_LIBS(lzma_free, [lzma], have_lzma=yes, have_lzma=no)
60
+ ], [have_lzma=no])
61
+
62
+ AS_IF([test "x$have_lzma" = "xyes"], [
63
+ - if test "$ac_cv_lib_lzma_code" != "none required"; then
64
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llzma"
65
+ + if test "$ac_cv_search_lzma_free" != "none required"; then
66
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_lzma_free"
67
+ fi
68
+ AC_DEFINE(HAVE_LIBLZMA, 1, "Compiled with lzma support")
69
+ with_lzma=yes],
70
+ @@ -259,25 +264,28 @@ AC_ARG_WITH([lz4],
71
+
72
+ AS_IF([test "x$with_lz4" != "xno"],
73
+ [
74
+ - AC_CHECK_LIB(lz4, LZ4F_createDecompressionContext, have_lz4f=yes, have_lz4f=no)
75
+ + AC_SEARCH_LIBS(LZ4F_createDecompressionContext, [lz4 lz4d], have_lz4f=yes, have_lz4f=no)
76
+ + # AC_CHECK_LIB(lz4, LZ4F_createDecompressionContext, have_lz4f=yes, have_lz4f=no)
77
+ ], [have_zstd=no])
78
+
79
+ AS_IF([test "x$have_lz4f" = "xyes"], [
80
+ - if test "$ac_cv_lib_lz4_code" != "none required"; then
81
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llz4"
82
+ + if test "$ac_cv_search_LZ4F_createDecompressionContext" != "none required"; then
83
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_LZ4F_createDecompressionContext"
84
+ fi
85
+ AC_DEFINE(HAVE_LIBLZ4F, 1, "Compiled with lz4 frame support")
86
+ - AC_CHECK_LIB(lz4, LZ4F_getVersion, have_lz4_173=yes, have_lz4_173=no)
87
+ + AC_SEARCH_LIBS(LZ4F_getVersion, [lz4 lz4d], have_lz4_173=yes, have_lz4_173=no)
88
+ + # AC_CHECK_LIB(lz4, LZ4F_getVersion, have_lz4_173=yes, have_lz4_173=no)
89
+ if test "x$have_lz4_173" = "xyes"; then
90
+ AC_DEFINE(HAVE_LIBLZ4_MOVABLE, 1, "If defined then liblz4 does NOT have the ERROR_srcPtr_wrong bug")
91
+ fi
92
+ with_lz4=frameapi],
93
+ [
94
+ AC_DEFINE(HAVE_LIBLZ4F, 0, "Compiled with lz4 frame support")
95
+ - AC_CHECK_LIB(lz4, LZ4_decompress_safe_continue, have_lz4s=yes, have_lz4s=no)
96
+ + AC_SEARCH_LIBS(LZ4_decompress_safe_continue, [lz4 lz4d], have_lz4s=yes, have_lz4s=no)
97
+ + # AC_CHECK_LIB(lz4, LZ4_decompress_safe_continue, have_lz4s=yes, have_lz4s=no)
98
+ AS_IF([test "x$have_lz4s" = "xyes"], [
99
+ - if test "$ac_cv_lib_lz4_code" != "none required"; then
100
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llz4"
101
+ + if test "$ac_cv_search_LZ4_decompress_safe_continue" != "none required"; then
102
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_LZ4_decompress_safe_continue"
103
+ fi
104
+ AC_DEFINE(HAVE_LIBLZ4S, 1, "Compiled with lz4 stream support")
105
+ with_lz4=streamapi
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/configure.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure.ac b/configure.ac
2
+ index e250c0c31..0465120ba 100644
3
+ --- a/configure.ac
4
+ +++ b/configure.ac
5
+ @@ -83,7 +83,7 @@ ADD_INCLS=""
6
+ ADD_LDFLAGS="$ADD_LDFLAGS -L\$(abs_top_srcdir)/lib"
7
+ LIBWANDIO_LIBS=""
8
+
9
+ -CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wextra -DLT_BUILDING_DLL=1"
10
+ +CFLAGS="$CFLAGS -Wall -DLT_BUILDING_DLL=1 -DNOMINMAX"
11
+ -CXXFLAGS="$CXXFLAGS -Wall -DLT_BUILDING_DLL=1"
12
+ +CXXFLAGS="$CXXFLAGS -Wall -DLT_BUILDING_DLL=1 -DNOMINMAX"
13
+
14
+ # Check for -fvisibility
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/curl.patch ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure.ac b/configure.ac
2
+ index 4579fbb3d..f6be008c8 100644
3
+ --- a/configure.ac
4
+ +++ b/configure.ac
5
+ @@ -296,12 +304,14 @@ AC_ARG_WITH([http],
6
+ AS_IF([test "x$with_http" != "xno"],
7
+ [
8
+ # we need curl_easy_pause which was added in 7.18.0
9
+ - AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no)
10
+ + AC_SEARCH_LIBS(curl_easy_pause, [curl curl-d libcurl libcurl-d], have_curl=yes, have_curl=no, [-lCrypt32 -lWldap32 -lWs2_32 -ladvapi32])
11
+ + # AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no)
12
+ ], [have_curl=no])
13
+
14
+ AS_IF([test "x$have_curl" = "xyes"], [
15
+ - if test "$ac_cv_lib_curl_curl_easy_pause" != "none required"; then
16
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lcurl"
17
+ + if test "$ac_cv_search_curl_easy_pause" != "none required"; then
18
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lCrypt32 -lWldap32 -lWs2_32 -ladvapi32 $ac_cv_search_curl_easy_pause"
19
+ + LIBS="$LIBS"
20
+ fi
21
+ AC_DEFINE(HAVE_HTTP, 1, "Compiled with http support")
22
+ with_http=yes],
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/openssl.patch ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/configure.ac b/configure.ac
2
+ index 4579fbb3d..f6be008c8 100644
3
+ --- a/configure.ac
4
+ +++ b/configure.ac
5
+ @@ -296,12 +304,14 @@ AC_ARG_WITH([http],
6
+ AS_IF([test "x$with_http" != "xno"],
7
+ [
8
+ # we need curl_easy_pause which was added in 7.18.0
9
+ - AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no)
10
+ + AC_SEARCH_LIBS(curl_easy_pause, [curl curl-d], have_curl=yes, have_curl=no, [-lssl -lcrypto $ac_cv_search_pthread_create -ldl])
11
+ + # AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no)
12
+ ], [have_curl=no])
13
+
14
+ AS_IF([test "x$have_curl" = "xyes"], [
15
+ - if test "$ac_cv_lib_curl_curl_easy_pause" != "none required"; then
16
+ - LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lcurl"
17
+ + if test "$ac_cv_search_curl_easy_pause" != "none required"; then
18
+ + LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_curl_easy_pause -lssl -lcrypto $ac_cv_search_pthread_create -ldl"
19
+ + LIBS="$LIBS -lssl -lcrypto $ac_cv_search_pthread_create -ldl"
20
+ fi
21
+ AC_DEFINE(HAVE_HTTP, 1, "Compiled with http support")
22
+ with_http=yes],
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/portfile.cmake ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(VCPKG_TARGET_IS_WINDOWS)
2
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
3
+ set(PATCHES curl.patch)
4
+ #TODO: Still does not work. Requires proper "signal" support and "unistd"
5
+ else()
6
+ set(PATCHES openssl.patch) # needed if curl is using openssl
7
+ endif()
8
+
9
+ vcpkg_from_github(
10
+ OUT_SOURCE_PATH SOURCE_PATH
11
+ REPO wanduow/wandio
12
+ REF 012b646e7ba7ab191a5a2206488adfac493fcdc6
13
+ SHA512 e94a82038902c34933c4256f8bd4d7ef3f2cf32fea46f8e31a25df34cc90d3a275ff56d3bc9892aca0c85e6d875e696f96a836cc1444fe165db8364331e6e77d
14
+ HEAD_REF master
15
+ PATCHES configure.lib.patch # This is how configure.ac files with dependencies get fixed.
16
+ configure.patch
17
+ ${PATCHES}
18
+ )
19
+
20
+ vcpkg_configure_make(
21
+ AUTOCONFIG
22
+ SOURCE_PATH ${SOURCE_PATH}
23
+ COPY_SOURCE
24
+ )
25
+ vcpkg_install_make()
26
+
27
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
28
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
29
+ endif()
30
+
31
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
32
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
33
+
34
+ vcpkg_copy_pdbs()
35
+
36
+ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwandio/vcpkg.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libwandio",
3
+ "version": "4.2.1",
4
+ "port-version": 6,
5
+ "description": "C library for simple and efficient file IO.",
6
+ "homepage": "https://github.com/wanduow/wandio",
7
+ "license": "LGPL-3.0-only",
8
+ "supports": "!windows",
9
+ "dependencies": [
10
+ "bzip2",
11
+ "curl",
12
+ "liblzma",
13
+ "lz4",
14
+ "lzo",
15
+ "pthread",
16
+ "zlib",
17
+ "zstd"
18
+ ]
19
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebm/Fix-cmake.patch ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index a83d23b..c5abf83 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -8,6 +8,8 @@
6
+ cmake_minimum_required(VERSION 3.2)
7
+ project(LIBWEBM CXX)
8
+
9
+ +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
10
+ +
11
+ include(GNUInstallDirs)
12
+ include("${CMAKE_CURRENT_SOURCE_DIR}/build/cxx_flags.cmake")
13
+
14
+ @@ -330,6 +332,50 @@ add_library(webm ${libwebm_common_sources}
15
+ $<TARGET_OBJECTS:mkvmuxer>
16
+ $<TARGET_OBJECTS:mkvparser>)
17
+
18
+ +install(
19
+ + TARGETS webm
20
+ + RUNTIME DESTINATION bin
21
+ + ARCHIVE DESTINATION lib
22
+ + LIBRARY DESTINATION lib
23
+ +)
24
+ +
25
+ +install(
26
+ + FILES
27
+ + mkvmuxer.hpp
28
+ + mkvmuxertypes.hpp
29
+ + mkvmuxerutil.hpp
30
+ + mkvparser.hpp
31
+ + mkvreader.hpp
32
+ + mkvwriter.hpp
33
+ + webmids.hpp
34
+ + DESTINATION
35
+ + include/libwebm
36
+ +)
37
+ +
38
+ +install(
39
+ + DIRECTORY mkvmuxer/
40
+ + DESTINATION include/libwebm/mkvmuxer
41
+ + FILES_MATCHING PATTERN "*.h"
42
+ +)
43
+ +
44
+ +install(
45
+ + DIRECTORY mkvparser/
46
+ + DESTINATION include/libwebm/mkvparser
47
+ + FILES_MATCHING PATTERN "*.h"
48
+ +)
49
+ +
50
+ +install(
51
+ + DIRECTORY webvtt/
52
+ + DESTINATION include/libwebm/webvtt
53
+ + FILES_MATCHING PATTERN "*.h"
54
+ +)
55
+ +
56
+ +install(
57
+ + DIRECTORY common/
58
+ + DESTINATION include/libwebm/common
59
+ + FILES_MATCHING PATTERN "*.h"
60
+ +)
61
+ +
62
+ if (WIN32)
63
+ # Use libwebm and libwebm.lib for project and library name on Windows (instead
64
+ # webm and webm.lib).
65
+ @@ -337,18 +383,22 @@ if (WIN32)
66
+ set_target_properties(webm PROPERTIES PREFIX lib)
67
+ endif ()
68
+
69
+ -add_executable(mkvparser_sample ${mkvparser_sample_sources})
70
+ -target_link_libraries(mkvparser_sample LINK_PUBLIC webm)
71
+ +if (ENABLE_SAMPLES)
72
+ + add_executable(mkvparser_sample ${mkvparser_sample_sources})
73
+ + target_link_libraries(mkvparser_sample LINK_PUBLIC webm)
74
+
75
+ -add_executable(mkvmuxer_sample ${mkvmuxer_sample_sources}
76
+ - $<TARGET_OBJECTS:webvtt_common>)
77
+ -target_link_libraries(mkvmuxer_sample LINK_PUBLIC webm)
78
+ + add_executable(mkvmuxer_sample ${mkvmuxer_sample_sources}
79
+ + $<TARGET_OBJECTS:webvtt_common>)
80
+ + target_link_libraries(mkvmuxer_sample LINK_PUBLIC webm)
81
+ +endif()
82
+
83
+ -add_executable(dumpvtt ${dumpvtt_sources} $<TARGET_OBJECTS:webvtt_common>)
84
+ -target_link_libraries(dumpvtt LINK_PUBLIC webm)
85
+ +if (ENABLE_TOOLS)
86
+ + add_executable(dumpvtt ${dumpvtt_sources} $<TARGET_OBJECTS:webvtt_common>)
87
+ + target_link_libraries(dumpvtt LINK_PUBLIC webm)
88
+
89
+ -add_executable(vttdemux ${vttdemux_sources})
90
+ -target_link_libraries(vttdemux LINK_PUBLIC webm)
91
+ + add_executable(vttdemux ${vttdemux_sources})
92
+ + target_link_libraries(vttdemux LINK_PUBLIC webm)
93
+ +endif()
94
+
95
+ if (ENABLE_WEBMINFO)
96
+ add_executable(webm_info ${webm_info_sources})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebm/portfile.cmake ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO webmproject/libwebm
4
+ REF 82a1d2330e113a14e545d806eb5419f09374255f #1.0.0.28
5
+ SHA512 7baf6f702f0e4498c9b0affebeba3ff28192c5f3dadfa5a17db2306816b3a9e31ce7a474e4d344ba136e5acf097c32d4ff61ce99861d427cdfb2f20e317d7e15
6
+ HEAD_REF master
7
+ PATCHES
8
+ Fix-cmake.patch
9
+ )
10
+
11
+ if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
12
+ set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=dll)
13
+ else()
14
+ set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=static)
15
+ endif()
16
+
17
+ vcpkg_cmake_configure(
18
+ SOURCE_PATH "${SOURCE_PATH}"
19
+ OPTIONS
20
+ ${LIBWEBM_CRT_LINKAGE}
21
+ -DENABLE_SAMPLES=OFF
22
+ -DENABLE_TOOLS=OFF
23
+ -DENABLE_WEBMTS=OFF
24
+ -DENABLE_WEBMINFO=OFF
25
+ )
26
+
27
+ vcpkg_cmake_install()
28
+
29
+ vcpkg_copy_pdbs()
30
+
31
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
32
+
33
+ file(INSTALL "${SOURCE_PATH}/LICENSE.TXT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebm/vcpkg.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libwebm",
3
+ "version": "1.0.0.28",
4
+ "port-version": 1,
5
+ "description": "WebM File Parser",
6
+ "homepage": "https://github.com/webmproject/libwebm",
7
+ "dependencies": [
8
+ {
9
+ "name": "vcpkg-cmake",
10
+ "host": true
11
+ },
12
+ {
13
+ "name": "vcpkg-cmake-config",
14
+ "host": true
15
+ }
16
+ ]
17
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0001-build.patch ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index bd1bebb..4ce801d 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -214,6 +214,9 @@ endfunction()
6
+ if(MSVC)
7
+ # avoid security warnings for e.g., fopen() used in the examples.
8
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
9
+ + if(BUILD_SHARED_LIBS)
10
+ + add_definitions("-DWEBP_EXTERN=__declspec(dllexport)" "-DWEBP_DLL")
11
+ + endif()
12
+ else()
13
+ add_definitions(-Wall)
14
+ endif()
15
+ @@ -482,7 +485,7 @@ if(WEBP_BUILD_LIBWEBPMUX)
16
+ "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\
17
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\
18
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;")
19
+ - set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux)
20
+ + set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME $<$<PLATFORM_ID:Windows>:lib>webpmux)
21
+ list(APPEND INSTALLED_LIBRARIES libwebpmux)
22
+ configure_pkg_config("src/mux/libwebpmux.pc")
23
+ endif()
24
+ @@ -586,8 +589,12 @@ if(WEBP_BUILD_EXTRAS)
25
+ # webp_quality
26
+ add_executable(webp_quality ${WEBP_QUALITY_SRCS} ${WEBP_EXTRAS_SRCS})
27
+ target_link_libraries(webp_quality exampleutil imagedec)
28
+ + if(BUILD_SHARED_LIBS)
29
+ + target_link_libraries(webp_quality webpdspdecode)
30
+ + endif()
31
+ target_include_directories(webp_quality
32
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
33
+ + ${CMAKE_CURRENT_SOURCE_DIR}/src
34
+ ${CMAKE_CURRENT_BINARY_DIR})
35
+
36
+ # vwebp_sdl
37
+ @@ -620,7 +627,7 @@ if(WEBP_BUILD_WEBP_JS)
38
+ -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \
39
+ -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
40
+ set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp)
41
+ - target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
42
+ + target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H)
43
+ endif()
44
+
45
+ # WASM version
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/cmake/WebPConfig.cmake.in b/cmake/WebPConfig.cmake.in
2
+ index 822fc59..cef75fe 100644
3
+ --- a/cmake/WebPConfig.cmake.in
4
+ +++ b/cmake/WebPConfig.cmake.in
5
+ @@ -4,8 +4,60 @@ set(WEBP_VERSION ${WebP_VERSION})
6
+ @PACKAGE_INIT@
7
+
8
+ include ("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
9
+ +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
10
+
11
+ -set(WebP_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
12
+ -set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS})
13
+ -set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@")
14
+ -set(WEBP_LIBRARIES "${WebP_LIBRARIES}")
15
+ +find_path(WEBP_INCLUDE_DIR NAMES webp/types.h)
16
+ +set(WebP_INCLUDE_DIR ${WEBP_INCLUDE_DIR})
17
+ +set(WebP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR})
18
+ +set(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR})
19
+ +
20
+ +if(NOT WEBP_BASE_LIBRARY AND NOT WebP_BASE_LIBRARY)
21
+ + find_library(WEBP_BASE_LIBRARY_RELEASE NAMES webp)
22
+ + find_library(WEBP_BASE_LIBRARY_DEBUG NAMES webpd)
23
+ + select_library_configurations(WEBP_BASE)
24
+ + set(WebP_BASE_LIBRARY ${WEBP_BASE_LIBRARY})
25
+ + if(WEBP_BASE_LIBRARY)
26
+ + list(APPEND WEBP_LIBRARIES "${WEBP_BASE_LIBRARY}")
27
+ + list(APPEND WebP_LIBRARIES "${WebP_BASE_LIBRARY}")
28
+ + endif()
29
+ +endif()
30
+ +
31
+ +if(NOT WEBP_DECODER_LIBRARY AND NOT WebP_DECODER_LIBRARY)
32
+ + find_library(WEBP_DECODER_LIBRARY_RELEASE NAMES webpdecoder)
33
+ + find_library(WEBP_DECODER_LIBRARY_DEBUG NAMES webpdecoderd)
34
+ + select_library_configurations(WEBP_DECODER)
35
+ + set(WebP_DECODER_LIBRARY ${WEBP_DECODER_LIBRARY})
36
+ + if(WEBP_DECODER_LIBRARY)
37
+ + list(APPEND WEBP_LIBRARIES "${WEBP_DECODER_LIBRARY}")
38
+ + list(APPEND WebP_LIBRARIES "${WebP_DECODER_LIBRARY}")
39
+ + endif()
40
+ +endif()
41
+ +
42
+ +if(NOT WEBP_DEMUX_LIBRARY AND NOT WebP_DEMUX_LIBRARY)
43
+ + find_library(WEBP_DEMUX_LIBRARY_RELEASE NAMES webpdemux)
44
+ + find_library(WEBP_DEMUX_LIBRARY_DEBUG NAMES webpdemuxd)
45
+ + select_library_configurations(WEBP_DEMUX)
46
+ + set(WebP_DEMUX_LIBRARY ${WEBP_DEMUX_LIBRARY})
47
+ + if(WEBP_DEMUX_LIBRARY)
48
+ + list(APPEND WEBP_LIBRARIES "${WEBP_DEMUX_LIBRARY}")
49
+ + list(APPEND WebP_LIBRARIES "${WebP_DEMUX_LIBRARY}")
50
+ + endif()
51
+ +endif()
52
+ +
53
+ +if(NOT WEBP_MUX_LIBRARY AND NOT WebP_MUX_LIBRARY)
54
+ + find_library(WEBP_MUX_LIBRARY_RELEASE NAMES libwebpmux)
55
+ + find_library(WEBP_MUX_LIBRARY_DEBUG NAMES libwebpmuxd)
56
+ + select_library_configurations(WEBP_MUX)
57
+ + set(WebP_MUX_LIBRARY ${WEBP_MUX_LIBRARY})
58
+ + if(WEBP_MUX_LIBRARY)
59
+ + list(APPEND WEBP_LIBRARIES "${WEBP_MUX_LIBRARY}")
60
+ + list(APPEND WebP_LIBRARIES "${WebP_MUX_LIBRARY}")
61
+ + endif()
62
+ +endif()
63
+ +
64
+ +set(WEBP_LIBRARY ${WEBP_BASE_LIBRARY})
65
+ +set(WebP_LIBRARY ${WebP_BASE_LIBRARY})
66
+ +if(WEBP_BASE_LIBRARY AND WEBP_INCLUDE_DIR)
67
+ + set(WEBP_FOUND 1)
68
+ + set(WebP_FOUND 1)
69
+ +endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0003-always-mux.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index b0ae7d5..5813c06 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -472,7 +472,7 @@ if(WEBP_BUILD_CWEBP)
6
+ install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
7
+ endif()
8
+
9
+ -if(WEBP_BUILD_LIBWEBPMUX)
10
+ +if(WEBP_BUILD_LIBWEBPMUX OR WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP OR TRUE)
11
+ parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "")
12
+ add_library(libwebpmux ${WEBP_MUX_SRCS})
13
+ target_link_libraries(libwebpmux webp)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0004-add-missing-linked-library.patch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 8386687..5ab9ed2 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -540,6 +540,10 @@ if(WEBP_BUILD_VWEBP)
6
+ PRIVATE ${GLUT_INCLUDE_DIR}
7
+ ${CMAKE_CURRENT_BINARY_DIR}/src
8
+ ${OPENGL_INCLUDE_DIR})
9
+ + if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE))
10
+ + find_package(X11 REQUIRED)
11
+ + target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB})
12
+ + endif()
13
+ install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
14
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
15
+ check_c_compiler_flag("-Wno-deprecated-declarations" HAS_NO_DEPRECATED)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0006-fix-dependecies-platform.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 83edb3a..f634094 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -540,7 +540,11 @@ if(WEBP_BUILD_EXTRAS)
6
+ find_package(SDL)
7
+ if(SDL_FOUND)
8
+ add_executable(vwebp_sdl ${VWEBP_SDL_SRCS})
9
+ - target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp)
10
+ + target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp)
11
+ + if (MSVC)
12
+ + target_link_libraries(vwebp_sdl dxguid winmm)
13
+ + endif()
14
+ + target_compile_definitions(vwebp_sdl PRIVATE WEBP_HAVE_JUST_SDL_H)
15
+ target_include_directories(vwebp_sdl
16
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
17
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0007-fix-arm-build.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake
2
+ index bc0dbc9..381f64a 100644
3
+ --- a/cmake/cpu.cmake
4
+ +++ b/cmake/cpu.cmake
5
+ @@ -97,7 +97,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
6
+ set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
7
+ webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
8
+ else()
9
+ - if(MSVC AND SIMD_ENABLE_FLAGS)
10
+ + if(MSVC AND SIMD_ENABLE_FLAGS AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM"))
11
+ # The detection for SSE2/SSE4 support under MSVC is based on the compiler
12
+ # version so e.g., clang-cl will require flags to enable the assembly.
13
+ list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0008-sdl.patch ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 91a4ba8..10a3f4d 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -624,11 +624,12 @@ endif()
6
+
7
+ if(WEBP_BUILD_WEBP_JS)
8
+ # wasm2js does not support SIMD.
9
+ + find_package(SDL REQUIRED)
10
+ if(NOT WEBP_ENABLE_SIMD)
11
+ # JavaScript version
12
+ add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
13
+ - target_link_libraries(webp_js webpdecoder SDL)
14
+ - target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
15
+ + target_link_libraries(webp_js webpdecoder ${SDL_LIBRARY})
16
+ + target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
17
+ set(WEBP_HAVE_SDL 1)
18
+ set_target_properties(
19
+ webp_js
20
+ @@ -641,14 +642,14 @@ if(WEBP_BUILD_WEBP_JS)
21
+
22
+ # WASM version
23
+ add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
24
+ - target_link_libraries(webp_wasm webpdecoder SDL)
25
+ - target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
26
+ + target_link_libraries(webp_wasm webpdecoder ${SDL_LIBRARY})
27
+ + target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
28
+ set_target_properties(
29
+ webp_wasm
30
+ PROPERTIES LINK_FLAGS "-s WASM=1 \
31
+ -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \
32
+ -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
33
+ - target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
34
+ + target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H)
35
+
36
+ target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN)
37
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/0009-glut.patch ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 0799269..45b3306 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -532,7 +532,7 @@ if(WEBP_BUILD_VWEBP)
6
+ target_link_libraries(vwebp
7
+ ${OPENGL_LIBRARIES}
8
+ exampleutil
9
+ - ${GLUT_glut_LIBRARY}
10
+ + GLUT::GLUT
11
+ imageioutil
12
+ webp
13
+ webpdemux)
14
+ @@ -543,6 +543,9 @@ if(WEBP_BUILD_VWEBP)
15
+ if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE))
16
+ find_package(X11 REQUIRED)
17
+ target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB})
18
+ + if(X11_Xrandr_FOUND) # due to glut linking xrandr if found
19
+ + target_link_libraries(vwebp ${X11_Xrandr_LIB})
20
+ + endif()
21
+ endif()
22
+ install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
23
+ if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/portfile.cmake ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO webmproject/libwebp
4
+ REF 9ce5843dbabcfd3f7c39ec7ceba9cbeb213cbfdf # v1.2.1
5
+ SHA512 43224caedb0d591ad1dd3872cd882c0fe255e24425f6da82fca212783ddb231326797a82ead0a1b8b15dc98db1cb05741e3a5e5131babbcc49a529a9f3253865
6
+ HEAD_REF master
7
+ PATCHES
8
+ 0001-build.patch
9
+ 0002-cmake-config-add-backwards-compatibility.patch
10
+ 0003-always-mux.patch #always build libwebpmux
11
+ 0004-add-missing-linked-library.patch
12
+ 0006-fix-dependecies-platform.patch
13
+ 0007-fix-arm-build.patch
14
+ 0008-sdl.patch
15
+ 0009-glut.patch
16
+ )
17
+
18
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
19
+ FEATURES
20
+ anim WEBP_BUILD_ANIM_UTILS
21
+ gif2webp WEBP_BUILD_GIF2WEBP
22
+ img2webp WEBP_BUILD_IMG2WEBP
23
+ vwebp WEBP_BUILD_VWEBP
24
+ vwebp-sdl WEBP_HAVE_SDL
25
+ info WEBP_BUILD_WEBPINFO
26
+ mux WEBP_BUILD_WEBPMUX
27
+ extras WEBP_BUILD_EXTRAS
28
+ nearlossless WEBP_NEAR_LOSSLESS
29
+ simd WEBP_ENABLE_SIMD
30
+ cwebp WEBP_BUILD_CWEBP
31
+ dwebp WEBP_BUILD_DWEBP
32
+ swap16bitcsp WEBP_ENABLE_SWAP_16BIT_CSP
33
+ unicode WEBP_UNICODE
34
+ libbwebpmux WEBP_BUILD_LIBWEBPMUX
35
+ )
36
+
37
+
38
+ if(VCPKG_TARGET_IS_LINUX)
39
+ 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")
40
+ endif()
41
+
42
+ if(VCPKG_TARGET_IS_OSX)
43
+ if("vwebp" IN_LIST FEATURES OR "extras" IN_LIST FEATURES)
44
+ message(FATAL_ERROR "Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP or extras on Mac!")
45
+ endif()
46
+ endif()
47
+
48
+ vcpkg_cmake_configure(
49
+ SOURCE_PATH "${SOURCE_PATH}"
50
+ OPTIONS
51
+ ${FEATURE_OPTIONS}
52
+ OPTIONS_DEBUG
53
+ -DCMAKE_DEBUG_POSTFIX=d
54
+ )
55
+
56
+ vcpkg_cmake_install()
57
+
58
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
59
+
60
+ vcpkg_copy_pdbs()
61
+ vcpkg_cmake_config_fixup(PACKAGE_NAME WebP CONFIG_PATH share/WebP/cmake) # find_package is called with WebP not libwebp
62
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
63
+
64
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
65
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebp.pc" "-lwebp" "-lwebpd")
66
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebpdecoder.pc" "-lwebpdecoder" "-lwebpdecoderd")
67
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebpdemux.pc" "-lwebpdemux" "-lwebpdemuxd")
68
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libwebpmux.pc" "-lwebpmux" "-lwebpmuxd")
69
+ endif()
70
+ vcpkg_fixup_pkgconfig()
71
+
72
+ set(BIN_NAMES get_disto gif2webp img2webp vwebp vwebp_sdl webpinfo webpmux webp_quality cwebp dwebp)
73
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/webp/")
74
+ foreach(tool ${BIN_NAMES})
75
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
76
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
77
+ endif()
78
+
79
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
80
+ file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/webp/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
81
+ endif()
82
+ endforeach()
83
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/webp")
84
+
85
+ #No tools
86
+ file(GLOB_RECURSE RESULT "${CURRENT_PACKAGES_DIR}/tools/")
87
+ list(LENGTH RESULT RES_LEN)
88
+ if(RES_LEN EQUAL 0)
89
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/")
90
+ endif()
91
+
92
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
93
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
94
+ endif()
95
+
96
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebp/vcpkg.json ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libwebp",
3
+ "version": "1.2.1",
4
+ "description": "WebP codec: library to encode and decode images in WebP format",
5
+ "homepage": "https://github.com/webmproject/libwebp",
6
+ "dependencies": [
7
+ {
8
+ "name": "libwebp",
9
+ "features": [
10
+ "unicode"
11
+ ],
12
+ "platform": "windows"
13
+ },
14
+ {
15
+ "name": "vcpkg-cmake",
16
+ "host": true
17
+ },
18
+ {
19
+ "name": "vcpkg-cmake-config",
20
+ "host": true
21
+ }
22
+ ],
23
+ "default-features": [
24
+ "nearlossless",
25
+ "simd"
26
+ ],
27
+ "features": {
28
+ "all": {
29
+ "description": "enable all features except for swap16bitcsp",
30
+ "dependencies": [
31
+ {
32
+ "name": "libwebp",
33
+ "features": [
34
+ "anim",
35
+ "cwebp",
36
+ "dwebp",
37
+ "gif2webp",
38
+ "img2webp",
39
+ "info",
40
+ "mux",
41
+ "nearlossless",
42
+ "simd"
43
+ ]
44
+ },
45
+ {
46
+ "name": "libwebp",
47
+ "features": [
48
+ "extras"
49
+ ],
50
+ "platform": "!osx"
51
+ },
52
+ {
53
+ "name": "libwebp",
54
+ "features": [
55
+ "vwebp-sdl"
56
+ ],
57
+ "platform": "!osx"
58
+ }
59
+ ]
60
+ },
61
+ "anim": {
62
+ "description": "Build animation utilities.",
63
+ "dependencies": [
64
+ {
65
+ "name": "libwebp",
66
+ "features": [
67
+ "img2webp",
68
+ "mux"
69
+ ]
70
+ }
71
+ ]
72
+ },
73
+ "cwebp": {
74
+ "description": "Build the cwebp command line tool."
75
+ },
76
+ "dwebp": {
77
+ "description": "Build the dwebp command line tool."
78
+ },
79
+ "extras": {
80
+ "description": "Build extras.",
81
+ "dependencies": [
82
+ {
83
+ "name": "libwebp",
84
+ "features": [
85
+ "vwebp"
86
+ ]
87
+ },
88
+ {
89
+ "name": "sdl1",
90
+ "platform": "windows"
91
+ }
92
+ ]
93
+ },
94
+ "gif2webp": {
95
+ "description": "Build the gif2webp conversion tool.",
96
+ "dependencies": [
97
+ "giflib"
98
+ ]
99
+ },
100
+ "img2webp": {
101
+ "description": "Build the img2webp animation tool.",
102
+ "dependencies": [
103
+ "libjpeg-turbo",
104
+ "libpng",
105
+ "tiff"
106
+ ]
107
+ },
108
+ "info": {
109
+ "description": "Build the webpinfo command line tool."
110
+ },
111
+ "libbwebpmux": {
112
+ "description": "Build the libwebpmux library"
113
+ },
114
+ "mux": {
115
+ "description": "Build the webpmux command line tool."
116
+ },
117
+ "nearlossless": {
118
+ "description": "Enable near-lossless encoding"
119
+ },
120
+ "simd": {
121
+ "description": "Enable any SIMD optimization."
122
+ },
123
+ "swap16bitcsp": {
124
+ "description": "Enable byte swap for 16 bit colorspaces."
125
+ },
126
+ "unicode": {
127
+ "description": "Build Unicode executables. (Adds definition UNICODE and _UNICODE)"
128
+ },
129
+ "vwebp": {
130
+ "description": "Build the vwebp viewer tool.",
131
+ "dependencies": [
132
+ {
133
+ "name": "freeglut",
134
+ "platform": "!osx"
135
+ },
136
+ "opengl"
137
+ ]
138
+ },
139
+ "vwebp-sdl": {
140
+ "description": "Build the vwebp viewer tool.",
141
+ "dependencies": [
142
+ {
143
+ "name": "libwebp",
144
+ "features": [
145
+ "vwebp"
146
+ ]
147
+ },
148
+ {
149
+ "name": "sdl1",
150
+ "platform": "windows"
151
+ }
152
+ ]
153
+ }
154
+ }
155
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/export-include-path.patch ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index f9b5557..ebc624b 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -1045,8 +1045,8 @@ file(RELATIVE_PATH
6
+ "${LWS_ABSOLUTE_INSTALL_CMAKE_DIR}"
7
+ "${LWS_ABSOLUTE_INSTALL_INCLUDE_DIR}") # Calculate the relative directory from the cmake dir.
8
+
9
+ -if (DEFINED REL_INCLUDE_DIR)
10
+ - set(LWS__INCLUDE_DIRS "\${LWS_CMAKE_DIR}/${REL_INCLUDE_DIR}")
11
+ +if (1)
12
+ + set(LWS__INCLUDE_DIRS "\${CMAKE_CURRENT_LIST_DIR}/../include")
13
+ endif()
14
+
15
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/libwebsockets-config.cmake.in
16
+ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
17
+ index 85b43d5..724f0b7 100644
18
+ --- a/lib/CMakeLists.txt
19
+ +++ b/lib/CMakeLists.txt
20
+ @@ -164,7 +164,7 @@ if (LWS_WITH_STATIC)
21
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
22
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
23
+ )
24
+ - target_include_directories(websockets PRIVATE ${LWS_LIB_BUILD_INC_PATHS})
25
+ + target_include_directories(websockets PRIVATE $<BUILD_INTERFACE:${LWS_LIB_BUILD_INC_PATHS}> PUBLIC $<INSTALL_INTERFACE:include>)
26
+ target_compile_definitions(websockets PRIVATE LWS_BUILDING_STATIC)
27
+
28
+ if (WIN32)
29
+ @@ -190,7 +190,7 @@ if (LWS_WITH_SHARED)
30
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
31
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
32
+ )
33
+ - target_include_directories(websockets_shared PRIVATE ${LWS_LIB_BUILD_INC_PATHS})
34
+ + target_include_directories(websockets_shared PRIVATE $<BUILD_INTERFACE:${LWS_LIB_BUILD_INC_PATHS}> PUBLIC $<INSTALL_INTERFACE:include>)
35
+ target_compile_definitions(websockets_shared PRIVATE LWS_BUILDING_SHARED)
36
+
37
+ # We want the shared lib to be named "libwebsockets"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/fix-build-error.patch ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 1e737e5..75534c1 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -422,6 +422,11 @@ set(LWS_LIBMOUNT_LIBRARIES CACHE PATH "Path to the libmount library")
6
+ set(LWS_EXT_PTHREAD_INCLUDE_DIR CACHE PATH "Path to an external pthreads include directory")
7
+ set(LWS_EXT_PTHREAD_LIBRARIES CACHE PATH "Path to an external pthreads library")
8
+
9
+ +if(WIN32)
10
+ + find_package(pthreads_windows REQUIRED)
11
+ + set(LWS_EXT_PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR})
12
+ + set(LWS_EXT_PTHREAD_LIBRARIES ${PThreads4W_LIBRARY})
13
+ +endif()
14
+
15
+ if (LWS_WITH_HTTP_STREAM_COMPRESSION)
16
+ set(LWS_WITH_ZLIB 1)
17
+ @@ -728,7 +733,7 @@ if (MSVC)
18
+ # Turn off pointless microsoft security warnings.
19
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
20
+ # Fail the build if any warnings
21
+ - add_compile_options(/W3 /WX)
22
+ + add_compile_options(/W3 /WX /wd4142 /wd4267 /wd4996)
23
+ endif(MSVC)
24
+
25
+ if (MINGW)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/fix-dependency-libuv.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/lib/event-libs/libuv/CMakeLists.txt b/lib/event-libs/libuv/CMakeLists.txt
2
+ index fb810a8..2258ade 100644
3
+ --- a/lib/event-libs/libuv/CMakeLists.txt
4
+ +++ b/lib/event-libs/libuv/CMakeLists.txt
5
+ @@ -36,7 +36,7 @@ set(LWS_LIBUV_INCLUDE_DIRS CACHE PATH "Path to the libuv include directory")
6
+ if ("${LWS_LIBUV_LIBRARIES}" STREQUAL "" OR "${LWS_LIBUV_INCLUDE_DIRS}" STREQUAL "")
7
+ if (NOT LIBUV_FOUND)
8
+ find_path(LIBUV_INCLUDE_DIRS NAMES uv.h)
9
+ - find_library(LIBUV_LIBRARIES NAMES uv)
10
+ + find_library(LIBUV_LIBRARIES NAMES uv libuv)
11
+ endif()
12
+ else()
13
+ set(LIBUV_LIBRARIES ${LWS_LIBUV_LIBRARIES})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/fix-find-openssl.patch ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/lib/tls/CMakeLists.txt b/lib/tls/CMakeLists.txt
2
+ --- a/lib/tls/CMakeLists.txt (revision a5aae049b2a386712e1be3b417915c0d44c7e675)
3
+ +++ b/lib/tls/CMakeLists.txt (date 1642427956730)
4
+ @@ -257,7 +257,6 @@
5
+ find_package(PkgConfig QUIET)
6
+ pkg_check_modules(PC_OPENSSL openssl QUIET)
7
+ find_package(OpenSSL REQUIRED)
8
+ - list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LIBRARIES})
9
+ set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} PARENT_SCOPE)
10
+ endif()
11
+ set(OPENSSL_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/portfile.cmake ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO warmcat/libwebsockets
4
+ REF a5aae049b2a386712e1be3b417915c0d44c7e675 # v4.3.0
5
+ SHA512 ab72201880360a3b0136497c1c1729656c3c07043f38cceec136f5671be15ab55c80136ec7480841175d3add711593ddde23cefd39ea9cb729ec0842950602dd
6
+ HEAD_REF master
7
+ PATCHES
8
+ fix-dependency-libuv.patch
9
+ fix-build-error.patch
10
+ export-include-path.patch
11
+ fix-find-openssl.patch
12
+ )
13
+
14
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC)
15
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LWS_WITH_SHARED)
16
+
17
+ ## All LWS options could be possible features:
18
+ # #
19
+ # # Major individual features
20
+ # #
21
+ # option(LWS_WITH_NETWORK "Compile with network-related code" ON)
22
+ # option(LWS_ROLE_H1 "Compile with support for http/1 (needed for ws)" ON)
23
+ # option(LWS_ROLE_WS "Compile with support for websockets" ON)
24
+ # option(LWS_ROLE_DBUS "Compile with support for DBUS" OFF)
25
+ # option(LWS_ROLE_RAW_PROXY "Raw packet proxy" OFF)
26
+ # option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" ON)
27
+ # option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF)
28
+ # option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF)
29
+ # option(LWS_IPV6 "Compile with support for ipv6" OFF)
30
+ # option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF)
31
+ # option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions" OFF)
32
+ # option(LWS_WITH_HTTP_PROXY "Support for HTTP proxying" OFF)
33
+ # option(LWS_WITH_ZIP_FOPS "Support serving pre-zipped files" OFF)
34
+ # option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF)
35
+ # option(LWS_WITH_GENERIC_SESSIONS "With the Generic Sessions plugin" OFF)
36
+ # option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF)
37
+ # option(LWS_WITH_ACCESS_LOG "Support generating Apache-compatible access logs" OFF)
38
+ # option(LWS_WITH_RANGES "Support http ranges (RFC7233)" OFF)
39
+ # option(LWS_WITH_SERVER_STATUS "Support json + jscript server monitoring" OFF)
40
+ # option(LWS_WITH_THREADPOOL "Managed worker thread pool support (relies on pthreads)" OFF)
41
+ # option(LWS_WITH_HTTP_STREAM_COMPRESSION "Support HTTP stream compression" OFF)
42
+ # option(LWS_WITH_HTTP_BROTLI "Also offer brotli http stream compression (requires LWS_WITH_HTTP_STREAM_COMPRESSION)" OFF)
43
+ # option(LWS_WITH_ACME "Enable support for ACME automatic cert acquisition + maintenance (letsencrypt etc)" OFF)
44
+ # option(LWS_WITH_HUBBUB "Enable libhubbub rewriting support" OFF)
45
+ # option(LWS_WITH_FTS "Full Text Search support" OFF)
46
+ # #
47
+ # # TLS library options... all except mbedTLS are basically OpenSSL variants.
48
+ # #
49
+ # option(LWS_WITH_SSL "Include SSL support (defaults to OpenSSL or similar, mbedTLS if LWS_WITH_MBEDTLS is set)" ON)
50
+ # option(LWS_WITH_MBEDTLS "Use mbedTLS (>=2.0) replacement for OpenSSL. When setting this, you also may need to specify LWS_MBEDTLS_LIBRARIES and LWS_MBEDTLS_INCLUDE_DIRS" OFF)
51
+ # option(LWS_WITH_BORINGSSL "Use BoringSSL replacement for OpenSSL" OFF)
52
+ # option(LWS_WITH_CYASSL "Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS" OFF)
53
+ # option(LWS_WITH_WOLFSSL "Use wolfSSL replacement for OpenSSL. When setting this, you also need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS" OFF)
54
+ # option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of the OS-installed CA root certs" ON)
55
+ # #
56
+ # # Event library options (may select multiple, or none for default poll()
57
+ # #
58
+ # option(LWS_WITH_LIBEV "Compile with support for libev" OFF)
59
+ # option(LWS_WITH_LIBUV "Compile with support for libuv" OFF)
60
+ # option(LWS_WITH_LIBEVENT "Compile with support for libevent" OFF)
61
+ # #
62
+ # # Static / Dynamic build options
63
+ # #
64
+ # option(LWS_WITH_STATIC "Build the static version of the library" ON)
65
+ # option(LWS_WITH_SHARED "Build the shared version of the library" ON)
66
+ # option(LWS_LINK_TESTAPPS_DYNAMIC "Link the test apps to the shared version of the library. Default is to link statically" OFF)
67
+ # option(LWS_STATIC_PIC "Build the static version of the library with position-independent code" OFF)
68
+ # #
69
+ # # Specific platforms
70
+ # #
71
+ # option(LWS_WITH_ESP32 "Build for ESP32" OFF)
72
+ # option(LWS_WITH_ESP32_HELPER "Build ESP32 helper" OFF)
73
+ # option(LWS_PLAT_OPTEE "Build for OPTEE" OFF)
74
+ # #
75
+ # # Client / Server / Test Apps build control
76
+ # #
77
+ # option(LWS_WITHOUT_CLIENT "Don't build the client part of the library" OFF)
78
+ # option(LWS_WITHOUT_SERVER "Don't build the server part of the library" OFF)
79
+ # option(LWS_WITHOUT_TESTAPPS "Don't build the libwebsocket-test-apps" OFF)
80
+ # option(LWS_WITHOUT_TEST_SERVER "Don't build the test server" OFF)
81
+ # option(LWS_WITHOUT_TEST_SERVER_EXTPOLL "Don't build the test server version that uses external poll" OFF)
82
+ # option(LWS_WITHOUT_TEST_PING "Don't build the ping test application" OFF)
83
+ # option(LWS_WITHOUT_TEST_CLIENT "Don't build the client test application" OFF)
84
+ # #
85
+ # # Extensions (permessage-deflate)
86
+ # #
87
+ # option(LWS_WITHOUT_EXTENSIONS "Don't compile with extensions" ON)
88
+ # #
89
+ # # Helpers + misc
90
+ # #
91
+ # option(LWS_WITHOUT_BUILTIN_GETIFADDRS "Don't use the BSD getifaddrs implementation from libwebsockets if it is missing (this will result in a compilation error) ... The default is to assume that your libc provides it. On some systems such as uclibc it doesn't exist." OFF)
92
+ # option(LWS_FALLBACK_GETHOSTBYNAME "Also try to do dns resolution using gethostbyname if getaddrinfo fails" OFF)
93
+ # option(LWS_WITHOUT_BUILTIN_SHA1 "Don't build the lws sha-1 (eg, because openssl will provide it" OFF)
94
+ # option(LWS_WITH_LATENCY "Build latency measuring code into the library" OFF)
95
+ # option(LWS_WITHOUT_DAEMONIZE "Don't build the daemonization api" ON)
96
+ # option(LWS_SSL_SERVER_WITH_ECDH_CERT "Include SSL server use ECDH certificate" OFF)
97
+ # option(LWS_WITH_LEJP "With the Lightweight JSON Parser" ON)
98
+ # option(LWS_WITH_SQLITE3 "Require SQLITE3 support" OFF)
99
+ # option(LWS_WITH_STRUCT_JSON "Generic struct serialization to and from JSON" ON)
100
+ # option(LWS_WITH_STRUCT_SQLITE3 "Generic struct serialization to and from SQLITE3" OFF)
101
+ # option(LWS_WITH_SMTP "Provide SMTP support" OFF)
102
+ # if (WIN32 OR LWS_WITH_ESP32)
103
+ # option(LWS_WITH_DIR "Directory scanning api support" OFF)
104
+ # option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF)
105
+ # else()
106
+ # option(LWS_WITH_DIR "Directory scanning api support" ON)
107
+ # option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" ON)
108
+ # endif()
109
+ # option(LWS_WITH_NO_LOGS "Disable all logging from being compiled in" OFF)
110
+ # option(LWS_AVOID_SIGPIPE_IGN "Android 7+ reportedly needs this" OFF)
111
+ # option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF)
112
+ # option(LWS_WITH_JOSE "JSON Web Signature / Encryption / Keys (RFC7515/6/) API" OFF)
113
+ # option(LWS_WITH_GENCRYPTO "Enable support for Generic Crypto apis independent of TLS backend" OFF)
114
+ # option(LWS_WITH_SELFTESTS "Selftests run at context creation" OFF)
115
+ # option(LWS_WITH_GCOV "Build with gcc gcov coverage instrumentation" OFF)
116
+ # option(LWS_WITH_EXPORT_LWSTARGETS "Export libwebsockets CMake targets. Disable if they conflict with an outer cmake project." ON)
117
+ # option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON)
118
+ # option(LWS_WITH_MINIMAL_EXAMPLES "Also build the normally standalone minimal examples, for QA" OFF)
119
+ # option(LWS_WITH_LWSAC "lwsac Chunk Allocation api" ON)
120
+ # option(LWS_WITH_CUSTOM_HEADERS "Store and allow querying custom HTTP headers (H1 only)" ON)
121
+ # option(LWS_WITH_DISKCACHE "Hashed cache directory with lazy LRU deletion to size limit" OFF)
122
+ # option(LWS_WITH_ASAN "Build with gcc runtime sanitizer options enabled (needs libasan)" OFF)
123
+ # option(LWS_WITH_DIR "Directory scanning api support" OFF)
124
+ # option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF)
125
+ # option(LWS_WITH_ZLIB "Include zlib support (required for extensions)" OFF)
126
+ # option(LWS_WITH_BUNDLED_ZLIB "Use bundled zlib version (Windows only)" ${LWS_WITH_BUNDLED_ZLIB_DEFAULT})
127
+ # option(LWS_WITH_MINIZ "Use miniz instead of zlib" OFF)
128
+ # option(LWS_WITH_DEPRECATED_LWS_DLL "Migrate to lws_dll2 instead ASAP" OFF)
129
+ # option(LWS_WITH_SEQUENCER "lws_seq_t support" ON)
130
+ # option(LWS_WITH_EXTERNAL_POLL "Support external POLL integration using callback messages (not recommended)" OFF)
131
+ # option(LWS_WITH_LWS_DSH "Support lws_dsh_t Disordered Shared Heap" OFF)
132
+ ##
133
+
134
+ set(EXTRA_ARGS)
135
+ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
136
+ set(EXTRA_ARGS "-DLWS_WITH_LIBUV=ON")
137
+ endif()
138
+
139
+ vcpkg_cmake_configure(
140
+ SOURCE_PATH "${SOURCE_PATH}"
141
+ OPTIONS
142
+ ${EXTRA_ARGS}
143
+ -DLWS_WITH_STATIC=${LWS_WITH_STATIC}
144
+ -DLWS_WITH_SHARED=${LWS_WITH_SHARED}
145
+ -DLWS_WITH_GENCRYPTO=ON
146
+ -DLWS_WITH_TLS=ON
147
+ -DLWS_WITH_BUNDLED_ZLIB=OFF
148
+ -DLWS_WITHOUT_TESTAPPS=ON
149
+ -DLWS_IPV6=ON
150
+ -DLWS_WITH_HTTP2=ON
151
+ -DLWS_WITH_HTTP_STREAM_COMPRESSION=ON # Since zlib is already a dependency
152
+ -DLWS_WITH_EXTERNAL_POLL=ON
153
+ # OPTIONS_RELEASE -DOPTIMIZE=1
154
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
155
+ )
156
+
157
+ vcpkg_cmake_install()
158
+
159
+ if (VCPKG_TARGET_IS_WINDOWS)
160
+ vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
161
+ else()
162
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libwebsockets)
163
+ endif()
164
+
165
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
166
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
167
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/libwebsockets-test-server")
168
+ file(READ "${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake" LIBWEBSOCKETSCONFIG_CMAKE)
169
+ string(REPLACE "/../include" "/../../include" LIBWEBSOCKETSCONFIG_CMAKE "${LIBWEBSOCKETSCONFIG_CMAKE}")
170
+ file(WRITE "${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake" "${LIBWEBSOCKETSCONFIG_CMAKE}")
171
+
172
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
173
+ vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake" "websockets_static.lib" "websockets.lib")
174
+ endif()
175
+
176
+ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
177
+ vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake" "websockets_static.lib" "websockets.lib")
178
+ endif()
179
+
180
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
181
+ if (VCPKG_TARGET_IS_WINDOWS)
182
+ file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/websockets_static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/websockets.lib")
183
+ file(RENAME "${CURRENT_PACKAGES_DIR}/lib/websockets_static.lib" "${CURRENT_PACKAGES_DIR}/lib/websockets.lib")
184
+ endif()
185
+ endif ()
186
+
187
+ vcpkg_copy_pdbs()
188
+ vcpkg_fixup_pkgconfig()
189
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lws_config.h" "${CURRENT_PACKAGES_DIR}" "")
190
+
191
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libwebsockets/vcpkg.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libwebsockets",
3
+ "version-semver": "4.3.0",
4
+ "port-version": 3,
5
+ "description": "Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server.",
6
+ "homepage": "https://github.com/warmcat/libwebsockets",
7
+ "supports": "!uwp",
8
+ "dependencies": [
9
+ {
10
+ "name": "libuv",
11
+ "platform": "!emscripten"
12
+ },
13
+ "openssl",
14
+ "pthreads",
15
+ {
16
+ "name": "vcpkg-cmake",
17
+ "host": true
18
+ },
19
+ {
20
+ "name": "vcpkg-cmake-config",
21
+ "host": true
22
+ },
23
+ "zlib"
24
+ ]
25
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxdiff/portfile.cmake ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(LIBXDIFF_REF 77e30f3190685efd87cce2c9c5d688cbaa1b0134)
2
+ set(LIBXDIFF_SHA512 c559b575e6d6f06f3b3064f3e077a15d8f57422340199215a4cbd7beab527bc250347c8779a8d6f8c4e41799a032431e83c7336f86569527ab754444455b8c87)
3
+
4
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED)
5
+
6
+ vcpkg_from_github(
7
+ OUT_SOURCE_PATH SOURCE_PATH
8
+ REPO Drako/libxdiff
9
+ REF ${LIBXDIFF_REF}
10
+ SHA512 ${LIBXDIFF_SHA512}
11
+ HEAD_REF master
12
+ )
13
+
14
+ vcpkg_configure_cmake(
15
+ SOURCE_PATH ${SOURCE_PATH}
16
+ PREFER_NINJA
17
+ OPTIONS -DBUILD_SHARED=${KEYSTONE_BUILD_SHARED}
18
+ )
19
+
20
+ vcpkg_install_cmake()
21
+
22
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
23
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
24
+
25
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
26
+ file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/xdiff.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
27
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/xdiff.dll")
28
+ endif()
29
+ endif()
30
+
31
+
32
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
33
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
34
+ file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/xdiff.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
35
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xdiff.dll")
36
+ endif()
37
+ endif()
38
+
39
+ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
40
+
41
+ vcpkg_copy_pdbs()
42
+
43
+ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XDiff TARGET_PATH share/XDiff)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxdiff/vcpkg.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libxdiff",
3
+ "version": "0.23",
4
+ "port-version": 2,
5
+ "description": "The LibXDiff library implements basic and yet complete functionalities to create file differences/patches to both binary and text files. The library uses memory files as file abstraction to achieve both performance and portability.",
6
+ "homepage": "https://github.com/Drako/libxdiff",
7
+ "supports": "!uwp"
8
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxlsxwriter/portfile.cmake ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO jmcnamara/libxlsxwriter
4
+ REF RELEASE_1.1.4
5
+ SHA512 fad36f7882fcb21b87e13cf603022cfad3f14e6f955a06e2771712facd0fe12f83f4d1655dc1a744724bda1ac83af7e7bf1393457c5507d8983f63002ab294b5
6
+ HEAD_REF master
7
+ )
8
+
9
+ if (VCPKG_TARGET_IS_UWP)
10
+ set(USE_WINDOWSSTORE ON)
11
+ else()
12
+ set(USE_WINDOWSSTORE OFF)
13
+ endif()
14
+
15
+ vcpkg_cmake_configure(
16
+ SOURCE_PATH "${SOURCE_PATH}"
17
+ OPTIONS
18
+ -DWINDOWSSTORE=${USE_WINDOWSSTORE}
19
+ )
20
+
21
+ vcpkg_cmake_install()
22
+ vcpkg_fixup_pkgconfig()
23
+ vcpkg_copy_pdbs()
24
+
25
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
26
+
27
+ file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
28
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxlsxwriter/vcpkg.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "libxlsxwriter",
3
+ "version-semver": "1.1.4",
4
+ "description": "Libxlsxwriter is a C library that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.",
5
+ "homepage": "https://github.com/jmcnamara/libxlsxwriter",
6
+ "dependencies": [
7
+ {
8
+ "name": "vcpkg-cmake",
9
+ "host": true
10
+ },
11
+ "zlib"
12
+ ]
13
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxml2/fix-uwp.patch ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 9b45d62..ba8bfec 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -129,6 +129,7 @@ endif()
6
+
7
+ if(MSVC)
8
+ configure_file(include/win32config.h config.h COPYONLY)
9
+ + add_compile_options(/wd4996)
10
+ else()
11
+ check_c_source_compiles("
12
+ void __attribute__((destructor))
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxml2/fix_cmakelist.patch ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index a437717ba..0a11039d1 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -1,6 +1,6 @@
6
+ cmake_minimum_required(VERSION 3.15)
7
+
8
+ -project(libxml2 VERSION 2.9.10 LANGUAGES C)
9
+ +project(libxml2 VERSION 2.9.12 LANGUAGES C)
10
+
11
+ include(CheckCSourceCompiles)
12
+ include(CheckFunctionExists)
13
+ @@ -465,15 +465,15 @@ endif()
14
+ if(LIBXML2_WITH_ICU)
15
+ target_link_libraries(LibXml2 PRIVATE ICU::data ICU::i18n ICU::uc)
16
+ if(WIN32)
17
+ - set(ICU_LIBS "-licudt -licuin -licuuc")
18
+ + set(ICU_LIBS "icu-i18n")
19
+ else()
20
+ - set(ICU_LIBS "-licudata -licui18n -licuuc")
21
+ + set(ICU_LIBS "icu-i18n")
22
+ endif()
23
+ endif()
24
+
25
+ if(LIBXML2_WITH_LZMA)
26
+ target_link_libraries(LibXml2 PRIVATE LibLZMA::LibLZMA)
27
+ - set(LZMA_LIBS "-llzma")
28
+ + set(LZMA_LIBS "liblzma")
29
+ endif()
30
+
31
+ if(LIBXML2_WITH_THREADS)
32
+ @@ -483,7 +483,7 @@ endif()
33
+
34
+ if(LIBXML2_WITH_ZLIB)
35
+ target_link_libraries(LibXml2 PRIVATE ZLIB::ZLIB)
36
+ - set(Z_LIBS "-lz")
37
+ + set(Z_LIBS "zlib")
38
+ endif()
39
+
40
+ set_target_properties(
41
+ @@ -495,24 +495,9 @@ set_target_properties(
42
+ PREFIX lib
43
+ VERSION ${PROJECT_VERSION}
44
+ )
45
+ -
46
+ +set(XML_LIB_NAME xml2)
47
+ if(MSVC)
48
+ - if(BUILD_SHARED_LIBS)
49
+ - set_target_properties(
50
+ - LibXml2
51
+ - PROPERTIES
52
+ - DEBUG_POSTFIX d
53
+ - )
54
+ - else()
55
+ - set_target_properties(
56
+ - LibXml2
57
+ - PROPERTIES
58
+ - DEBUG_POSTFIX sd
59
+ - MINSIZEREL_POSTFIX s
60
+ - RELEASE_POSTFIX s
61
+ - RELWITHDEBINFO_POSTFIX s
62
+ - )
63
+ - endif()
64
+ + set(XML_LIB_NAME libxml2)
65
+ endif()
66
+
67
+ install(FILES ${LIBXML2_HDRS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxml2/libxml COMPONENT development)
68
+ @@ -659,30 +644,30 @@ install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/libxml2 COMPONEN
69
+
70
+ configure_package_config_file(
71
+ libxml2-config.cmake.cmake.in libxml2-config.cmake
72
+ - INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION}
73
+ + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2
74
+ )
75
+
76
+ install(
77
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config.cmake
78
+ - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION}
79
+ + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2
80
+ COMPONENT development
81
+ )
82
+
83
+ write_basic_package_version_file(
84
+ ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake
85
+ VERSION ${PROJECT_VERSION}
86
+ - COMPATIBILITY ExactVersion
87
+ + COMPATIBILITY SameMinorVersion
88
+ )
89
+
90
+ install(
91
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libxml2-config-version.cmake
92
+ - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION}
93
+ + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2
94
+ COMPONENT development
95
+ )
96
+
97
+ install(
98
+ EXPORT LibXml2
99
+ - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2-${PROJECT_VERSION}
100
+ + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxml2
101
+ NAMESPACE LibXml2::
102
+ FILE libxml2-export.cmake
103
+ COMPONENT development
104
+ diff --git a/libxml-2.0.pc.in b/libxml-2.0.pc.in
105
+ index 2653a7c56..d1bff5bcc 100644
106
+ --- a/libxml-2.0.pc.in
107
+ +++ b/libxml-2.0.pc.in
108
+ @@ -7,7 +7,8 @@ modules=@WITH_MODULES@
109
+ Name: libXML
110
+ Version: @VERSION@
111
+ Description: libXML library version2.
112
+ -Requires:
113
+ -Libs: -L${libdir} -lxml2
114
+ -Libs.private: @ICU_LIBS@ @THREAD_LIBS@ @Z_LIBS@ @LZMA_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
115
+ +Requires:
116
+ +Requires.private: @ICU_LIBS@ @Z_LIBS@ @LZMA_LIBS@
117
+ +Libs: -L${libdir} -l@XML_LIB_NAME@
118
+ +Libs.private: @THREAD_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@
119
+ Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@
third-party/DPVO/Pangolin/scripts/vcpkg/ports/libxml2/portfile.cmake ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_gitlab(
2
+ GITLAB_URL https://gitlab.gnome.org/
3
+ OUT_SOURCE_PATH SOURCE_PATH
4
+ REPO GNOME/libxml2
5
+ REF b48e77cf4f6fa0792c5f4b639707a2b0675e461b
6
+ SHA512 2d20867961b8d8a0cb0411192146882b976c1276d2e8ecd9a7ee3f1eb287f64e59282736f58c641b66abf63ba45c9421f27e13ec09a0b10814cd56987b18cb5b
7
+ HEAD_REF master
8
+ PATCHES
9
+ fix_cmakelist.patch
10
+ fix-uwp.patch
11
+ )
12
+
13
+ if (VCPKG_TARGET_IS_UWP)
14
+ message(WARNING "Feature network couldn't be enabled on UWP, disable http and ftp automatically.")
15
+ set(ENABLE_NETWORK 0)
16
+ else()
17
+ set(ENABLE_NETWORK 1)
18
+ endif()
19
+
20
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
21
+ FEATURES
22
+ "tools" LIBXML2_WITH_PROGRAMS
23
+ )
24
+ vcpkg_cmake_configure(
25
+ SOURCE_PATH ${SOURCE_PATH}
26
+ OPTIONS
27
+ ${FEATURE_OPTIONS}
28
+ -DLIBXML2_WITH_TESTS=OFF
29
+ -DLIBXML2_WITH_HTTP=${ENABLE_NETWORK}
30
+ -DLIBXML2_WITH_FTP=${ENABLE_NETWORK}
31
+ -DLIBXML2_WITH_HTML=ON
32
+ -DLIBXML2_WITH_C14N=ON
33
+ -DLIBXML2_WITH_CATALOG=ON
34
+ -DLIBXML2_WITH_DEBUG=ON
35
+ -DLIBXML2_WITH_DOCB=ON
36
+ -DLIBXML2_WITH_ICONV=ON
37
+ -DLIBXML2_WITH_ISO8859X=ON
38
+ -DLIBXML2_WITH_ZLIB=ON
39
+ -DLIBXML2_WITH_ICU=OFF # Culprit of linkage issues? Solving this is probably another PR
40
+ -DLIBXML2_WITH_LZMA=ON
41
+ -DLIBXML2_WITH_LEGACY=ON
42
+ -DLIBXML2_WITH_MEM_DEBUG=OFF
43
+ -DLIBXML2_WITH_MODULES=ON
44
+ -DLIBXML2_WITH_OUTPUT=ON
45
+ -DLIBXML2_WITH_PATTERN=ON
46
+ -DLIBXML2_WITH_PUSH=ON
47
+ -DLIBXML2_WITH_PYTHON=OFF
48
+ -DLIBXML2_WITH_READER=ON
49
+ -DLIBXML2_WITH_REGEXPS=ON
50
+ -DLIBXML2_WITH_RUN_DEBUG=OFF
51
+ -DLIBXML2_WITH_SAX1=ON
52
+ -DLIBXML2_WITH_SCHEMAS=ON
53
+ -DLIBXML2_WITH_SCHEMATRON=ON
54
+ -DLIBXML2_WITH_THREADS=ON
55
+ -DLIBXML2_WITH_THREAD_ALLOC=OFF
56
+ -DLIBXML2_WITH_TREE=ON
57
+ -DLIBXML2_WITH_VALID=ON
58
+ -DLIBXML2_WITH_WRITER=ON
59
+ -DLIBXML2_WITH_XINCLUDE=ON
60
+ -DLIBXML2_WITH_XPATH=ON
61
+ -DLIBXML2_WITH_XPTR=ON
62
+ )
63
+
64
+ vcpkg_cmake_install()
65
+
66
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libxml2)
67
+ vcpkg_fixup_pkgconfig()
68
+
69
+ vcpkg_copy_pdbs()
70
+
71
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
72
+
73
+ if("tools" IN_LIST FEATURES)
74
+ vcpkg_copy_tools(TOOL_NAMES xmllint xmlcatalog AUTO_CLEAN)
75
+ endif()
76
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
77
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
78
+ endif()
79
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
80
+ set(_file "${CURRENT_PACKAGES_DIR}/include/libxml2/libxml/xmlexports.h")
81
+ file(READ "${_file}" _contents)
82
+ string(REPLACE "#ifdef LIBXML_STATIC" "#undef LIBXML_STATIC\n#define LIBXML_STATIC\n#ifdef LIBXML_STATIC" _contents "${_contents}")
83
+ file(WRITE "${_file}" "${_contents}")
84
+ endif()
85
+
86
+ file(COPY "${CURRENT_PACKAGES_DIR}/include/libxml2/" DESTINATION "${CURRENT_PACKAGES_DIR}/include") # TODO: Fix usage in all dependent ports hardcoding the wrong include path.
87
+
88
+ file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
89
+ file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
90
+
91
+ #Cleanup
92
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
93
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
94
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xml2Conf.sh" "${CURRENT_PACKAGES_DIR}/debug/lib/xml2Conf.sh")