Techt3o commited on
Commit
17aec1f
·
verified ·
1 Parent(s): 5a840a9

1d67c6b7e9b7678af1c5ac5903b7c435c9d8a182ca97befa3f351644f4c1d782

Browse files
Files changed (50) hide show
  1. third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/FindLZ4.cmake +13 -0
  2. third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/FindSnappy.cmake +13 -0
  3. third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/fix-windows-minmax.patch +12 -0
  4. third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/portfile.cmake +94 -0
  5. third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/reorder-glog-gflags.patch +28 -0
  6. third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/vcpkg.json +77 -0
  7. third-party/DPVO/Pangolin/scripts/vcpkg/ports/font-chef/disable-warnings-as-errors.patch +12 -0
  8. third-party/DPVO/Pangolin/scripts/vcpkg/ports/font-chef/portfile.cmake +24 -0
  9. third-party/DPVO/Pangolin/scripts/vcpkg/ports/font-chef/vcpkg.json +16 -0
  10. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/no-etc-symlinks.patch +19 -0
  11. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/portfile.cmake +80 -0
  12. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/vcpkg-cmake-wrapper.cmake.in +46 -0
  13. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/vcpkg.json +23 -0
  14. third-party/DPVO/Pangolin/scripts/vcpkg/ports/foonathan-memory/portfile.cmake +125 -0
  15. third-party/DPVO/Pangolin/scripts/vcpkg/ports/foonathan-memory/vcpkg.json +15 -0
  16. third-party/DPVO/Pangolin/scripts/vcpkg/ports/forge/cmake_config.patch +27 -0
  17. third-party/DPVO/Pangolin/scripts/vcpkg/ports/forge/portfile.cmake +37 -0
  18. third-party/DPVO/Pangolin/scripts/vcpkg/ports/forge/vcpkg.json +19 -0
  19. third-party/DPVO/Pangolin/scripts/vcpkg/ports/foxi/portfile.cmake +20 -0
  20. third-party/DPVO/Pangolin/scripts/vcpkg/ports/foxi/remove-test-targets.patch +60 -0
  21. third-party/DPVO/Pangolin/scripts/vcpkg/ports/foxi/vcpkg.json +14 -0
  22. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fp16/find-psimd.patch +31 -0
  23. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fp16/portfile.cmake +19 -0
  24. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fp16/vcpkg.json +9 -0
  25. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fplus/portfile.cmake +22 -0
  26. third-party/DPVO/Pangolin/scripts/vcpkg/ports/fplus/vcpkg.json +6 -0
  27. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/cmake_builds.patch +114 -0
  28. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/portfile.cmake +42 -0
  29. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/unix_headers.patch +32 -0
  30. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/vcpkg.json +22 -0
  31. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/fix-debug-macro.patch +35 -0
  32. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/macOS_Xquartz.patch +21 -0
  33. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/no_x64_enforcement.patch +17 -0
  34. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/portfile.cmake +50 -0
  35. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/usage +4 -0
  36. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/vcpkg-cmake-wrapper.cmake +33 -0
  37. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/vcpkg.json +17 -0
  38. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/windows-static-output-name.patch +29 -0
  39. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/x11-dependencies-export.patch +63 -0
  40. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/CMakeLists.txt +162 -0
  41. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h +6 -0
  42. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/FreeImageConfig-static.h +6 -0
  43. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch +89 -0
  44. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/fix-function-overload.patch +40 -0
  45. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/portfile.cmake +51 -0
  46. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-jpeg.patch +17 -0
  47. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-jxrlib.patch +14 -0
  48. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-libtiff.patch +204 -0
  49. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-openexr.patch +44 -0
  50. third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-openjpeg.patch +39 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/FindLZ4.cmake ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ find_path(LZ4_INCLUDE_DIR lz4.h)
2
+
3
+ find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
4
+ find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
5
+
6
+ include(SelectLibraryConfigurations)
7
+ select_library_configurations(LZ4)
8
+
9
+ include(FindPackageHandleStandardArgs)
10
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
11
+ LZ4 DEFAULT_MSG
12
+ LZ4_LIBRARY LZ4_INCLUDE_DIR
13
+ )
third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/FindSnappy.cmake ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ find_path(SNAPPY_INCLUDE_DIR snappy.h)
2
+
3
+ find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd)
4
+ find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy)
5
+
6
+ include(SelectLibraryConfigurations)
7
+ select_library_configurations(SNAPPY)
8
+
9
+ include(FindPackageHandleStandardArgs)
10
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
11
+ SNAPPY DEFAULT_MSG
12
+ SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR
13
+ )
third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/fix-windows-minmax.patch ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMake/FollyCompilerMSVC.cmake b/CMake/FollyCompilerMSVC.cmake
2
+ index ec2ce1a1d..16deda71c 100644
3
+ --- a/CMake/FollyCompilerMSVC.cmake
4
+ +++ b/CMake/FollyCompilerMSVC.cmake
5
+ @@ -289,6 +289,7 @@ function(apply_folly_compile_options_to_target THETARGET)
6
+ # And the extra defines:
7
+ target_compile_definitions(${THETARGET}
8
+ PUBLIC
9
+ + NOMINMAX
10
+ _CRT_NONSTDC_NO_WARNINGS # Don't deprecate posix names of functions.
11
+ _CRT_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps.
12
+ _SCL_SECURE_NO_WARNINGS # Don't deprecate the non _s versions of various standard library functions, because safety is for chumps.
third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/portfile.cmake ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ # Required to run build/generate_escape_tables.py et al.
4
+ vcpkg_find_acquire_program(PYTHON3)
5
+ get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
6
+ vcpkg_add_to_path("${PYTHON3_DIR}")
7
+
8
+ vcpkg_from_github(
9
+ OUT_SOURCE_PATH SOURCE_PATH
10
+ REPO facebook/folly
11
+ REF v2022.03.21.00
12
+ SHA512 4e0fda55f007179883af30024fe1d389642159b1b4c915f7ef1a3c1003c8c52e2370f53ffa79d5fa75533d33becfb946d2bcbb2abdc62b9a297f977403d13dd7
13
+ HEAD_REF main
14
+ PATCHES
15
+ reorder-glog-gflags.patch
16
+ disable-non-underscore-posix-names.patch
17
+ boost-1.70.patch
18
+ fix-windows-minmax.patch
19
+ )
20
+
21
+ file(COPY
22
+ "${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake"
23
+ "${CMAKE_CURRENT_LIST_DIR}/FindSnappy.cmake"
24
+ DESTINATION "${SOURCE_PATH}/CMake/"
25
+ )
26
+ file(REMOVE "${SOURCE_PATH}/CMake/FindGFlags.cmake")
27
+
28
+ if(VCPKG_CRT_LINKAGE STREQUAL static)
29
+ set(MSVC_USE_STATIC_RUNTIME ON)
30
+ else()
31
+ set(MSVC_USE_STATIC_RUNTIME OFF)
32
+ endif()
33
+
34
+ set(FEATURE_OPTIONS)
35
+
36
+ macro(feature FEATURENAME PACKAGENAME)
37
+ if("${FEATURENAME}" IN_LIST FEATURES)
38
+ list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=OFF)
39
+ else()
40
+ list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=ON)
41
+ endif()
42
+ endmacro()
43
+
44
+ feature(zlib ZLIB)
45
+ feature(bzip2 BZip2)
46
+ feature(lzma LibLZMA)
47
+ feature(lz4 LZ4)
48
+ feature(zstd Zstd)
49
+ feature(snappy Snappy)
50
+
51
+ vcpkg_cmake_configure(
52
+ SOURCE_PATH ${SOURCE_PATH}
53
+ OPTIONS
54
+ -DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME}
55
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON
56
+ -DCMAKE_DISABLE_FIND_PACKAGE_Libiberty=ON
57
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibAIO=ON
58
+ -DLIBAIO_FOUND=OFF
59
+ -DLIBURCU_FOUND=OFF
60
+ -DCMAKE_DISABLE_FIND_PACKAGE_LibURCU=ON
61
+ -DCMAKE_INSTALL_DIR=share/folly
62
+ ${FEATURE_OPTIONS}
63
+ )
64
+
65
+ vcpkg_cmake_install(ADD_BIN_TO_PATH)
66
+
67
+ vcpkg_copy_pdbs()
68
+
69
+ vcpkg_cmake_config_fixup()
70
+
71
+ # Release folly-targets.cmake does not link to the right libraries in debug mode.
72
+ # We substitute with generator expressions so that the right libraries are linked for debug and release.
73
+ set(FOLLY_TARGETS_CMAKE "${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake")
74
+ FILE(READ ${FOLLY_TARGETS_CMAKE} _contents)
75
+ string(REPLACE "\${VCPKG_IMPORT_PREFIX}/lib/zlib.lib" "ZLIB::ZLIB" _contents "${_contents}")
76
+ STRING(REPLACE "\${VCPKG_IMPORT_PREFIX}/lib/" "\${VCPKG_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
77
+ STRING(REPLACE "\${VCPKG_IMPORT_PREFIX}/debug/lib/" "\${VCPKG_IMPORT_PREFIX}/\$<\$<CONFIG:DEBUG>:debug/>lib/" _contents "${_contents}")
78
+ string(REPLACE "-vc140-mt.lib" "-vc140-mt\$<\$<CONFIG:DEBUG>:-gd>.lib" _contents "${_contents}")
79
+ FILE(WRITE ${FOLLY_TARGETS_CMAKE} "${_contents}")
80
+ FILE(READ "${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake" _contents)
81
+ FILE(WRITE "${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake"
82
+ "include(CMakeFindDependencyMacro)
83
+ find_dependency(Threads)
84
+ find_dependency(glog CONFIG)
85
+ find_dependency(gflags CONFIG REQUIRED)
86
+ find_dependency(ZLIB)
87
+ ${_contents}")
88
+
89
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
90
+
91
+ # Handle copyright
92
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
93
+
94
+ vcpkg_fixup_pkgconfig()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/reorder-glog-gflags.patch ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
2
+ index 92b8ce7..04589ed 100644
3
+ --- a/CMake/folly-deps.cmake
4
+ +++ b/CMake/folly-deps.cmake
5
+ @@ -52,6 +52,11 @@ find_package(DoubleConversion MODULE REQUIRED)
6
+ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
7
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
8
+
9
+ +find_package(Glog CONFIG REQUIRED)
10
+ +set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
11
+ +list(APPEND FOLLY_LINK_LIBRARIES glog::glog)
12
+ +list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR})
13
+ +
14
+ find_package(Gflags MODULE)
15
+ set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND})
16
+ if(LIBGFLAGS_FOUND)
17
+ @@ -61,11 +66,6 @@ if(LIBGFLAGS_FOUND)
18
+ set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR})
19
+ endif()
20
+
21
+ -find_package(Glog MODULE)
22
+ -set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
23
+ -list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY})
24
+ -list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR})
25
+ -
26
+ find_package(LibEvent MODULE REQUIRED)
27
+ list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB})
28
+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/folly/vcpkg.json ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "folly",
3
+ "version-string": "2022.03.21.00",
4
+ "description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
5
+ "homepage": "https://github.com/facebook/folly",
6
+ "license": "Apache-2.0",
7
+ "supports": "(windows & x64 & !uwp) | (!windows & (x64 | arm64))",
8
+ "dependencies": [
9
+ "boost-chrono",
10
+ "boost-context",
11
+ "boost-conversion",
12
+ "boost-crc",
13
+ "boost-date-time",
14
+ "boost-filesystem",
15
+ "boost-multi-index",
16
+ "boost-program-options",
17
+ "boost-regex",
18
+ "boost-smart-ptr",
19
+ "boost-system",
20
+ "boost-thread",
21
+ "double-conversion",
22
+ "fmt",
23
+ "gflags",
24
+ "glog",
25
+ "libevent",
26
+ "openssl",
27
+ {
28
+ "name": "vcpkg-cmake",
29
+ "host": true
30
+ },
31
+ {
32
+ "name": "vcpkg-cmake-config",
33
+ "host": true
34
+ }
35
+ ],
36
+ "default-features": [
37
+ "zlib"
38
+ ],
39
+ "features": {
40
+ "bzip2": {
41
+ "description": "Support bzip2 for compression",
42
+ "dependencies": [
43
+ "bzip2"
44
+ ]
45
+ },
46
+ "lz4": {
47
+ "description": "Support lz4 for compression",
48
+ "dependencies": [
49
+ "lz4"
50
+ ]
51
+ },
52
+ "lzma": {
53
+ "description": "Support LZMA for compression",
54
+ "dependencies": [
55
+ "liblzma"
56
+ ]
57
+ },
58
+ "snappy": {
59
+ "description": "Support Snappy for compression",
60
+ "dependencies": [
61
+ "snappy"
62
+ ]
63
+ },
64
+ "zlib": {
65
+ "description": "Support zlib for compression",
66
+ "dependencies": [
67
+ "zlib"
68
+ ]
69
+ },
70
+ "zstd": {
71
+ "description": "Support zstd for compression",
72
+ "dependencies": [
73
+ "zstd"
74
+ ]
75
+ }
76
+ }
77
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/font-chef/disable-warnings-as-errors.patch ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/font-chef/CMakeLists.txt b/src/font-chef/CMakeLists.txt
2
+ --- a/src/font-chef/CMakeLists.txt
3
+ +++ b/src/font-chef/CMakeLists.txt
4
+ @@ -68,7 +68,7 @@ target_include_directories(font-chef++ INTERFACE
5
+ if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
6
+ target_compile_options(font-chef PRIVATE
7
+ $<$<OR:$<C_COMPILER_ID:Clang>,$<C_COMPILER_ID:GNU>>:-Wall -Wextra -pedantic -fvisibility=hidden -Werror>
8
+ - $<$<C_COMPILER_ID:MSVC>:/W3 /WX /wd4820 /wd4668 /wd4204>
9
+ + $<$<C_COMPILER_ID:MSVC>:/W3 /wd4820 /wd4668 /wd4204>
10
+ )
11
+ endif()
12
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/font-chef/portfile.cmake ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO mobius3/font-chef
4
+ REF v1.1.0
5
+ SHA512 3df1e31e4405bcbb05ffed8fe618eb953498389adef3d83d337ac570644008bee031e08cd64382443ad123c4abf7e0acca5e3e16288caf6225672d6796a9494f
6
+ HEAD_REF master
7
+ PATCHES
8
+ disable-warnings-as-errors.patch # to workaround https://github.com/mobius3/font-chef/issues/3
9
+ )
10
+
11
+ vcpkg_cmake_configure(
12
+ SOURCE_PATH "${SOURCE_PATH}"
13
+ )
14
+
15
+ vcpkg_cmake_install()
16
+
17
+ vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
18
+
19
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
20
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
21
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
22
+ endif()
23
+
24
+ file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/font-chef/vcpkg.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "font-chef",
3
+ "version": "1.1.0",
4
+ "description": "A font cooking library",
5
+ "homepage": "https://github.com/mobius3/font-chef",
6
+ "dependencies": [
7
+ {
8
+ "name": "vcpkg-cmake",
9
+ "host": true
10
+ },
11
+ {
12
+ "name": "vcpkg-cmake-config",
13
+ "host": true
14
+ }
15
+ ]
16
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/no-etc-symlinks.patch ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/conf.d/link_confs.py 2022-03-24 04:13:59.000982000 +0900
2
+ +++ b/conf.d/link_confs.py 2022-03-24 04:14:46.271964000 +0900
3
+ @@ -4,6 +4,7 @@
4
+ import sys
5
+ import argparse
6
+ import platform
7
+ +import shutil
8
+
9
+ if __name__=='__main__':
10
+ parser = argparse.ArgumentParser()
11
+ @@ -32,7 +33,7 @@
12
+ except FileNotFoundError:
13
+ pass
14
+ try:
15
+ - os.symlink(src, dst)
16
+ + shutil.copyfile(src, dst)
17
+ except NotImplementedError:
18
+ # Not supported on this version of Windows
19
+ break
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/portfile.cmake ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(FONTCONFIG_VERSION 2.14.0)
2
+
3
+ vcpkg_from_gitlab(
4
+ GITLAB_URL https://gitlab.freedesktop.org
5
+ OUT_SOURCE_PATH SOURCE_PATH
6
+ REPO fontconfig/fontconfig
7
+ REF ${FONTCONFIG_VERSION}
8
+ SHA512 0f36fa503c0277750ff253534f9305c9b4c86fd0d88a470e3b666080951714c51f13a69eecab382d0a7883a07494fc71730213e6086194a92aa5dfc075789e85
9
+ HEAD_REF master
10
+ PATCHES
11
+ no-etc-symlinks.patch
12
+ )
13
+
14
+ vcpkg_find_acquire_program(GPERF)
15
+ get_filename_component(GPERF_PATH ${GPERF} DIRECTORY)
16
+ vcpkg_add_to_path(${GPERF_PATH})
17
+
18
+ vcpkg_configure_meson(
19
+ SOURCE_PATH ${SOURCE_PATH}
20
+ OPTIONS
21
+ -Ddoc=disabled
22
+ -Dcache-build=disabled
23
+ -Dtests=disabled
24
+ )
25
+ vcpkg_install_meson(ADD_BIN_TO_PATH)
26
+
27
+ vcpkg_copy_pdbs()
28
+ #Fix missing libintl static dependency
29
+ if(NOT VCPKG_TARGET_IS_MINGW AND VCPKG_TARGET_IS_WINDOWS)
30
+ if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
31
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fontconfig.pc" "-liconv" "-liconv -lintl")
32
+ endif()
33
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/fontconfig.pc" "-liconv" "-liconv -lintl")
34
+ endif()
35
+ vcpkg_fixup_pkgconfig()
36
+
37
+ # Fix paths in debug pc file.
38
+ set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/fontconfig.pc")
39
+ if(EXISTS "${_file}")
40
+ file(READ "${_file}" _contents)
41
+ string(REPLACE "/etc" "/../etc" _contents "${_contents}")
42
+ string(REPLACE "/var" "/../var" _contents "${_contents}")
43
+ file(WRITE "${_file}" "${_contents}")
44
+ endif()
45
+
46
+ # Make path to cache in fonts.conf relative
47
+ set(_file "${CURRENT_PACKAGES_DIR}/etc/fonts/fonts.conf")
48
+ if(EXISTS "${_file}")
49
+ vcpkg_replace_string("${_file}" "${CURRENT_PACKAGES_DIR}/var/cache/fontconfig" "./../../var/cache/fontconfig")
50
+ endif()
51
+
52
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var"
53
+ "${CURRENT_PACKAGES_DIR}/debug/share"
54
+ "${CURRENT_PACKAGES_DIR}/debug/etc")
55
+
56
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
57
+ if(VCPKG_TARGET_IS_WINDOWS)
58
+ set(DEFINE_FC_PUBLIC "#define FcPublic __declspec(dllimport)")
59
+ else()
60
+ set(DEFINE_FC_PUBLIC "#define FcPublic __attribute__((visibility(\"default\")))")
61
+ endif()
62
+ foreach(HEADER fcfreetype.h fontconfig.h)
63
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER}"
64
+ "#define FcPublic"
65
+ "${DEFINE_FC_PUBLIC}"
66
+ )
67
+ endforeach()
68
+ endif()
69
+
70
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
71
+
72
+ if(NOT VCPKG_TARGET_IS_LINUX)
73
+ set(VCPKG_TARGET_IS_LINUX 0) # To not leave empty AND statements in the wrapper
74
+ endif()
75
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
76
+
77
+ vcpkg_copy_tools(
78
+ TOOL_NAMES fc-match fc-cat fc-list fc-pattern fc-query fc-scan fc-cache fc-validate fc-conflist
79
+ AUTO_CLEAN
80
+ )
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/vcpkg-cmake-wrapper.cmake.in ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _find_package(${ARGS})
2
+ if(Fontconfig_FOUND) # theoretically this could be skipped. If the wrapper is installed it should be found!
3
+ find_package(Freetype)
4
+ if(Freetype_FOUND AND TARGET Fontconfig::Fontconfig)
5
+ if(TARGET Freetype::Freetype)
6
+ set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Freetype::Freetype")
7
+ else()
8
+ # TODO link Freetype libraries to the target if the target Freetype::Freetype is not defined;
9
+ endif()
10
+ endif()
11
+ if(FREETYPE_LIBRARIES)
12
+ list(APPEND Fontconfig_LIBRARIES "${FREETYPE_LIBRARIES}")
13
+ endif()
14
+ find_package(EXPAT)
15
+ if(EXPAT_FOUND AND TARGET Fontconfig::Fontconfig)
16
+ set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "EXPAT::EXPAT")
17
+ endif()
18
+ if(EXPAT_LIBRARIES)
19
+ list(APPEND Fontconfig_LIBRARIES "${EXPAT_LIBRARIES}")
20
+ endif()
21
+ include(SelectLibraryConfigurations)
22
+ find_library(Fontconfig_LIBRARY_DEBUG NAMES fontconfig fontconfigd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
23
+ find_library(Fontconfig_LIBRARY_RELEASE NAMES fontconfig NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
24
+ select_library_configurations(Fontconfig)
25
+ if(@VCPKG_TARGET_IS_LINUX@)
26
+ find_library(UUID_LIBRARY_DEBUG NAMES uuid uuidd uuid_d NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
27
+ find_library(UUID_LIBRARY_RELEASE NAMES uuid NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
28
+ select_library_configurations(UUID)
29
+ endif()
30
+ if(Fontconfig_LIBRARY_DEBUG AND TARGET Fontconfig::Fontconfig)
31
+ set_target_properties(Fontconfig::Fontconfig PROPERTIES IMPORTED_LOCATION_DEBUG "${Fontconfig_LIBRARY_DEBUG}")
32
+ if(UUID_LIBRARY_DEBUG AND @VCPKG_TARGET_IS_LINUX@)
33
+ set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<$<CONFIG:DEBUG>:${UUID_LIBRARY_DEBUG}>")
34
+ endif()
35
+ endif()
36
+ if(Fontconfig_LIBRARY_RELEASE AND TARGET Fontconfig::Fontconfig)
37
+ set_target_properties(Fontconfig::Fontconfig PROPERTIES IMPORTED_LOCATION_RELEASE "${Fontconfig_LIBRARY_RELEASE}")
38
+ if(UUID_LIBRARY_RELEASE AND @VCPKG_TARGET_IS_LINUX@)
39
+ set_property(TARGET Fontconfig::Fontconfig APPEND PROPERTY INTERFACE_LINK_LIBRARIES "$<$<NOT:$<CONFIG:DEBUG>>:${UUID_LIBRARY_RELEASE}>")
40
+ endif()
41
+ endif()
42
+
43
+ if(UUID_LIBRARIES AND @VCPKG_TARGET_IS_LINUX@)
44
+ list(APPEND Fontconfig_LIBRARIES "${UUID_LIBRARIES}")
45
+ endif()
46
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fontconfig/vcpkg.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fontconfig",
3
+ "version": "2.14.0",
4
+ "description": "Library for configuring and customizing font access.",
5
+ "homepage": "https://www.freedesktop.org/wiki/Software/fontconfig",
6
+ "license": "MIT",
7
+ "dependencies": [
8
+ "dirent",
9
+ "expat",
10
+ "freetype",
11
+ "gettext",
12
+ "libiconv",
13
+ {
14
+ "name": "libuuid",
15
+ "platform": "!windows & !osx & !mingw"
16
+ },
17
+ "pthread",
18
+ {
19
+ "name": "vcpkg-tool-meson",
20
+ "host": true
21
+ }
22
+ ]
23
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/foonathan-memory/portfile.cmake ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WINDOWS_EXPORT_ALL_SYMBOLS doesn't work.
2
+ # unresolved external symbol "public: static unsigned int const foonathan::memory::detail::memory_block_stack::implementation_offset
3
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
4
+
5
+ vcpkg_from_github(
6
+ OUT_SOURCE_PATH SOURCE_PATH
7
+ REPO foonathan/memory
8
+ REF 885a9d97bebe9a2f131d21d3c0928c42ab377c8b
9
+ SHA512 7ce78a6e67d590a41b7f8a3d4ae0f6c1fa157c561b718a63973dffc000df74a9f0a0d7955a099e84fbeb3cf4085092eb866a6b8cec8bafd50bdcee94d069f65d
10
+ HEAD_REF master
11
+ )
12
+
13
+ vcpkg_from_github(
14
+ OUT_SOURCE_PATH COMP_SOURCE_PATH
15
+ REPO foonathan/compatibility
16
+ REF cd142129e30f5b3e6c6d96310daf94242c0b03bf
17
+ SHA512 1d144f82ec46dcc546ee292846330d39536a3145e5a5d8065bda545f55699aeb9a4ef7dea5e5f684ce2327fad210488fe6bb4ba7f84ceac867ac1c72b90c6d69
18
+ HEAD_REF master
19
+ )
20
+
21
+ file(COPY ${COMP_SOURCE_PATH}/comp_base.cmake DESTINATION ${SOURCE_PATH}/cmake/comp)
22
+
23
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
24
+ tool FOONATHAN_MEMORY_BUILD_TOOLS
25
+ )
26
+
27
+ vcpkg_configure_cmake(
28
+ SOURCE_PATH ${SOURCE_PATH}
29
+ PREFER_NINJA
30
+ OPTIONS
31
+ ${FEATURE_OPTIONS}
32
+ -DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF
33
+ -DFOONATHAN_MEMORY_BUILD_TESTS=OFF
34
+ )
35
+
36
+ vcpkg_install_cmake()
37
+
38
+ if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake)
39
+ vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/foonathan_memory)
40
+ elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/foonathan_memory/cmake)
41
+ vcpkg_fixup_cmake_targets(CONFIG_PATH share/foonathan_memory/cmake TARGET_PATH share/foonathan_memory)
42
+ endif()
43
+
44
+ vcpkg_copy_pdbs()
45
+
46
+ # Place header files into the right folders
47
+ # The original layout is not a problem for CMake-based project.
48
+ file(COPY
49
+ ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/foonathan
50
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include
51
+ )
52
+ file(GLOB
53
+ COMP_INCLUDE_FILES
54
+ ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/comp/foonathan/*.hpp
55
+ )
56
+ file(COPY
57
+ ${COMP_INCLUDE_FILES}
58
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include/foonathan
59
+ )
60
+ file(COPY
61
+ ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/config_impl.hpp
62
+ DESTINATION ${CURRENT_PACKAGES_DIR}/include/foonathan/memory
63
+ )
64
+ file(REMOVE_RECURSE
65
+ ${CURRENT_PACKAGES_DIR}/include/foonathan_memory
66
+ )
67
+ vcpkg_replace_string(
68
+ ${CURRENT_PACKAGES_DIR}/share/foonathan_memory/foonathan_memory-config.cmake
69
+ "\${_IMPORT_PREFIX}/include/foonathan_memory/comp;\${_IMPORT_PREFIX}/include/foonathan_memory"
70
+ "\${_IMPORT_PREFIX}/include"
71
+ )
72
+ # Place header files into the right folders - Done!
73
+
74
+ # The Debug version of this lib is built with:
75
+ # #define FOONATHAN_MEMORY_DEBUG_FILL 1
76
+ # and Release version is built with:
77
+ # #define FOONATHAN_MEMORY_DEBUG_FILL 0
78
+ # We only have the Release version header files installed, however.
79
+ vcpkg_replace_string(
80
+ ${CURRENT_PACKAGES_DIR}/include/foonathan/memory/detail/debug_helpers.hpp
81
+ "#if FOONATHAN_MEMORY_DEBUG_FILL"
82
+ "#ifndef NDEBUG //#if FOONATHAN_MEMORY_DEBUG_FILL"
83
+ )
84
+
85
+ file(REMOVE_RECURSE
86
+ ${CURRENT_PACKAGES_DIR}/debug/include
87
+ ${CURRENT_PACKAGES_DIR}/debug/share
88
+ )
89
+
90
+ file(REMOVE
91
+ ${CURRENT_PACKAGES_DIR}/debug/LICENSE
92
+ ${CURRENT_PACKAGES_DIR}/debug/README.md
93
+ ${CURRENT_PACKAGES_DIR}/LICENSE
94
+ ${CURRENT_PACKAGES_DIR}/README.md
95
+ )
96
+
97
+ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR
98
+ VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
99
+ set(EXECUTABLE_SUFFIX ".exe")
100
+ else()
101
+ set(EXECUTABLE_SUFFIX "")
102
+ endif()
103
+
104
+ if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX})
105
+ file(COPY
106
+ ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX}
107
+ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}
108
+ )
109
+ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
110
+
111
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
112
+ file(REMOVE_RECURSE
113
+ ${CURRENT_PACKAGES_DIR}/bin
114
+ ${CURRENT_PACKAGES_DIR}/debug/bin
115
+ )
116
+ else()
117
+ file(REMOVE
118
+ ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX}
119
+ ${CURRENT_PACKAGES_DIR}/debug/bin/nodesize_dbg${EXECUTABLE_SUFFIX}
120
+ )
121
+ endif()
122
+ endif()
123
+
124
+ # Handle copyright
125
+ configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/foonathan-memory/vcpkg.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "foonathan-memory",
3
+ "version-string": "2019-07-21",
4
+ "port-version": 2,
5
+ "description": "STL compatible C++ memory allocator library",
6
+ "homepage": "https://foonathan.net/doc/memory/",
7
+ "default-features": [
8
+ "tool"
9
+ ],
10
+ "features": {
11
+ "tool": {
12
+ "description": "Build foonathan memory tool"
13
+ }
14
+ }
15
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/forge/cmake_config.patch ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeModules/ForgeConfig.cmake.in b/CMakeModules/ForgeConfig.cmake.in
2
+ index 6fb18ac..5a3b000 100644
3
+ --- a/CMakeModules/ForgeConfig.cmake.in
4
+ +++ b/CMakeModules/ForgeConfig.cmake.in
5
+ @@ -83,3 +83,22 @@ if ((TARGET Forge::forge AND Forge_BINARY_EXISTS) OR TARGET forge)
6
+ else ()
7
+ set(Forge_FOUND OFF)
8
+ endif ()
9
+ +
10
+ +if(Forge_FOUND)
11
+ + # Check for dependencies when Forge binary and cmake files are found
12
+ + include(CMakeFindDependencyMacro)
13
+ +
14
+ + find_dependency(glad CONFIG)
15
+ + find_dependency(glfw3 CONFIG)
16
+ + find_dependency(freetype CONFIG)
17
+ + find_dependency(freeimage CONFIG)
18
+ + find_dependency(OpenGL)
19
+ +
20
+ + if(NOT WIN32)
21
+ + find_package(PkgConfig REQUIRED)
22
+ + pkg_check_modules(fontconfig REQUIRED)
23
+ + if(NOT fontconfig_FOUND)
24
+ + message(FATAL_ERROR "Please install Fontconfig dependency")
25
+ + endif()
26
+ + endif()
27
+ +endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/forge/portfile.cmake ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
2
+ message(FATAL_ERROR "This port currently only supports x64 architecture")
3
+ endif()
4
+
5
+ vcpkg_from_github(
6
+ OUT_SOURCE_PATH SOURCE_PATH
7
+ REPO arrayfire/forge
8
+ REF v1.0.8
9
+ SHA512 08e5eb89d80f7fa3310f0eb37481492b5c1dfff00b33c308169862d8b25cf93ad1d9c0db78667c0207a7f6f8ca4046c196bd3a987af839ea1864b49c738ee8e3
10
+ HEAD_REF master
11
+ PATCHES cmake_config.patch
12
+ )
13
+ file(REMOVE ${SOURCE_PATH}/CMakeModules/FindOpenGL.cmake)
14
+
15
+ vcpkg_configure_cmake(
16
+ SOURCE_PATH ${SOURCE_PATH}
17
+ OPTIONS
18
+ -DFG_BUILD_DOCS=OFF
19
+ -DFG_BUILD_EXAMPLES=OFF
20
+ -DFG_INSTALL_BIN_DIR=bin
21
+ -DFG_INSTALL_CMAKE_DIR=share/Forge
22
+ )
23
+
24
+ vcpkg_install_cmake()
25
+ vcpkg_fixup_cmake_targets(CONFIG_PATH share/Forge TARGET_PATH share/Forge)
26
+
27
+ file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/bin/* ${CURRENT_PACKAGES_DIR}/debug/bin/*)
28
+ list(FILTER DLLS EXCLUDE REGEX "forge\\.dll\$")
29
+ file(REMOVE_RECURSE
30
+ ${CURRENT_PACKAGES_DIR}/debug/include
31
+ ${CURRENT_PACKAGES_DIR}/debug/share
32
+ ${CURRENT_PACKAGES_DIR}/debug/examples
33
+ ${CURRENT_PACKAGES_DIR}/examples
34
+ ${DLLS}
35
+ )
36
+
37
+ file(INSTALL ${SOURCE_PATH}/.github/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/forge/vcpkg.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "forge",
3
+ "version-semver": "1.0.8",
4
+ "description": "An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend.",
5
+ "homepage": "https://github.com/arrayfire/forge",
6
+ "supports": "x64",
7
+ "dependencies": [
8
+ "boost-functional",
9
+ {
10
+ "name": "fontconfig",
11
+ "platform": "!windows"
12
+ },
13
+ "freeimage",
14
+ "freetype",
15
+ "glad",
16
+ "glfw3",
17
+ "glm"
18
+ ]
19
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/foxi/portfile.cmake ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO houseroad/foxi
4
+ REF c278588e34e535f0bb8f00df3880d26928038cad
5
+ SHA512 ad42cfd70e40ba0f0a9187b34ae9e3bd361c8c0038669f4c1591c4f7421d12ad93f76f42b33c2575eea1a3ddb3ff781da2895cdc636df5b60422598f450203c7
6
+ PATCHES
7
+ remove-test-targets.patch
8
+ )
9
+
10
+ vcpkg_cmake_configure(
11
+ SOURCE_PATH "${SOURCE_PATH}"
12
+ )
13
+ vcpkg_cmake_install()
14
+
15
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
16
+
17
+ file(REMOVE_RECURSE
18
+ "${CURRENT_PACKAGES_DIR}/debug/include"
19
+ "${CURRENT_PACKAGES_DIR}/debug/share"
20
+ )
third-party/DPVO/Pangolin/scripts/vcpkg/ports/foxi/remove-test-targets.patch ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index b406d0f..c5d04d5 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -65,7 +65,7 @@ if(MSVC)
6
+ add_msvc_runtime_flag(foxi_loader)
7
+ endif()
8
+
9
+ -if (NOT ANDROID AND NOT IOS)
10
+ +if (FALSE)
11
+ # ---[ FOXI wrapper
12
+ add_library(foxi_wrapper MODULE foxi/onnxifi_wrapper.c)
13
+ target_include_directories(foxi_wrapper PRIVATE
14
+ @@ -93,17 +93,6 @@ if (NOT ANDROID AND NOT IOS)
15
+ endif()
16
+ endif()
17
+
18
+ -# ---[ FOXI dummy backend
19
+ -add_library(foxi_dummy SHARED foxi/onnxifi_dummy.c)
20
+ -target_include_directories(foxi_dummy PRIVATE
21
+ - $<BUILD_INTERFACE:${FOXI_ROOT}>
22
+ - $<INSTALL_INTERFACE:include>)
23
+ -target_link_libraries(foxi_dummy PUBLIC foxi ${CMAKE_DL_LIBS})
24
+ -target_compile_definitions(foxi_dummy PRIVATE ONNXIFI_BUILD_LIBRARY=TRUE)
25
+ -if(MSVC)
26
+ - add_msvc_runtime_flag(foxi_dummy)
27
+ -endif()
28
+ -
29
+ install(DIRECTORY ${FOXI_ROOT}/foxi
30
+ DESTINATION include
31
+ FILES_MATCHING
32
+ @@ -114,10 +103,10 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/foxi
33
+ PATTERN "*.h")
34
+
35
+ install(TARGETS
36
+ - foxi foxi_dummy foxi_loader
37
+ + foxi_loader
38
+ EXPORT ONNXTargets DESTINATION lib)
39
+
40
+ -if(NOT ANDROID AND NOT IOS)
41
+ +if(FALSE)
42
+ install(TARGETS foxi_wrapper
43
+ EXPORT ONNXTargets DESTINATION lib)
44
+ endif()
45
+
46
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
47
+ index c5d04d5..cc7d18a 100644
48
+ --- a/CMakeLists.txt
49
+ +++ b/CMakeLists.txt
50
+ @@ -61,9 +61,6 @@ set_target_properties(foxi_loader
51
+ C_EXTENSIONS
52
+ NO)
53
+ target_link_libraries(foxi_loader PUBLIC foxi ${CMAKE_DL_LIBS})
54
+ -if(MSVC)
55
+ - add_msvc_runtime_flag(foxi_loader)
56
+ -endif()
57
+
58
+ if (FALSE)
59
+ # ---[ FOXI wrapper
60
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/foxi/vcpkg.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "foxi",
3
+ "version-date": "2021-12-01",
4
+ "description": "ONNXIFI with Facebook Extension",
5
+ "homepage": "https://github.com/houseroad/foxi",
6
+ "license": "MIT",
7
+ "supports": "!uwp",
8
+ "dependencies": [
9
+ {
10
+ "name": "vcpkg-cmake",
11
+ "host": true
12
+ }
13
+ ]
14
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fp16/find-psimd.patch ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ --- a/CMakeLists.txt
3
+ +++ b/CMakeLists.txt
4
+ @@ -33,7 +33,8 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps
5
+ SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
6
+ CACHE PATH "Confu-style dependencies binary directory")
7
+
8
+ -IF(NOT DEFINED PSIMD_SOURCE_DIR)
9
+ +find_path(PSIMD_INCLUDE_DIRS "psimd.h")
10
+ +IF(FALSE)
11
+ MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)")
12
+ CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt")
13
+ EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
14
+ @@ -76,7 +77,7 @@ ELSE()
15
+ ENDIF()
16
+ TARGET_INCLUDE_DIRECTORIES(fp16 INTERFACE
17
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
18
+ - $<INSTALL_INTERFACE:include>)
19
+ + $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:${PSIMD_INCLUDE_DIRS}>)
20
+
21
+ INSTALL(FILES include/fp16.h
22
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
23
+ @@ -90,7 +91,7 @@ INSTALL(FILES
24
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fp16)
25
+
26
+ # ---[ Configure psimd
27
+ -IF(NOT TARGET psimd)
28
+ +IF(FALSE)
29
+ ADD_SUBDIRECTORY(
30
+ "${PSIMD_SOURCE_DIR}"
31
+ "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fp16/portfile.cmake ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO Maratyszcza/fp16
4
+ REF 4dfe081cf6bcd15db339cf2680b9281b8451eeb3
5
+ SHA512 e79a1f6f8d4aeca85982158d5b070923d31d4f2062ed84cfa6f26c47a34f2e8ac49e0f330b7d49f5732d5e1eec6e7afccdac43645070060fb7827e2ce261dd3e
6
+ PATCHES
7
+ find-psimd.patch
8
+ )
9
+ vcpkg_configure_cmake(
10
+ SOURCE_PATH ${SOURCE_PATH}
11
+ PREFER_NINJA
12
+ OPTIONS
13
+ -DFP16_BUILD_TESTS=OFF
14
+ -DFP16_BUILD_BENCHMARKS=OFF
15
+ )
16
+ vcpkg_install_cmake()
17
+
18
+ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
19
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fp16/vcpkg.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fp16",
3
+ "version-date": "2021-02-21",
4
+ "description": "Header-only library for conversion to/from half-precision floating point formats",
5
+ "homepage": "https://github.com/Maratyszcza/FP16",
6
+ "dependencies": [
7
+ "psimd"
8
+ ]
9
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fplus/portfile.cmake ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO Dobiasd/FunctionalPlus
4
+ REF v0.2.14-p0
5
+ SHA512 f6232140fc343521bc484c7fa1a9d4942fbfc078be1cefa7b34c33632ec23d55827d13319f7b7a5535c5eedeb3161e15f84ecb80aa110685dbfc2c932c57284b
6
+ HEAD_REF master
7
+ )
8
+
9
+ vcpkg_configure_cmake(
10
+ SOURCE_PATH ${SOURCE_PATH}
11
+ PREFER_NINJA
12
+ OPTIONS
13
+ -DFPLUS_BUILD_EXAMPLES=OFF
14
+ -DFunctionalPlus_INSTALL_CMAKEDIR=share/FunctionalPlus
15
+ )
16
+
17
+ vcpkg_install_cmake()
18
+
19
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
20
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
21
+
22
+ configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/fplus/vcpkg.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "name": "fplus",
3
+ "version-semver": "0.2.14-p0",
4
+ "description": "Functional Programming Library for C++. Write concise and readable C++ code",
5
+ "homepage": "https://github.com/Dobiasd/FunctionalPlus"
6
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/cmake_builds.patch ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 963c530..656ce14 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -1,6 +1,6 @@
6
+ # cmake project file by Prakash Punnoor
7
+ # improved by Ryan Pavlik
8
+ -cmake_minimum_required(VERSION 2.6)
9
+ +cmake_minimum_required(VERSION 2.8.12)
10
+
11
+ project(Alut C)
12
+
13
+ @@ -27,7 +27,6 @@ include_directories(${Alut_SOURCE_DIR}/include)
14
+
15
+ # What to build?
16
+ option(BUILD_EXAMPLES "build example applications" ON)
17
+ -option(BUILD_STATIC "build static library too" OFF)
18
+ option(BUILD_TESTS "build the test-suite" ON)
19
+
20
+ # How to build it?
21
+ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
22
+ index b72d1a1..5fc6cdc 100644
23
+ --- a/src/CMakeLists.txt
24
+ +++ b/src/CMakeLists.txt
25
+ @@ -39,35 +39,7 @@ set(ALUT_HEADERS
26
+ ../include/AL/alut.h)
27
+ source_group(APIHeader FILES ${ALUT_HEADERS})
28
+
29
+ -
30
+ -if(BUILD_STATIC)
31
+ - # we can't create a static library with the same name
32
+ - # as the shared one, so we copy it over after creation
33
+ - add_library(alut_static STATIC ${ALUT_SOURCES} ${ALUT_INTERNAL_HEADERS} ${ALUT_HEADERS})
34
+ - target_link_libraries(alut_static ${OPENAL_LIBRARY} ${ADD_LIBS})
35
+ - if(UNIX)
36
+ - target_link_libraries(alut_static m)
37
+ - endif()
38
+ - if(NOT WIN32)
39
+ - # TODO this is an inelegant hack...
40
+ - add_custom_command(TARGET
41
+ - alut_static
42
+ - POST_BUILD
43
+ - COMMAND
44
+ - ${CMAKE_COMMAND}
45
+ - ARGS
46
+ - -E
47
+ - copy
48
+ - ${CMAKE_BINARY_DIR}/src/${CMAKE_STATIC_LIBRARY_PREFIX}alut_static${CMAKE_STATIC_LIBRARY_SUFFIX}
49
+ - ${CMAKE_BINARY_DIR}/src/${CMAKE_STATIC_LIBRARY_PREFIX}alut${CMAKE_STATIC_LIBRARY_SUFFIX})
50
+ - install_files(/lib${LIB_SUFFIX}
51
+ - FILES
52
+ - ${CMAKE_STATIC_LIBRARY_PREFIX}alut${CMAKE_STATIC_LIBRARY_SUFFIX})
53
+ - endif()
54
+ -endif()
55
+ -
56
+ -
57
+ -add_library(alut SHARED ${ALUT_SOURCES} ${ALUT_INTERNAL_HEADERS} ${ALUT_HEADERS})
58
+ +add_library(alut ${ALUT_SOURCES} ${ALUT_INTERNAL_HEADERS} ${ALUT_HEADERS})
59
+ set_property(TARGET
60
+ alut
61
+ PROPERTY
62
+ @@ -80,12 +52,40 @@ set_target_properties(alut
63
+ SOVERSION
64
+ ${MAJOR_VERSION})
65
+ target_link_libraries(alut ${OPENAL_LIBRARY})
66
+ +target_include_directories(alut PUBLIC ${OPENAL_INCLUDE_DIR})
67
+ if(UNIX)
68
+ target_link_libraries(alut m)
69
+ endif()
70
+ +if(NOT BUILD_SHARED_LIBS)
71
+ + target_compile_definitions(alut PUBLIC ALUT_BUILD_STATIC)
72
+ +endif()
73
+
74
+ install(TARGETS alut
75
+ + EXPORT "FreeALUTTargets"
76
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
77
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
78
+ RUNTIME DESTINATION bin
79
+ - PUBLIC_HEADER DESTINATION include/AL)
80
+ + PUBLIC_HEADER DESTINATION include/AL
81
+ + )
82
+ +
83
+ +include(CMakePackageConfigHelpers)
84
+ +
85
+ +set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/FreeALUTConfigVersion.cmake")
86
+ +set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/FreeALUTConfig.cmake")
87
+ +set(namespace "FreeALUT::")
88
+ +
89
+ +write_basic_package_version_file("${version_config}"
90
+ + COMPATIBILITY SameMajorVersion
91
+ + VERSION ${PACKAGE_VERSION})
92
+ +
93
+ +configure_package_config_file("Config.cmake.in"
94
+ + "${project_config}"
95
+ + INSTALL_DESTINATION
96
+ + lib${LIB_SUFFIX}/cmake/freealut)
97
+ +
98
+ +install(FILES "${project_config}" "${version_config}"
99
+ + DESTINATION lib${LIB_SUFFIX}/cmake/freealut)
100
+ +
101
+ +install(EXPORT "FreeALUTTargets"
102
+ + NAMESPACE "${namespace}"
103
+ + DESTINATION lib${LIB_SUFFIX}/cmake/freealut)
104
+ diff --git a/src/Config.cmake.in b/src/Config.cmake.in
105
+ new file mode 100644
106
+ index 0000000..2a20f59
107
+ --- /dev/null
108
+ +++ b/src/Config.cmake.in
109
+ @@ -0,0 +1,5 @@
110
+ +
111
+ +@PACKAGE_INIT@
112
+ +
113
+ +include("${CMAKE_CURRENT_LIST_DIR}/FreeALUTTargets.cmake")
114
+ +check_required_components("FreeALUT")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/portfile.cmake ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO vancegroup/freealut
4
+ REF fc814e316c2bfa6e05b723b8cc9cb276da141aae
5
+ SHA512 046990cc13822ca6eea0b8e412aa95a994b881429e0b15cefee379f08bd9636d4a4598292a8d46b30c3cd06814bfaeae3298e8ef4087a46eede344f3880e9fed
6
+ HEAD_REF master
7
+ PATCHES
8
+ cmake_builds.patch
9
+ unix_headers.patch
10
+ )
11
+
12
+ vcpkg_cmake_configure(
13
+ SOURCE_PATH ${SOURCE_PATH}
14
+ PREFER_NINJA
15
+ DISABLE_PARALLEL_CONFIGURE
16
+ OPTIONS
17
+ -DBUILD_EXAMPLES=OFF
18
+ -DBUILD_TESTS=OFF
19
+ )
20
+
21
+ vcpkg_cmake_install()
22
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
23
+ vcpkg_fixup_pkgconfig()
24
+ vcpkg_copy_pdbs()
25
+
26
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
27
+ "${CURRENT_PACKAGES_DIR}/debug/include"
28
+ )
29
+
30
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
31
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
32
+ endif()
33
+
34
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/freealut-config")
35
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/freealut-config")
36
+ endif()
37
+
38
+ if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/freealut-config")
39
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/freealut-config")
40
+ endif()
41
+
42
+ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/unix_headers.patch ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/include/AL/alut.h b/include/AL/alut.h
2
+ index 4b05a3c..1084604 100644
3
+ --- a/include/AL/alut.h
4
+ +++ b/include/AL/alut.h
5
+ @@ -1,24 +1,18 @@
6
+ #if !defined(AL_ALUT_H)
7
+ #define AL_ALUT_H
8
+
9
+ -#if defined(_MSC_VER)
10
+ #include <alc.h>
11
+ #include <al.h>
12
+ -#elif defined(__APPLE__)
13
+ -#include <OpenAL/alc.h>
14
+ -#include <OpenAL/al.h>
15
+ -#else
16
+ -#include <AL/al.h>
17
+ -#include <AL/alc.h>
18
+ -#endif
19
+
20
+ #if defined(__cplusplus)
21
+ extern "C" {
22
+ #endif
23
+
24
+ #if defined(_WIN32) && !defined(_XBOX)
25
+ - #if defined (ALUT_BUILD_LIBRARY)
26
+ + #if defined(ALUT_BUILD_LIBRARY)
27
+ #define ALUT_API __declspec(dllexport)
28
+ + #elif defined(ALUT_BUILD_STATIC)
29
+ + #define ALUT_API extern
30
+ #else
31
+ #define ALUT_API __declspec(dllimport)
32
+ #endif
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freealut/vcpkg.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "freealut",
3
+ "version": "1.1.0",
4
+ "port-version": 1,
5
+ "description": [
6
+ "FreeALUT is a free implementation of OpenAL's ALUT standard.",
7
+ "ALUT is a set of portable functions which remove the annoying details of getting an audio application started. It is the OpenAL counterpart of what GLUT is for OpenGL. "
8
+ ],
9
+ "homepage": "https://github.com/vancegroup/freealut",
10
+ "supports": "!uwp",
11
+ "dependencies": [
12
+ "openal-soft",
13
+ {
14
+ "name": "vcpkg-cmake",
15
+ "host": true
16
+ },
17
+ {
18
+ "name": "vcpkg-cmake-config",
19
+ "host": true
20
+ }
21
+ ]
22
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/fix-debug-macro.patch ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/include/GL/freeglut_std.h b/include/GL/freeglut_std.h
2
+ index a658c7c..a5efb3b 100644
3
+ --- a/include/GL/freeglut_std.h
4
+ +++ b/include/GL/freeglut_std.h
5
+ @@ -70,7 +70,7 @@
6
+
7
+ /* Link with Win32 static freeglut lib */
8
+ # if FREEGLUT_LIB_PRAGMAS
9
+ -# ifdef NDEBUG
10
+ +# if defined(NDEBUG) || !defined(_DEBUG)
11
+ # pragma comment (lib, "freeglut_static.lib")
12
+ # else
13
+ # pragma comment (lib, "freeglut_staticd.lib")
14
+ @@ -88,7 +88,7 @@
15
+
16
+ /* Link with Win32 shared freeglut lib */
17
+ # if FREEGLUT_LIB_PRAGMAS
18
+ -# ifdef NDEBUG
19
+ +# if defined(NDEBUG) || !defined(_DEBUG)
20
+ # pragma comment (lib, "freeglut.lib")
21
+ # else
22
+ # pragma comment (lib, "freeglutd.lib")
23
+ diff --git a/src/blackberry/fg_main_blackberry.c b/src/blackberry/fg_main_blackberry.c
24
+ index a1b9cbb..a20c53d 100644
25
+ --- a/src/blackberry/fg_main_blackberry.c
26
+ +++ b/src/blackberry/fg_main_blackberry.c
27
+ @@ -31,7 +31,7 @@
28
+ #include "fg_internal.h"
29
+ #include "egl/fg_window_egl.h"
30
+
31
+ -#ifdef NDEBUG
32
+ +#if defined(NDEBUG) || !defined(_DEBUG)
33
+ #define LOGI(...)
34
+ #endif
35
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/macOS_Xquartz.patch ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 6f403af..ce6f9f2 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -258,6 +258,16 @@ ENDIF()
6
+ IF(FREEGLUT_GLES)
7
+ LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES)
8
+ LIST(APPEND LIBS GLESv2 GLESv1_CM EGL)
9
+ +ELSEIF(APPLE)
10
+ + # on OSX FindOpenGL uses framework version of OpenGL, but we need X11 version
11
+ + FIND_PATH(GLX_INCLUDE_DIR GL/glx.h
12
+ + PATHS /opt/X11/include /usr/X11/include /usr/X11R6/include)
13
+ + FIND_LIBRARY(OPENGL_gl_LIBRARY GL
14
+ + PATHS /opt/X11/lib /usr/X11/lib /usr/X11R6/lib)
15
+ + FIND_LIBRARY(OPENGL_glu_LIBRARY GLU
16
+ + PATHS /opt/X11/lib /usr/X11/lib /usr/X11R6/lib)
17
+ + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY})
18
+ + INCLUDE_DIRECTORIES(${GLX_INCLUDE_DIR})
19
+ ELSE()
20
+ FIND_PACKAGE(OpenGL REQUIRED)
21
+ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/no_x64_enforcement.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt.orig b/CMakeLists.txt
2
+ index 6f403af..d1ba4e7 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -418,12 +418,6 @@ IF(WIN32)
6
+ IF(FREEGLUT_REPLACE_GLUT)
7
+ SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME})
8
+ ENDIF()
9
+ - # need to set machine:x64 for linker, at least for VC10, and
10
+ - # doesn't hurt for older compilers:
11
+ - # http://public.kitware.com/Bug/view.php?id=11240#c22768
12
+ - IF (CMAKE_CL_64)
13
+ - SET_TARGET_PROPERTIES(freeglut_static PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64")
14
+ - ENDIF()
15
+ ENDIF()
16
+ ELSE()
17
+ # on UNIX we need to make sure:
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/portfile.cmake ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO FreeGLUTProject/freeglut
4
+ REF v3.2.2
5
+ SHA512 caaed8af95c2d0ecbc785229e26433978a0f606ae2b9f0b3cd794bb5bb70a1cc54d21f941a1a03e20c7e0fa3eba9d54a21d6e23e44f243899c0fdf146066cf29
6
+ HEAD_REF master
7
+ PATCHES
8
+ x11-dependencies-export.patch
9
+ macOS_Xquartz.patch
10
+ fix-debug-macro.patch
11
+ no_x64_enforcement.patch
12
+ windows-static-output-name.patch
13
+ )
14
+
15
+ if(NOT VCPKG_TARGET_IS_WINDOWS)
16
+ message("Freeglut currently requires the following libraries from the system package manager:\n opengl\n glu\n libx11\n xrandr\n xi\n xxf86vm\n\nThese can be installed on Ubuntu systems via apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev\nOn macOS Xquartz is required.")
17
+ endif()
18
+
19
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FREEGLUT_STATIC)
20
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FREEGLUT_DYNAMIC)
21
+
22
+ vcpkg_cmake_configure(
23
+ SOURCE_PATH "${SOURCE_PATH}"
24
+ OPTIONS
25
+ -DFREEGLUT_BUILD_STATIC_LIBS=${FREEGLUT_STATIC}
26
+ -DFREEGLUT_BUILD_SHARED_LIBS=${FREEGLUT_DYNAMIC}
27
+ -DFREEGLUT_BUILD_DEMOS=OFF
28
+ -DINSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it
29
+ )
30
+ vcpkg_cmake_install()
31
+ vcpkg_copy_pdbs()
32
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/FreeGLUT)
33
+ vcpkg_fixup_pkgconfig()
34
+
35
+ # Rename static lib (otherwise it's incompatible with FindGLUT.cmake)
36
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
37
+ vcpkg_replace_string(
38
+ "${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h"
39
+ "ifdef FREEGLUT_STATIC"
40
+ "if 1 //ifdef FREEGLUT_STATIC"
41
+ )
42
+ endif()
43
+
44
+ # Clean
45
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
46
+
47
+ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/glut")
48
+
49
+ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
50
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/usage ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ The package freeglut is compatible with built-in CMake targets:
2
+
3
+ find_package(GLUT REQUIRED)
4
+ target_link_libraries(main PRIVATE GLUT::GLUT)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/vcpkg-cmake-wrapper.cmake ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ _find_package(${ARGS})
2
+ if(GLUT_FOUND AND UNIX AND NOT ANDROID)
3
+ cmake_policy(PUSH)
4
+ cmake_policy(SET CMP0012 NEW)
5
+ cmake_policy(SET CMP0054 NEW)
6
+ cmake_policy(SET CMP0057 NEW)
7
+
8
+ if(GLUT_LINK_LIBRARIES)
9
+ # Since CMake 3.22, FindGLUT.cmake loads the glut pkg-config module.
10
+ # We need `-lglut` resolved to an absolute path.
11
+ set(GLUT_LIBRARIES "${GLUT_LINK_LIBRARIES}")
12
+ else()
13
+ find_package(X11)
14
+ # Before CMake 3.14, FindX11.cmake doesn't create imported targets.
15
+ # For X11, we simply assume shared linkage of system libs,
16
+ # so order and transitive usage requirements don't matter.
17
+ if(X11_Xrandr_FOUND AND NOT "Xrandr" IN_LIST GLUT_LIBRARIES)
18
+ list(APPEND GLUT_LIBRARIES "${X11_Xrandr_LIB}")
19
+ set_property(TARGET GLUT::GLUT APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${X11_Xrandr_LIB}")
20
+ endif()
21
+ # X11_xf86vmode_FOUND for CMake < 3.14
22
+ if((X11_xf86vm_FOUND OR X11_xf86vmode_FOUND) AND NOT "Xxf86vm" IN_LIST GLUT_LIBRARIES)
23
+ list(APPEND GLUT_LIBRARIES "${X11_Xxf86vm_LIB}")
24
+ set_property(TARGET GLUT::GLUT APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${X11_Xxf86vm_LIB}")
25
+ endif()
26
+ if(X11_Xi_FOUND AND NOT GLUT_Xi_LIBRARY AND NOT "Xi" IN_LIST GLUT_LIBRARIES)
27
+ list(APPEND GLUT_LIBRARIES "${X11_Xi_LIB}")
28
+ set_property(TARGET GLUT::GLUT APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${X11_Xi_LIB}")
29
+ endif()
30
+ endif()
31
+
32
+ cmake_policy(POP)
33
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/vcpkg.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "freeglut",
3
+ "version": "3.2.2",
4
+ "description": "Open source implementation of GLUT with source and binary backwards compatibility.",
5
+ "homepage": "https://sourceforge.net/projects/freeglut/",
6
+ "license": null,
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/freeglut/windows-static-output-name.patch ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index aec0a27..73ccbdb 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -429,7 +429,7 @@ IF(WIN32)
6
+ ENDIF()
7
+ IF(FREEGLUT_BUILD_STATIC_LIBS)
8
+ TARGET_COMPILE_DEFINITIONS(freeglut_static PUBLIC FREEGLUT_STATIC)
9
+ - IF(FREEGLUT_REPLACE_GLUT)
10
+ + IF(1)
11
+ SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME})
12
+ ENDIF()
13
+ ENDIF()
14
+ diff --git a/include/GL/freeglut_std.h b/include/GL/freeglut_std.h
15
+ index a5efb3b..6bdcdfb 100644
16
+ --- a/include/GL/freeglut_std.h
17
+ +++ b/include/GL/freeglut_std.h
18
+ @@ -71,9 +71,9 @@
19
+ /* Link with Win32 static freeglut lib */
20
+ # if FREEGLUT_LIB_PRAGMAS
21
+ # if defined(NDEBUG) || !defined(_DEBUG)
22
+ -# pragma comment (lib, "freeglut_static.lib")
23
+ +# pragma comment (lib, "freeglut.lib")
24
+ # else
25
+ -# pragma comment (lib, "freeglut_staticd.lib")
26
+ +# pragma comment (lib, "freeglutd.lib")
27
+ # endif
28
+ # endif
29
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeglut/x11-dependencies-export.patch ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 6f403af..4ced28a 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -72,7 +72,7 @@ SET(FREEGLUT_HEADERS
6
+ include/GL/freeglut_ext.h
7
+ include/GL/freeglut_std.h
8
+ )
9
+ -IF(FREEGLUT_REPLACE_GLUT)
10
+ +IF(TRUE)
11
+ LIST(APPEND FREEGLUT_HEADERS
12
+ include/GL/glut.h
13
+ )
14
+ @@ -319,23 +319,27 @@ IF(CMAKE_COMPILER_IS_GNUCC)
15
+ ENDIF()
16
+ ENDIF(CMAKE_COMPILER_IS_GNUCC)
17
+
18
+ +SET(xlibs_private "")
19
+ INCLUDE(CheckIncludeFiles)
20
+ IF(UNIX AND NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND))
21
+ FIND_PACKAGE(X11 REQUIRED)
22
+ - INCLUDE_DIRECTORIES(${X11_X11_INCLUDE_PATH})
23
+ - LIST(APPEND LIBS ${X11_X11_LIB})
24
+ + LIST(APPEND LIBS X11::X11)
25
+ + set(xlibs_private "-lX11")
26
+ IF(X11_Xrandr_FOUND)
27
+ SET(HAVE_X11_EXTENSIONS_XRANDR_H TRUE)
28
+ - LIST(APPEND LIBS ${X11_Xrandr_LIB})
29
+ + LIST(APPEND LIBS X11::Xrandr)
30
+ + STRING(APPEND xlibs_private " -lXrandr")
31
+ ENDIF()
32
+ - IF(X11_xf86vmode_FOUND)
33
+ + IF(X11_Xxf86vm_FOUND)
34
+ SET(HAVE_X11_EXTENSIONS_XF86VMODE_H TRUE)
35
+ - LIST(APPEND LIBS ${X11_Xxf86vm_LIB})
36
+ + LIST(APPEND LIBS X11::Xxf86vm)
37
+ + STRING(APPEND xlibs_private " -lXxf86vm")
38
+ ENDIF()
39
+ IF(X11_Xinput_FOUND)
40
+ # Needed for multi-touch:
41
+ CHECK_INCLUDE_FILES("${X11_Xinput_INCLUDE_PATH}/X11/extensions/XInput2.h" HAVE_X11_EXTENSIONS_XINPUT2_H)
42
+ - LIST(APPEND LIBS ${X11_Xinput_LIB})
43
+ + LIST(APPEND LIBS X11::Xi)
44
+ + STRING(APPEND xlibs_private " -lXi")
45
+ ELSE()
46
+ MESSAGE(FATAL_ERROR "Missing X11's XInput.h (X11/extensions/XInput.h)")
47
+ ENDIF()
48
+ @@ -586,13 +590,13 @@ ELSEIF(FREEGLUT_GLES)
49
+ ELSEIF(FREEGLUT_WAYLAND)
50
+ SET(PC_LIBS_PRIVATE "-lwayland-client -lwayland-cursor -lwayland-egl -lGLESv2 -lGLESv1_CM -lEGL -lxkbcommon -lm")
51
+ ELSE()
52
+ - SET(PC_LIBS_PRIVATE "-lX11 -lXxf86vm -lXrandr -lGLESv2 -lGLESv1_CM -lEGL -lm")
53
+ + SET(PC_LIBS_PRIVATE "${xlibs_private} -lGLESv2 -lGLESv1_CM -lEGL -lm")
54
+ ENDIF()
55
+ ELSE()
56
+ IF(FREEGLUT_WAYLAND)
57
+ SET(PC_LIBS_PRIVATE "-lwayland-client -lwayland-cursor -lwayland-egl -lGL -lxkbcommon -lm")
58
+ ELSE()
59
+ - SET(PC_LIBS_PRIVATE "-lX11 -lXxf86vm -lXrandr -lGL -lm")
60
+ + SET(PC_LIBS_PRIVATE "${xlibs_private} -lGL -lm")
61
+ ENDIF()
62
+ ENDIF()
63
+ # Client applications need to define FreeGLUT GLES version to
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/CMakeLists.txt ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.4)
2
+
3
+ include(GNUInstallDirs)
4
+
5
+ project(FreeImage C CXX)
6
+
7
+ if(MSVC)
8
+ add_definitions("-D_CRT_SECURE_NO_WARNINGS")
9
+ set(CMAKE_CXX_FLAGS "/wd4828 ${CMAKE_CXX_FLAGS}")
10
+ endif()
11
+
12
+ find_package(ZLIB REQUIRED)
13
+ find_package(PNG REQUIRED)
14
+ find_package(JPEG REQUIRED)
15
+ find_package(TIFF REQUIRED)
16
+ find_package(OpenJPEG REQUIRED)
17
+ find_package(WebP CONFIG REQUIRED)
18
+ find_package(JXR REQUIRED)
19
+ find_package(LibRaw REQUIRED)
20
+ find_package(OpenEXR REQUIRED)
21
+
22
+ option(BUILD_SHARED_LIBS "Build shared libraries" ON)
23
+ option(INSTALL_HEADERS "Install the development headers" ON)
24
+
25
+ set(REAL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source)
26
+
27
+ # Add a debug postfix
28
+ set(CMAKE_DEBUG_POSTFIX "d")
29
+
30
+ # List the public header files
31
+ set(PUBLIC_HEADERS ${REAL_SOURCE_DIR}/FreeImage.h)
32
+
33
+ # List the private header files
34
+ set(ROOT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/CacheFile.h
35
+ ${REAL_SOURCE_DIR}/FreeImageIO.h
36
+ ${REAL_SOURCE_DIR}/MapIntrospector.h
37
+ ${REAL_SOURCE_DIR}/Plugin.h
38
+ ${REAL_SOURCE_DIR}/Quantizers.h
39
+ ${REAL_SOURCE_DIR}/ToneMapping.h
40
+ ${REAL_SOURCE_DIR}/Utilities.h)
41
+
42
+ file(GLOB FREEIMAGE_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImage/*.h)
43
+ file(GLOB FREEIMAGE_TOOLKIT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.h)
44
+ file(GLOB METADATA_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/Metadata/*.h)
45
+
46
+ set(PRIVATE_HEADERS ${ROOT_PRIVATE_HEADERS}
47
+ ${FREEIMAGE_PRIVATE_HEADERS}
48
+ ${FREEIMAGE_TOOLKIT_PRIVATE_HEADERS}
49
+ ${METADATA_PRIVATE_HEADERS})
50
+
51
+ # List the source files
52
+ file(GLOB DEPRECATION_SRCS ${REAL_SOURCE_DIR}/DeprecationManager/*.cpp)
53
+ file(GLOB FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.cpp)
54
+ file(GLOB FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/*.cpp)
55
+ file(GLOB METADATA_SRCS ${REAL_SOURCE_DIR}/Metadata/*.cpp)
56
+
57
+ # The G3 plugin is disabled because it require the private copy of tiff
58
+ list(REMOVE_ITEM FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/PluginG3.cpp)
59
+
60
+ # The JPEGTransform plugin is disable because it requires a private copy of jpeg
61
+ list(REMOVE_ITEM FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/JPEGTransform.cpp)
62
+
63
+
64
+ set(SRCS ${DEPRECATION_SRCS}
65
+ ${FREEIMAGE_SRCS}
66
+ ${FREEIMAGE_TOOLKIT_SRCS}
67
+ ${METADATA_SRCS}
68
+ )
69
+
70
+ # If FreeImage is used as a static library, FREEIMAGE_LIB
71
+ # needs to be defined (at the C preprocessor level) to correctly
72
+ # define (to nothing instead of _declspec(dllimport) ) the DLL_API macro.
73
+ # For this purpouse we include (depending on the BUILD_SHARED_LIBS )
74
+ # the appropriate FreeImageConfig.h .
75
+ if(BUILD_SHARED_LIBS)
76
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
77
+ else()
78
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
79
+ endif()
80
+ list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h)
81
+
82
+ add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/FreeImage.rc)
83
+
84
+ if(BUILD_SHARED_LIBS)
85
+ target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS)
86
+ else()
87
+ target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB)
88
+ endif()
89
+
90
+ target_include_directories(FreeImage PRIVATE ${REAL_SOURCE_DIR}
91
+ ${ZLIB_INCLUDE_DIRS}
92
+ ${JPEG_INCLUDE_DIRS}
93
+ ${TIFF_INCLUDE_DIRS}
94
+ ${PNG_INCLUDE_DIRS}
95
+ ${OPENJPEG_INCLUDE_DIRS}
96
+ ${JXR_INCLUDE_DIRS}
97
+ ${LibRaw_INCLUDE_DIRS}
98
+ ${CMAKE_CURRENT_BINARY_DIR}
99
+ PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
100
+
101
+
102
+ target_link_libraries(FreeImage ${ZLIB_LIBRARIES}
103
+ ${JPEG_LIBRARIES}
104
+ ${TIFF_LIBRARIES}
105
+ ${PNG_LIBRARIES}
106
+ ${OPENJPEG_LIBRARIES}
107
+ WebP::webp WebP::webpdemux WebP::libwebpmux WebP::webpdecoder
108
+ ${JXR_LIBRARIES}
109
+ ${LibRaw_LIBRARIES}
110
+ OpenEXR::IlmImf)
111
+
112
+ target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS})
113
+
114
+ # FreeImagePlus
115
+ file(GLOB FREEIMAGEPLUS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/src/*.cpp)
116
+ add_library(FreeImagePlus
117
+ ${FREEIMAGEPLUS_SOURCES}
118
+ ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h
119
+ ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc)
120
+
121
+ if(BUILD_SHARED_LIBS)
122
+ target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS)
123
+ else()
124
+ target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB)
125
+ endif()
126
+
127
+ target_include_directories(FreeImagePlus PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus
128
+ ${CMAKE_CURRENT_BINARY_DIR}
129
+ ${REAL_SOURCE_DIR}
130
+ PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
131
+
132
+ target_link_libraries(FreeImagePlus PUBLIC FreeImage)
133
+
134
+ list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h)
135
+
136
+ install(TARGETS FreeImage FreeImagePlus
137
+ EXPORT freeimage-targets
138
+ COMPONENT runtime
139
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
140
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
141
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
142
+
143
+ install(EXPORT freeimage-targets NAMESPACE freeimage:: DESTINATION share/freeimage)
144
+
145
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake"
146
+ "include(CMakeFindDependencyMacro)
147
+ find_dependency(ZLIB)
148
+ find_dependency(PNG)
149
+ find_dependency(JPEG)
150
+ find_dependency(TIFF)
151
+ find_dependency(OpenJPEG)
152
+ find_dependency(WebP CONFIG)
153
+ find_dependency(JXR)
154
+ find_dependency(LibRaw)
155
+ find_dependency(OpenEXR)
156
+ include(\"\${CMAKE_CURRENT_LIST_DIR}/freeimage-targets.cmake\")
157
+ ")
158
+
159
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake DESTINATION share/freeimage)
160
+ if(INSTALL_HEADERS)
161
+ install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
162
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #ifndef FREEIMAGE_CONFIG_H
2
+ #define FREEIMAGE_CONFIG_H
3
+
4
+ #undef FREEIMAGE_LIB
5
+
6
+ #endif
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/FreeImageConfig-static.h ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #ifndef FREEIMAGE_CONFIG_H
2
+ #define FREEIMAGE_CONFIG_H
3
+
4
+ #define FREEIMAGE_LIB
5
+
6
+ #endif
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Source/FreeImage.h b/Source/FreeImage.h
2
+ index 12182cd..ebd0453 100644
3
+ --- a/Source/FreeImage.h
4
+ +++ b/Source/FreeImage.h
5
+ @@ -410,16 +410,20 @@ FI_ENUM(FREE_IMAGE_FORMAT) {
6
+ FIF_DDS = 24,
7
+ FIF_GIF = 25,
8
+ FIF_HDR = 26,
9
+ - FIF_FAXG3 = 27,
10
+ - FIF_SGI = 28,
11
+ - FIF_EXR = 29,
12
+ - FIF_J2K = 30,
13
+ - FIF_JP2 = 31,
14
+ - FIF_PFM = 32,
15
+ - FIF_PICT = 33,
16
+ - FIF_RAW = 34,
17
+ - FIF_WEBP = 35,
18
+ - FIF_JXR = 36
19
+ +/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of
20
+ + FreeImage, since it requires usage of the vendored copy of libtiff. */
21
+ +#if 0
22
+ + FIF_FAXG3 = 27,
23
+ +#endif
24
+ + FIF_SGI = 27,
25
+ + FIF_EXR = 28,
26
+ + FIF_J2K = 29,
27
+ + FIF_JP2 = 30,
28
+ + FIF_PFM = 31,
29
+ + FIF_PICT = 32,
30
+ + FIF_RAW = 33,
31
+ + FIF_WEBP = 34,
32
+ + FIF_JXR = 35
33
+ };
34
+
35
+ /** Image type used in FreeImage.
36
+ @@ -476,6 +480,9 @@ FI_ENUM(FREE_IMAGE_DITHER) {
37
+ /** Lossless JPEG transformations
38
+ Constants used in FreeImage_JPEGTransform
39
+ */
40
+ +/* vcpkg: The JPEGTransform functions are deliberately disabled in our build
41
+ + of FreeImage, since they require usage of the vendored copy of libjpeg. */
42
+ +#if 0
43
+ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
44
+ FIJPEG_OP_NONE = 0, //! no transformation
45
+ FIJPEG_OP_FLIP_H = 1, //! horizontal flip
46
+ @@ -486,6 +493,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) {
47
+ FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation
48
+ FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw)
49
+ };
50
+ +#endif
51
+
52
+ /** Tone mapping operators.
53
+ Constants used in FreeImage_ToneMapping.
54
+ @@ -1089,6 +1097,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model,
55
+ // JPEG lossless transformation routines
56
+ // --------------------------------------------------------------------------
57
+
58
+ +/* vcpkg: The JPEGTransform functions are deliberately disabled in our build
59
+ + of FreeImage, since they require usage of the vendored copy of libjpeg. */
60
+ +#if 0
61
+ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
62
+ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE));
63
+ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom);
64
+ @@ -1097,7 +1108,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io,
65
+ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
66
+ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
67
+ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE));
68
+ -
69
+ +#endif
70
+
71
+ // --------------------------------------------------------------------------
72
+ // Image manipulation toolkit
73
+ diff --git a/Source/FreeImage/Plugin.cpp b/Source/FreeImage/Plugin.cpp
74
+ index 11e7294..0119ba7 100644
75
+ --- a/Source/FreeImage/Plugin.cpp
76
+ +++ b/Source/FreeImage/Plugin.cpp
77
+ @@ -263,7 +263,11 @@ FreeImage_Initialise(BOOL load_local_plugins_only) {
78
+ s_plugins->AddNode(InitDDS);
79
+ s_plugins->AddNode(InitGIF);
80
+ s_plugins->AddNode(InitHDR);
81
+ - s_plugins->AddNode(InitG3);
82
+ +/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of FreeImage
83
+ ++ since it requires usage of the vendored copy of libtiff. */
84
+ +#if 0
85
+ + s_plugins->AddNode(InitG3);
86
+ +#endif
87
+ s_plugins->AddNode(InitSGI);
88
+ s_plugins->AddNode(InitEXR);
89
+ s_plugins->AddNode(InitJ2K);
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/fix-function-overload.patch ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp
2
+ index 8db177d..efa2c4e 100644
3
+ --- a/Source/FreeImage/PluginJPEG.cpp
4
+ +++ b/Source/FreeImage/PluginJPEG.cpp
5
+ @@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) {
6
+ return FALSE. You might want to issue an error message instead.
7
+ */
8
+ static BOOL
9
+ -jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
10
+ +jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) {
11
+ jpeg_saved_marker_ptr marker;
12
+ int num_markers = 0;
13
+ int seq_no;
14
+ @@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) {
15
+ BYTE *icc_profile = NULL;
16
+ unsigned icc_length = 0;
17
+
18
+ - if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) {
19
+ + if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) {
20
+ // copy ICC profile data
21
+ FreeImage_CreateICCProfile(dib, icc_profile, icc_length);
22
+ // clean up
23
+ @@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) {
24
+ Write JPEG_APP2 marker (ICC profile)
25
+ */
26
+ static BOOL
27
+ -jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) {
28
+ +jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) {
29
+ // marker identifying string "ICC_PROFILE" (null-terminated)
30
+ BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 };
31
+
32
+ @@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) {
33
+ jpeg_write_comment(cinfo, dib);
34
+
35
+ // write ICC profile
36
+ - jpeg_write_icc_profile(cinfo, dib);
37
+ + jpeg_write_icc_profile_(cinfo, dib);
38
+
39
+ // write IPTC profile
40
+ jpeg_write_iptc_profile(cinfo, dib);
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/portfile.cmake ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_sourceforge(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO freeimage/Source%20Distribution
4
+ REF 3.18.0
5
+ FILENAME "FreeImage3180.zip"
6
+ SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818
7
+ PATCHES
8
+ disable-plugins-depending-on-internal-third-party-libraries.patch
9
+ use-external-jpeg.patch
10
+ use-external-jxrlib.patch
11
+ use-external-libtiff.patch
12
+ use-external-openjpeg.patch
13
+ use-external-png-zlib.patch
14
+ use-external-rawlib.patch
15
+ use-external-webp.patch
16
+ use-external-openexr.patch
17
+ use-freeimage-config-include.patch
18
+ fix-function-overload.patch
19
+ use-typedef-as-already-declared.patch
20
+ use-functions-to-override-libtiff-warning-error-handlers.patch
21
+ )
22
+
23
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
24
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-static.h DESTINATION ${SOURCE_PATH})
25
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-dynamic.h DESTINATION ${SOURCE_PATH})
26
+
27
+ # This is not strictly necessary, but to make sure
28
+ # that no "internal" libraries are used we remove them
29
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJPEG)
30
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibPNG)
31
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibTIFF4)
32
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/ZLib)
33
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibOpenJPEG)
34
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJXR)
35
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibWebP)
36
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibRawLite)
37
+ file(REMOVE_RECURSE ${SOURCE_PATH}/Source/OpenEXR)
38
+
39
+ vcpkg_configure_cmake(
40
+ SOURCE_PATH ${SOURCE_PATH}
41
+ PREFER_NINJA
42
+ OPTIONS_DEBUG
43
+ -DINSTALL_HEADERS=OFF
44
+ )
45
+
46
+ vcpkg_install_cmake()
47
+ vcpkg_fixup_cmake_targets()
48
+
49
+ vcpkg_copy_pdbs()
50
+
51
+ file(INSTALL ${SOURCE_PATH}/license-fi.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-jpeg.patch ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp
2
+ index 573989c..aaeefa4 100644
3
+ --- a/Source/FreeImage/PluginJPEG.cpp
4
+ +++ b/Source/FreeImage/PluginJPEG.cpp
5
+ @@ -35,9 +35,9 @@ extern "C" {
6
+ #undef FAR
7
+ #include <setjmp.h>
8
+
9
+ -#include "../LibJPEG/jinclude.h"
10
+ -#include "../LibJPEG/jpeglib.h"
11
+ -#include "../LibJPEG/jerror.h"
12
+ +#include <stdio.h>
13
+ +#include <jpeglib.h>
14
+ +#include <jerror.h>
15
+ }
16
+
17
+ #include "FreeImage.h"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-jxrlib.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Source/FreeImage/PluginJXR.cpp b/Source/FreeImage/PluginJXR.cpp
2
+ index 0e14e09..8eb9d5d 100644
3
+ --- a/Source/FreeImage/PluginJXR.cpp
4
+ +++ b/Source/FreeImage/PluginJXR.cpp
5
+ @@ -23,7 +23,8 @@
6
+ #include "Utilities.h"
7
+ #include "../Metadata/FreeImageTag.h"
8
+
9
+ -#include "../LibJXR/jxrgluelib/JXRGlue.h"
10
+ +#define INITGUID
11
+ +#include <JXRGlue.h>
12
+
13
+ // ==========================================================
14
+ // Plugin Interface
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-libtiff.patch ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
2
+ index 5068d94..8947b03 100644
3
+ --- a/Source/FreeImage/PluginTIFF.cpp
4
+ +++ b/Source/FreeImage/PluginTIFF.cpp
5
+ @@ -37,9 +37,9 @@
6
+
7
+ #include "FreeImage.h"
8
+ #include "Utilities.h"
9
+ -#include "../LibTIFF4/tiffiop.h"
10
+ +#include <tiffio.h>
11
+ #include "../Metadata/FreeImageTag.h"
12
+ #include "../OpenEXR/Half/half.h"
13
+
14
+ #include "FreeImageIO.h"
15
+ #include "PSDParser.h"
16
+ @@ -199,15 +199,18 @@ Open a TIFF file for reading or writing
17
+ @param name
18
+ @param mode
19
+ */
20
+ +/*
21
+ TIFF*
22
+ TIFFOpen(const char* name, const char* mode) {
23
+ return 0;
24
+ }
25
+ +*/
26
+
27
+ // ----------------------------------------------------------
28
+ // TIFF library FreeImage-specific routines.
29
+ // ----------------------------------------------------------
30
+
31
+ +/*
32
+ void*
33
+ _TIFFmalloc(tmsize_t s) {
34
+ return malloc(s);
35
+ @@ -245,6 +248,7 @@ int
36
+ _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) {
37
+ return (memcmp(p1, p2, (size_t) c));
38
+ }
39
+ +*/
40
+
41
+ // ----------------------------------------------------------
42
+ // in FreeImage warnings and errors are disabled
43
+
44
+ diff --git a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp
45
+ index d5be902..8dbcd5d 100644
46
+ --- a/Source/Metadata/XTIFF.cpp
47
+ +++ b/Source/Metadata/XTIFF.cpp
48
+ @@ -29,7 +29,7 @@
49
+ #pragma warning (disable : 4786) // identifier was truncated to 'number' characters
50
+ #endif
51
+
52
+ -#include "../LibTIFF4/tiffiop.h"
53
+ +#include <tiffio.h>
54
+
55
+ #include "FreeImage.h"
56
+ #include "Utilities.h"
57
+ @@ -40,6 +40,43 @@
58
+ // Extended TIFF Directory GEO Tag Support
59
+ // ----------------------------------------------------------
60
+
61
+ +// vcpkg: function imported from libtiff/tif_dirinfo.c, in which it is not exported
62
+ +/*
63
+ + * Return size of TIFFDataType in bytes.
64
+ + *
65
+ + * XXX: We need a separate function to determine the space needed
66
+ + * to store the value. For TIFF_RATIONAL values TIFFDataWidth() returns 8,
67
+ + * but we use 4-byte float to represent rationals.
68
+ + */
69
+ +int
70
+ +FreeImage_TIFFDataSize(TIFFDataType type)
71
+ +{
72
+ + switch (type)
73
+ + {
74
+ + case TIFF_BYTE:
75
+ + case TIFF_SBYTE:
76
+ + case TIFF_ASCII:
77
+ + case TIFF_UNDEFINED:
78
+ + return 1;
79
+ + case TIFF_SHORT:
80
+ + case TIFF_SSHORT:
81
+ + return 2;
82
+ + case TIFF_LONG:
83
+ + case TIFF_SLONG:
84
+ + case TIFF_FLOAT:
85
+ + case TIFF_IFD:
86
+ + case TIFF_RATIONAL:
87
+ + case TIFF_SRATIONAL:
88
+ + return 4;
89
+ + case TIFF_DOUBLE:
90
+ + case TIFF_LONG8:
91
+ + case TIFF_SLONG8:
92
+ + case TIFF_IFD8:
93
+ + return 8;
94
+ + default:
95
+ + return 0;
96
+ + }
97
+ +}
98
+ /**
99
+ Tiff info structure.
100
+ Entry format:
101
+ @@ -224,6 +261,33 @@ tiff_write_geotiff_profile(TIFF *tif, FIBITMAP *dib) {
102
+ // TIFF EXIF tag reading & writing
103
+ // ----------------------------------------------------------
104
+
105
+ +static uint32 exif_tag_ids[] = {
106
+ + EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM,
107
+ + EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF,
108
+ + EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED,
109
+ + EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL,
110
+ + EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE,
111
+ + EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE,
112
+ + EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE,
113
+ + EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH,
114
+ + EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT,
115
+ + EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL,
116
+ + EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE,
117
+ + EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION,
118
+ + EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY,
119
+ + EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION,
120
+ + EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT,
121
+ + EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD,
122
+ + EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN,
123
+ + EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE,
124
+ + EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM,
125
+ + EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST,
126
+ + EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION,
127
+ + EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL,
128
+ + EXIFTAG_IMAGEUNIQUEID
129
+ +};
130
+ +static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]);
131
+ +
132
+ /**
133
+ Read a single Exif tag
134
+
135
+ @@ -575,43 +639,10 @@ tiff_read_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) {
136
+
137
+ // loop over all Core Directory Tags
138
+ // ### uses private data, but there is no other way
139
+ + // -> vcpkg: Best we can do without private headers is to hard-code a list of known EXIF tags and read those
140
+ if(md_model == TagLib::EXIF_MAIN) {
141
+ - const TIFFDirectory *td = &tif->tif_dir;
142
+ -
143
+ - uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo)
144
+ -
145
+ - for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) {
146
+ - const TIFFField *fld = tif->tif_fields[fi];
147
+ -
148
+ - const uint32 tag_id = TIFFFieldTag(fld);
149
+ -
150
+ - if(tag_id == lastTag) {
151
+ - continue;
152
+ - }
153
+ -
154
+ - // test if tag value is set
155
+ - // (lifted directly from LibTiff _TIFFWriteDirectory)
156
+ -
157
+ - if( fld->field_bit == FIELD_CUSTOM ) {
158
+ - int is_set = FALSE;
159
+ -
160
+ - for(int ci = 0; ci < td->td_customValueCount; ci++ ) {
161
+ - is_set |= (td->td_customValues[ci].info == fld);
162
+ - }
163
+ -
164
+ - if( !is_set ) {
165
+ - continue;
166
+ - }
167
+ -
168
+ - } else if(!TIFFFieldSet(tif, fld->field_bit)) {
169
+ - continue;
170
+ - }
171
+ -
172
+ - // process *all* other tags (some will be ignored)
173
+ -
174
+ - tiff_read_exif_tag(tif, tag_id, dib, md_model);
175
+ -
176
+ - lastTag = tag_id;
177
+ + for (int i = 0; i < nExifTags; ++i) {
178
+ + tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model);
179
+ }
180
+
181
+ }
182
+ @@ -723,10 +754,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) {
183
+
184
+ TagLib& tag_lib = TagLib::instance();
185
+
186
+ - for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) {
187
+ - const TIFFField *fld = tif->tif_fields[fi];
188
+ -
189
+ - const uint32 tag_id = TIFFFieldTag(fld);
190
+ + for (int fi = 0, nfi = nExifTags; nfi > 0; nfi--, fi++) {
191
+ + const uint32 tag_id = exif_tag_ids[fi];
192
+ + const TIFFField *fld = TIFFFieldWithTag(tif, tag_id);
193
+
194
+ if(skip_write_field(tif, tag_id)) {
195
+ // skip tags that are already handled by the LibTIFF writing process
196
+ @@ -749,7 +779,7 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) {
197
+ continue;
198
+ }
199
+ // type of storage may differ (e.g. rationnal array vs float array type)
200
+ - if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) {
201
+ + if((unsigned)FreeImage_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) {
202
+ // skip tag or _TIFFmemcpy will fail
203
+ continue;
204
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-openexr.patch ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp
2
+ index b286430..82b3b72 100644
3
+ --- a/Source/FreeImage/PluginEXR.cpp
4
+ +++ b/Source/FreeImage/PluginEXR.cpp
5
+ @@ -28,16 +28,16 @@
6
+ #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning)
7
+ #endif
8
+
9
+ -#include "../OpenEXR/IlmImf/ImfIO.h"
10
+ -#include "../OpenEXR/Iex/Iex.h"
11
+ -#include "../OpenEXR/IlmImf/ImfOutputFile.h"
12
+ -#include "../OpenEXR/IlmImf/ImfInputFile.h"
13
+ -#include "../OpenEXR/IlmImf/ImfRgbaFile.h"
14
+ -#include "../OpenEXR/IlmImf/ImfChannelList.h"
15
+ -#include "../OpenEXR/IlmImf/ImfRgba.h"
16
+ -#include "../OpenEXR/IlmImf/ImfArray.h"
17
+ -#include "../OpenEXR/IlmImf/ImfPreviewImage.h"
18
+ -#include "../OpenEXR/Half/half.h"
19
+ +#include <OpenEXR/ImfIO.h>
20
+ +#include <OpenEXR/Iex.h>
21
+ +#include <OpenEXR/ImfOutputFile.h>
22
+ +#include <OpenEXR/ImfInputFile.h>
23
+ +#include <OpenEXR/ImfRgbaFile.h>
24
+ +#include <OpenEXR/ImfChannelList.h>
25
+ +#include <OpenEXR/ImfRgba.h>
26
+ +#include <OpenEXR/ImfArray.h>
27
+ +#include <OpenEXR/ImfPreviewImage.h>
28
+ +#include <OpenEXR/half.h>
29
+
30
+
31
+ // ==========================================================
32
+ diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
33
+ index 562fdd7..ce12649 100644
34
+ --- a/Source/FreeImage/PluginTIFF.cpp
35
+ +++ b/Source/FreeImage/PluginTIFF.cpp
36
+ @@ -39,7 +39,7 @@
37
+ #include "Utilities.h"
38
+ #include <tiffio.h>
39
+ #include "../Metadata/FreeImageTag.h"
40
+ -#include "../OpenEXR/Half/half.h"
41
+ +#include <OpenEXR/half.h>
42
+
43
+ #include "FreeImageIO.h"
44
+ #include "PSDParser.h"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/freeimage/use-external-openjpeg.patch ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/Source/FreeImage/J2KHelper.cpp b/Source/FreeImage/J2KHelper.cpp
2
+ index 1776c3b..538f1c5 100644
3
+ --- a/Source/FreeImage/J2KHelper.cpp
4
+ +++ b/Source/FreeImage/J2KHelper.cpp
5
+ @@ -21,7 +21,7 @@
6
+
7
+ #include "FreeImage.h"
8
+ #include "Utilities.h"
9
+ -#include "../LibOpenJPEG/openjpeg.h"
10
+ +#include <openjpeg.h>
11
+ #include "J2KHelper.h"
12
+
13
+ // --------------------------------------------------------------------------
14
+ diff --git a/Source/FreeImage/PluginJ2K.cpp b/Source/FreeImage/PluginJ2K.cpp
15
+ index b8bcfc8..621a903 100644
16
+ --- a/Source/FreeImage/PluginJ2K.cpp
17
+ +++ b/Source/FreeImage/PluginJ2K.cpp
18
+ @@ -21,7 +21,7 @@
19
+
20
+ #include "FreeImage.h"
21
+ #include "Utilities.h"
22
+ -#include "../LibOpenJPEG/openjpeg.h"
23
+ +#include <openjpeg.h>
24
+ #include "J2KHelper.h"
25
+
26
+ // ==========================================================
27
+ diff --git a/Source/FreeImage/PluginJP2.cpp b/Source/FreeImage/PluginJP2.cpp
28
+ index 742fe2c..c57f626 100644
29
+ --- a/Source/FreeImage/PluginJP2.cpp
30
+ +++ b/Source/FreeImage/PluginJP2.cpp
31
+ @@ -21,7 +21,7 @@
32
+
33
+ #include "FreeImage.h"
34
+ #include "Utilities.h"
35
+ -#include "../LibOpenJPEG/openjpeg.h"
36
+ +#include <openjpeg.h>
37
+ #include "J2KHelper.h"
38
+
39
+ // ==========================================================