Spaces:
Sleeping
Sleeping
c50960301f165ae138b40f4ded050b7a3b42bbe01a968fade36ca646338e3997
Browse files- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glad/find_python.patch +21 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glad/portfile.cmake +149 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glad/vcpkg.json +353 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0001_force-system-install.patch +36 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0002_fix-uwpmacro.patch +33 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0003_fix-cmake-configs-paths.patch +62 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0004_fix-config-expected-paths.patch +35 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/portfile.cmake +59 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/usage +4 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/vcpkg.json +10 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/fix-LNK2019.patch +17 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/portfile.cmake +73 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/usage +4 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/vcpkg-cmake-wrapper.cmake +25 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/vcpkg.json +17 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glfw3/portfile.cmake +38 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glfw3/vcpkg.json +17 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gli/disable-test.patch +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gli/portfile.cmake +28 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gli/vcpkg.json +9 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/libintl.patch +50 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/portfile.cmake +129 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/use-libiconv-on-windows.patch +28 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/vcpkg.json +31 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glibmm/build-support-vs2022-builds.patch +41 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glibmm/portfile.cmake +35 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glibmm/vcpkg.json +22 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glm/CMakeLists.txt +27 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glm/portfile.cmake +22 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glm/vcpkg.json +7 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/fix-dependency-glm.patch +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/portfile.cmake +37 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/system-install.patch +27 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/vcpkg.json +11 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/fix_glog_CMAKE_MODULE_PATH.patch +77 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/fix_log_every_n.patch +848 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/glog_disable_debug_postfix.patch +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/nogdi-nominmax.patch +59 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/portfile.cmake +29 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/vcpkg.json +18 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gloo/portfile.cmake +32 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/gloo/vcpkg.json +28 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/always-install-resource-limits.patch +13 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/glslang-config.cmake +7 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/ignore-crt.patch +9 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/portfile.cmake +55 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/vcpkg.json +16 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glui/install-one-flavor.patch +70 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glui/portfile.cmake +37 -0
- third-party/DPVO/Pangolin/scripts/vcpkg/ports/glui/vcpkg-cmake-wrapper.cmake +9 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glad/find_python.patch
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index c4031a6..6a106e9 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -23,16 +23,6 @@ project(GLAD VERSION 0.1.34 LANGUAGES C)
|
6 |
+
|
7 |
+
set(GLAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
8 |
+
|
9 |
+
-# Find the python interpreter, set the PYTHON_EXECUTABLE variable
|
10 |
+
-if (CMAKE_VERSION VERSION_LESS 3.12)
|
11 |
+
- # this logic is deprecated in CMake after 3.12
|
12 |
+
- find_package(PythonInterp REQUIRED)
|
13 |
+
-else()
|
14 |
+
- # the new hotness. This will preferentially find Python3 instead of Python2
|
15 |
+
- find_package(Python)
|
16 |
+
- set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
|
17 |
+
-endif()
|
18 |
+
-
|
19 |
+
# Options
|
20 |
+
set(GLAD_OUT_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE STRING "Output directory")
|
21 |
+
set(GLAD_PROFILE "compatibility" CACHE STRING "OpenGL profile")
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glad/portfile.cmake
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2 |
+
|
3 |
+
vcpkg_from_github(
|
4 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
5 |
+
REPO Dav1dde/glad
|
6 |
+
REF 7ece538856bf124d798ab323c8e1e64ebb83cb50
|
7 |
+
SHA512 f6a8ba7d0d09b89c23b6f76962d3e6eef1babc8e1a659e238d30e143eb33ccba424957e5a6d46d99a714bfa2967523b193586d0ff24e29ad8d86c92c9faf9c02
|
8 |
+
HEAD_REF master
|
9 |
+
PATCHES encoding.patch find_python.patch
|
10 |
+
)
|
11 |
+
|
12 |
+
if(NOT GLAD_PROFILE)
|
13 |
+
set(GLAD_PROFILE "compatibility")
|
14 |
+
endif()
|
15 |
+
message(STATUS "This version of glad uses the compatibility profile. To use the core profile instead, create an overlay port of this with GLAD_PROFILE set to 'core' or set GLAD_PROFILE to 'core' in a custom triplet.")
|
16 |
+
message(STATUS "This recipe is at ${CMAKE_CURRENT_LIST_DIR}")
|
17 |
+
message(STATUS "See the overlay ports documentation at https://github.com/microsoft/vcpkg/blob/master/docs/specifications/ports-overlay.md")
|
18 |
+
|
19 |
+
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
20 |
+
FEATURES
|
21 |
+
extensions GLAD_ALL_EXTENSIONS
|
22 |
+
INVERTED_FEATURES
|
23 |
+
loader GLAD_NO_LOADER
|
24 |
+
)
|
25 |
+
|
26 |
+
set(GLAD_SPEC "gl")
|
27 |
+
|
28 |
+
if("egl" IN_LIST FEATURES)
|
29 |
+
string(APPEND GLAD_SPEC ",egl")
|
30 |
+
endif()
|
31 |
+
|
32 |
+
if("wgl" IN_LIST FEATURES)
|
33 |
+
string(APPEND GLAD_SPEC ",wgl")
|
34 |
+
endif()
|
35 |
+
|
36 |
+
if("glx" IN_LIST FEATURES)
|
37 |
+
string(APPEND GLAD_SPEC ",glx")
|
38 |
+
endif()
|
39 |
+
|
40 |
+
# This needs to be ordered highest to lowest for it to be correct!
|
41 |
+
if("gl-api-latest" IN_LIST FEATURES)
|
42 |
+
LIST(APPEND GLAD_API "gl=")
|
43 |
+
elseif("gl-api-46" IN_LIST FEATURES)
|
44 |
+
LIST(APPEND GLAD_API "gl=4.6")
|
45 |
+
elseif("gl-api-45" IN_LIST FEATURES)
|
46 |
+
LIST(APPEND GLAD_API "gl=4.5")
|
47 |
+
elseif("gl-api-44" IN_LIST FEATURES)
|
48 |
+
LIST(APPEND GLAD_API "gl=4.4")
|
49 |
+
elseif("gl-api-43" IN_LIST FEATURES)
|
50 |
+
LIST(APPEND GLAD_API "gl=4.3")
|
51 |
+
elseif("gl-api-42" IN_LIST FEATURES)
|
52 |
+
LIST(APPEND GLAD_API "gl=4.2")
|
53 |
+
elseif("gl-api-41" IN_LIST FEATURES)
|
54 |
+
LIST(APPEND GLAD_API "gl=4.1")
|
55 |
+
elseif("gl-api-40" IN_LIST FEATURES)
|
56 |
+
LIST(APPEND GLAD_API "gl=4.0")
|
57 |
+
elseif("gl-api-33" IN_LIST FEATURES)
|
58 |
+
LIST(APPEND GLAD_API "gl=3.3")
|
59 |
+
elseif("gl-api-32" IN_LIST FEATURES)
|
60 |
+
LIST(APPEND GLAD_API "gl=3.2")
|
61 |
+
elseif("gl-api-31" IN_LIST FEATURES)
|
62 |
+
LIST(APPEND GLAD_API "gl=3.1")
|
63 |
+
elseif("gl-api-30" IN_LIST FEATURES)
|
64 |
+
LIST(APPEND GLAD_API "gl=3.0")
|
65 |
+
elseif("gl-api-21" IN_LIST FEATURES)
|
66 |
+
LIST(APPEND GLAD_API "gl=2.1")
|
67 |
+
elseif("gl-api-20" IN_LIST FEATURES)
|
68 |
+
LIST(APPEND GLAD_API "gl=2.0")
|
69 |
+
elseif("gl-api-15" IN_LIST FEATURES)
|
70 |
+
LIST(APPEND GLAD_API "gl=1.5")
|
71 |
+
elseif("gl-api-14" IN_LIST FEATURES)
|
72 |
+
LIST(APPEND GLAD_API "gl=1.4")
|
73 |
+
elseif("gl-api-13" IN_LIST FEATURES)
|
74 |
+
LIST(APPEND GLAD_API "gl=1.3")
|
75 |
+
elseif("gl-api-12" IN_LIST FEATURES)
|
76 |
+
LIST(APPEND GLAD_API "gl=1.2")
|
77 |
+
elseif("gl-api-11" IN_LIST FEATURES)
|
78 |
+
LIST(APPEND GLAD_API "gl=1.1")
|
79 |
+
elseif("gl-api-10" IN_LIST FEATURES)
|
80 |
+
LIST(APPEND GLAD_API "gl=1.0")
|
81 |
+
endif()
|
82 |
+
|
83 |
+
# This needs to be ordered highest to lowest for it to be correct!
|
84 |
+
if("gles1-api-latest" IN_LIST FEATURES)
|
85 |
+
LIST(APPEND GLAD_API "gles1=")
|
86 |
+
elseif("gles1-api-10" IN_LIST FEATURES)
|
87 |
+
LIST(APPEND GLAD_API "gles1=1.0")
|
88 |
+
endif()
|
89 |
+
|
90 |
+
# This needs to be ordered highest to lowest for it to be correct!
|
91 |
+
if("gles2-api-latest" IN_LIST FEATURES)
|
92 |
+
LIST(APPEND GLAD_API "gles2=")
|
93 |
+
elseif("gles2-api-32" IN_LIST FEATURES)
|
94 |
+
LIST(APPEND GLAD_API "gles2=3.2")
|
95 |
+
elseif("gles2-api-31" IN_LIST FEATURES)
|
96 |
+
LIST(APPEND GLAD_API "gles2=3.1")
|
97 |
+
elseif("gles2-api-30" IN_LIST FEATURES)
|
98 |
+
LIST(APPEND GLAD_API "gles2=3.0")
|
99 |
+
elseif("gles2-api-20" IN_LIST FEATURES)
|
100 |
+
LIST(APPEND GLAD_API "gles2=2.0")
|
101 |
+
endif()
|
102 |
+
|
103 |
+
# This needs to be ordered highest to lowest for it to be correct!
|
104 |
+
if("glsc2-api-latest" IN_LIST FEATURES)
|
105 |
+
LIST(APPEND GLAD_API "glsc2=")
|
106 |
+
elseif("glsc2-api-20" IN_LIST FEATURES)
|
107 |
+
LIST(APPEND GLAD_API "glsc2=2.0")
|
108 |
+
endif()
|
109 |
+
|
110 |
+
string(REPLACE ";" "," GLAD_API "${GLAD_API}")
|
111 |
+
|
112 |
+
vcpkg_find_acquire_program(PYTHON3)
|
113 |
+
|
114 |
+
file(COPY
|
115 |
+
"${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h"
|
116 |
+
"${CURRENT_INSTALLED_DIR}/include/EGL/eglplatform.h"
|
117 |
+
"${CURRENT_INSTALLED_DIR}/share/opengl/egl.xml"
|
118 |
+
"${CURRENT_INSTALLED_DIR}/share/opengl/gl.xml"
|
119 |
+
"${CURRENT_INSTALLED_DIR}/share/opengl/glx.xml"
|
120 |
+
"${CURRENT_INSTALLED_DIR}/share/opengl/wgl.xml"
|
121 |
+
DESTINATION "${SOURCE_PATH}/glad/files"
|
122 |
+
)
|
123 |
+
|
124 |
+
vcpkg_cmake_configure(
|
125 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
126 |
+
OPTIONS
|
127 |
+
-DGLAD_EXPORT=OFF
|
128 |
+
-DGLAD_INSTALL=ON
|
129 |
+
-DGLAD_REPRODUCIBLE=ON
|
130 |
+
-DGLAD_SPEC=${GLAD_SPEC}
|
131 |
+
-DGLAD_API=${GLAD_API}
|
132 |
+
-DGLAD_PROFILE=${GLAD_PROFILE}
|
133 |
+
-DPYTHON_EXECUTABLE=${PYTHON3}
|
134 |
+
${FEATURE_OPTIONS}
|
135 |
+
OPTIONS_DEBUG
|
136 |
+
-DGLAD_GENERATOR="c-debug"
|
137 |
+
OPTIONS_RELEASE
|
138 |
+
-DGLAD_GENERATOR="c"
|
139 |
+
)
|
140 |
+
|
141 |
+
vcpkg_cmake_install()
|
142 |
+
vcpkg_copy_pdbs()
|
143 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glad)
|
144 |
+
|
145 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/include/KHR")
|
146 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/include/EGL")
|
147 |
+
|
148 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
149 |
+
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glad/vcpkg.json
ADDED
@@ -0,0 +1,353 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glad",
|
3 |
+
"version": "0.1.34",
|
4 |
+
"port-version": 3,
|
5 |
+
"description": "Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.",
|
6 |
+
"homepage": "https://github.com/Dav1dde/glad",
|
7 |
+
"documentation": "https://github.com/Dav1dde/glad/wiki",
|
8 |
+
"license": "MIT",
|
9 |
+
"dependencies": [
|
10 |
+
"egl-registry",
|
11 |
+
"opengl-registry",
|
12 |
+
{
|
13 |
+
"name": "vcpkg-cmake",
|
14 |
+
"host": true
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"name": "vcpkg-cmake-config",
|
18 |
+
"host": true
|
19 |
+
}
|
20 |
+
],
|
21 |
+
"default-features": [
|
22 |
+
"loader"
|
23 |
+
],
|
24 |
+
"features": {
|
25 |
+
"egl": {
|
26 |
+
"description": "Use `egl` spec instead of `gl`."
|
27 |
+
},
|
28 |
+
"extensions": {
|
29 |
+
"description": "Enables all extensions."
|
30 |
+
},
|
31 |
+
"gl-api-10": {
|
32 |
+
"description": "Imports extensions from OpenGL API specification version 1.0."
|
33 |
+
},
|
34 |
+
"gl-api-11": {
|
35 |
+
"description": "Imports extensions from OpenGL API specification version 1.1.",
|
36 |
+
"dependencies": [
|
37 |
+
{
|
38 |
+
"name": "glad",
|
39 |
+
"default-features": false,
|
40 |
+
"features": [
|
41 |
+
"gl-api-10"
|
42 |
+
]
|
43 |
+
}
|
44 |
+
]
|
45 |
+
},
|
46 |
+
"gl-api-12": {
|
47 |
+
"description": "Imports extensions from OpenGL API specification version 1.2.",
|
48 |
+
"dependencies": [
|
49 |
+
{
|
50 |
+
"name": "glad",
|
51 |
+
"default-features": false,
|
52 |
+
"features": [
|
53 |
+
"gl-api-11"
|
54 |
+
]
|
55 |
+
}
|
56 |
+
]
|
57 |
+
},
|
58 |
+
"gl-api-13": {
|
59 |
+
"description": "Imports extensions from OpenGL API specification version 1.3.",
|
60 |
+
"dependencies": [
|
61 |
+
{
|
62 |
+
"name": "glad",
|
63 |
+
"default-features": false,
|
64 |
+
"features": [
|
65 |
+
"gl-api-12"
|
66 |
+
]
|
67 |
+
}
|
68 |
+
]
|
69 |
+
},
|
70 |
+
"gl-api-14": {
|
71 |
+
"description": "Imports extensions from OpenGL API specification version 1.4.",
|
72 |
+
"dependencies": [
|
73 |
+
{
|
74 |
+
"name": "glad",
|
75 |
+
"default-features": false,
|
76 |
+
"features": [
|
77 |
+
"gl-api-13"
|
78 |
+
]
|
79 |
+
}
|
80 |
+
]
|
81 |
+
},
|
82 |
+
"gl-api-15": {
|
83 |
+
"description": "Imports extensions from OpenGL API specification version 1.5.",
|
84 |
+
"dependencies": [
|
85 |
+
{
|
86 |
+
"name": "glad",
|
87 |
+
"default-features": false,
|
88 |
+
"features": [
|
89 |
+
"gl-api-14"
|
90 |
+
]
|
91 |
+
}
|
92 |
+
]
|
93 |
+
},
|
94 |
+
"gl-api-20": {
|
95 |
+
"description": "Imports extensions from OpenGL API specification version 2.0.",
|
96 |
+
"dependencies": [
|
97 |
+
{
|
98 |
+
"name": "glad",
|
99 |
+
"default-features": false,
|
100 |
+
"features": [
|
101 |
+
"gl-api-15"
|
102 |
+
]
|
103 |
+
}
|
104 |
+
]
|
105 |
+
},
|
106 |
+
"gl-api-21": {
|
107 |
+
"description": "Imports extensions from OpenGL API specification version 2.1.",
|
108 |
+
"dependencies": [
|
109 |
+
{
|
110 |
+
"name": "glad",
|
111 |
+
"default-features": false,
|
112 |
+
"features": [
|
113 |
+
"gl-api-20"
|
114 |
+
]
|
115 |
+
}
|
116 |
+
]
|
117 |
+
},
|
118 |
+
"gl-api-30": {
|
119 |
+
"description": "Imports extensions from OpenGL API specification version 3.0.",
|
120 |
+
"dependencies": [
|
121 |
+
{
|
122 |
+
"name": "glad",
|
123 |
+
"default-features": false,
|
124 |
+
"features": [
|
125 |
+
"gl-api-21"
|
126 |
+
]
|
127 |
+
}
|
128 |
+
]
|
129 |
+
},
|
130 |
+
"gl-api-31": {
|
131 |
+
"description": "Imports extensions from OpenGL API specification version 3.1.",
|
132 |
+
"dependencies": [
|
133 |
+
{
|
134 |
+
"name": "glad",
|
135 |
+
"default-features": false,
|
136 |
+
"features": [
|
137 |
+
"gl-api-30"
|
138 |
+
]
|
139 |
+
}
|
140 |
+
]
|
141 |
+
},
|
142 |
+
"gl-api-32": {
|
143 |
+
"description": "Imports extensions from OpenGL API specification version 3.2.",
|
144 |
+
"dependencies": [
|
145 |
+
{
|
146 |
+
"name": "glad",
|
147 |
+
"default-features": false,
|
148 |
+
"features": [
|
149 |
+
"gl-api-31"
|
150 |
+
]
|
151 |
+
}
|
152 |
+
]
|
153 |
+
},
|
154 |
+
"gl-api-33": {
|
155 |
+
"description": "Imports extensions from OpenGL API specification version 3.3.",
|
156 |
+
"dependencies": [
|
157 |
+
{
|
158 |
+
"name": "glad",
|
159 |
+
"default-features": false,
|
160 |
+
"features": [
|
161 |
+
"gl-api-32"
|
162 |
+
]
|
163 |
+
}
|
164 |
+
]
|
165 |
+
},
|
166 |
+
"gl-api-40": {
|
167 |
+
"description": "Imports extensions from OpenGL API specification version 4.0.",
|
168 |
+
"dependencies": [
|
169 |
+
{
|
170 |
+
"name": "glad",
|
171 |
+
"default-features": false,
|
172 |
+
"features": [
|
173 |
+
"gl-api-33"
|
174 |
+
]
|
175 |
+
}
|
176 |
+
]
|
177 |
+
},
|
178 |
+
"gl-api-41": {
|
179 |
+
"description": "Imports extensions from OpenGL API specification version 4.1.",
|
180 |
+
"dependencies": [
|
181 |
+
{
|
182 |
+
"name": "glad",
|
183 |
+
"default-features": false,
|
184 |
+
"features": [
|
185 |
+
"gl-api-40"
|
186 |
+
]
|
187 |
+
}
|
188 |
+
]
|
189 |
+
},
|
190 |
+
"gl-api-42": {
|
191 |
+
"description": "Imports extensions from OpenGL API specification version 4.2.",
|
192 |
+
"dependencies": [
|
193 |
+
{
|
194 |
+
"name": "glad",
|
195 |
+
"default-features": false,
|
196 |
+
"features": [
|
197 |
+
"gl-api-41"
|
198 |
+
]
|
199 |
+
}
|
200 |
+
]
|
201 |
+
},
|
202 |
+
"gl-api-43": {
|
203 |
+
"description": "Imports extensions from OpenGL API specification version 4.3.",
|
204 |
+
"dependencies": [
|
205 |
+
{
|
206 |
+
"name": "glad",
|
207 |
+
"default-features": false,
|
208 |
+
"features": [
|
209 |
+
"gl-api-42"
|
210 |
+
]
|
211 |
+
}
|
212 |
+
]
|
213 |
+
},
|
214 |
+
"gl-api-44": {
|
215 |
+
"description": "Imports extensions from OpenGL API specification version 4.4.",
|
216 |
+
"dependencies": [
|
217 |
+
{
|
218 |
+
"name": "glad",
|
219 |
+
"default-features": false,
|
220 |
+
"features": [
|
221 |
+
"gl-api-43"
|
222 |
+
]
|
223 |
+
}
|
224 |
+
]
|
225 |
+
},
|
226 |
+
"gl-api-45": {
|
227 |
+
"description": "Imports extensions from OpenGL API specification version 4.5.",
|
228 |
+
"dependencies": [
|
229 |
+
{
|
230 |
+
"name": "glad",
|
231 |
+
"default-features": false,
|
232 |
+
"features": [
|
233 |
+
"gl-api-44"
|
234 |
+
]
|
235 |
+
}
|
236 |
+
]
|
237 |
+
},
|
238 |
+
"gl-api-46": {
|
239 |
+
"description": "Imports extensions from OpenGL API specification version 4.6.",
|
240 |
+
"dependencies": [
|
241 |
+
{
|
242 |
+
"name": "glad",
|
243 |
+
"default-features": false,
|
244 |
+
"features": [
|
245 |
+
"gl-api-45"
|
246 |
+
]
|
247 |
+
}
|
248 |
+
]
|
249 |
+
},
|
250 |
+
"gl-api-latest": {
|
251 |
+
"description": "Imports extensions from latest OpenGL API specification version.",
|
252 |
+
"dependencies": [
|
253 |
+
{
|
254 |
+
"name": "glad",
|
255 |
+
"default-features": false,
|
256 |
+
"features": [
|
257 |
+
"gl-api-46"
|
258 |
+
]
|
259 |
+
}
|
260 |
+
]
|
261 |
+
},
|
262 |
+
"gles1-api-10": {
|
263 |
+
"description": "Imports extensions from OpenGL ES 1 specification version 1.0."
|
264 |
+
},
|
265 |
+
"gles1-api-latest": {
|
266 |
+
"description": "Imports extensions from latest OpenGL ES 1 specification.",
|
267 |
+
"dependencies": [
|
268 |
+
{
|
269 |
+
"name": "glad",
|
270 |
+
"default-features": false,
|
271 |
+
"features": [
|
272 |
+
"gles1-api-10"
|
273 |
+
]
|
274 |
+
}
|
275 |
+
]
|
276 |
+
},
|
277 |
+
"gles2-api-20": {
|
278 |
+
"description": "Imports extensions from OpenGL ES 2 specification version 2.0."
|
279 |
+
},
|
280 |
+
"gles2-api-30": {
|
281 |
+
"description": "Imports extensions from OpenGL ES 2 specification version 3.0.",
|
282 |
+
"dependencies": [
|
283 |
+
{
|
284 |
+
"name": "glad",
|
285 |
+
"default-features": false,
|
286 |
+
"features": [
|
287 |
+
"gles2-api-20"
|
288 |
+
]
|
289 |
+
}
|
290 |
+
]
|
291 |
+
},
|
292 |
+
"gles2-api-31": {
|
293 |
+
"description": "Imports extensions from OpenGL ES 2 specification version 3.1.",
|
294 |
+
"dependencies": [
|
295 |
+
{
|
296 |
+
"name": "glad",
|
297 |
+
"default-features": false,
|
298 |
+
"features": [
|
299 |
+
"gles2-api-30"
|
300 |
+
]
|
301 |
+
}
|
302 |
+
]
|
303 |
+
},
|
304 |
+
"gles2-api-32": {
|
305 |
+
"description": "Imports extensions from OpenGL ES 2 specification version 3.2.",
|
306 |
+
"dependencies": [
|
307 |
+
{
|
308 |
+
"name": "glad",
|
309 |
+
"default-features": false,
|
310 |
+
"features": [
|
311 |
+
"gles2-api-31"
|
312 |
+
]
|
313 |
+
}
|
314 |
+
]
|
315 |
+
},
|
316 |
+
"gles2-api-latest": {
|
317 |
+
"description": "Imports extensions from latest OpenGL ES 2 specification.",
|
318 |
+
"dependencies": [
|
319 |
+
{
|
320 |
+
"name": "glad",
|
321 |
+
"default-features": false,
|
322 |
+
"features": [
|
323 |
+
"gles2-api-32"
|
324 |
+
]
|
325 |
+
}
|
326 |
+
]
|
327 |
+
},
|
328 |
+
"glsc2-api-20": {
|
329 |
+
"description": "Imports extensions from OpenGL SC API specification version 2.0."
|
330 |
+
},
|
331 |
+
"glsc2-api-latest": {
|
332 |
+
"description": "Imports extensions from latest OpenGL SC API specification.",
|
333 |
+
"dependencies": [
|
334 |
+
{
|
335 |
+
"name": "glad",
|
336 |
+
"default-features": false,
|
337 |
+
"features": [
|
338 |
+
"glsc2-api-20"
|
339 |
+
]
|
340 |
+
}
|
341 |
+
]
|
342 |
+
},
|
343 |
+
"glx": {
|
344 |
+
"description": "Use `glx` spec instead of `gl`. Only available with the X Window System."
|
345 |
+
},
|
346 |
+
"loader": {
|
347 |
+
"description": "Generate loader logic."
|
348 |
+
},
|
349 |
+
"wgl": {
|
350 |
+
"description": "Use `wgl` spec instead of `gl`. Only available for Windows and UWP platforms."
|
351 |
+
}
|
352 |
+
}
|
353 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0001_force-system-install.patch
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 011577a..e52d19d 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -42,11 +42,13 @@ include(cmake/GenerateTemplateExportHeader.cmake)
|
6 |
+
#
|
7 |
+
|
8 |
+
# Get git revision
|
9 |
+
+if(NOT DEFINED GIT_REV)
|
10 |
+
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
11 |
+
string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV)
|
12 |
+
if(NOT GIT_SHA1)
|
13 |
+
set(GIT_REV "0")
|
14 |
+
endif()
|
15 |
+
+endif()
|
16 |
+
|
17 |
+
# Meta information about the project
|
18 |
+
set(META_PROJECT_NAME "glbinding")
|
19 |
+
@@ -135,7 +137,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU
|
20 |
+
endif()
|
21 |
+
|
22 |
+
# Installation paths
|
23 |
+
-if(UNIX AND SYSTEM_DIR_INSTALL)
|
24 |
+
+if(1)
|
25 |
+
# Install into the system (/usr/bin or /usr/local/bin)
|
26 |
+
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
|
27 |
+
set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
|
28 |
+
@@ -148,7 +150,7 @@ if(UNIX AND SYSTEM_DIR_INSTALL)
|
29 |
+
set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/<project>
|
30 |
+
set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications
|
31 |
+
set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps
|
32 |
+
- set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts)
|
33 |
+
+ set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts)
|
34 |
+
else()
|
35 |
+
# Install into local directory
|
36 |
+
set(INSTALL_ROOT ".") # ./
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0002_fix-uwpmacro.patch
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt
|
2 |
+
index 97654c8..bca68d1 100644
|
3 |
+
--- a/source/glbinding/CMakeLists.txt
|
4 |
+
+++ b/source/glbinding/CMakeLists.txt
|
5 |
+
@@ -261,6 +261,11 @@ target_link_libraries(${target}
|
6 |
+
# Compile definitions
|
7 |
+
#
|
8 |
+
|
9 |
+
+
|
10 |
+
+if (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
11 |
+
+ target_compile_definitions(${target} PRIVATE SYSTEM_WINDOWS WINDOWS_STORE)
|
12 |
+
+endif()
|
13 |
+
+
|
14 |
+
target_compile_definitions(${target}
|
15 |
+
PRIVATE
|
16 |
+
# since we use stl and stl is intended to use exceptions, exceptions should not be disabled
|
17 |
+
diff --git a/source/glbinding/source/getProcAddress.cpp b/source/glbinding/source/getProcAddress.cpp
|
18 |
+
index c1cfc5c..7e5f8bc 100644
|
19 |
+
--- a/source/glbinding/source/getProcAddress.cpp
|
20 |
+
+++ b/source/glbinding/source/getProcAddress.cpp
|
21 |
+
@@ -18,7 +18,11 @@ namespace glbinding {
|
22 |
+
|
23 |
+
ProcAddress getProcAddress(const char * name)
|
24 |
+
{
|
25 |
+
- static auto module = LoadLibrary(_T("OPENGL32.DLL"));
|
26 |
+
+#ifdef WINDOWS_STORE
|
27 |
+
+ static auto module = ::LoadPackagedLibrary(_T("OPENGL32.DLL"), 0);
|
28 |
+
+#else
|
29 |
+
+ static auto module = ::LoadLibrary(_T("OPENGL32.DLL"));
|
30 |
+
+#endif
|
31 |
+
|
32 |
+
// Prevent static linking of opengl32
|
33 |
+
static auto wglGetProcAddress_ = reinterpret_cast<void * (__stdcall *)(const char *)>(::GetProcAddress(module, "wglGetProcAddress"));
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0003_fix-cmake-configs-paths.patch
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/3rdparty/KHR/CMakeLists.txt b/3rdparty/KHR/CMakeLists.txt
|
2 |
+
index 25fac3a..429544f 100644
|
3 |
+
--- a/3rdparty/KHR/CMakeLists.txt
|
4 |
+
+++ b/3rdparty/KHR/CMakeLists.txt
|
5 |
+
@@ -43,7 +43,7 @@ add_library(${target} INTERFACE)
|
6 |
+
add_library(externals::${target} ALIAS ${target})
|
7 |
+
|
8 |
+
# Export library for downstream projects
|
9 |
+
-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake)
|
10 |
+
+export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake)
|
11 |
+
|
12 |
+
|
13 |
+
#
|
14 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
15 |
+
index 700b48b..8aaab8d 100644
|
16 |
+
--- a/CMakeLists.txt
|
17 |
+
+++ b/CMakeLists.txt
|
18 |
+
@@ -141,15 +141,15 @@ endif()
|
19 |
+
if(1)
|
20 |
+
# Install into the system (/usr/bin or /usr/local/bin)
|
21 |
+
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
|
22 |
+
- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
|
23 |
+
+ set(INSTALL_CMAKE "share/${project}") # /usr/[local]/share/<project>/cmake
|
24 |
+
set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/<project>
|
25 |
+
set(INSTALL_DATA "share/${project}") # /usr/[local]/share/<project>
|
26 |
+
set(INSTALL_BIN "bin") # /usr/[local]/bin
|
27 |
+
set(INSTALL_SHARED "lib") # /usr/[local]/lib
|
28 |
+
set(INSTALL_LIB "lib") # /usr/[local]/lib
|
29 |
+
set(INSTALL_INCLUDE "include") # /usr/[local]/include
|
30 |
+
- set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/<project>
|
31 |
+
- set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications
|
32 |
+
+ set(INSTALL_DOC "share/${project}/doc") # /usr/[local]/share/doc/<project>
|
33 |
+
+ set(INSTALL_SHORTCUTS "share/${project}/applications") # /usr/[local]/share/applications
|
34 |
+
set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps
|
35 |
+
set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts)
|
36 |
+
else()
|
37 |
+
diff --git a/source/glbinding-aux/CMakeLists.txt b/source/glbinding-aux/CMakeLists.txt
|
38 |
+
index 61cc166..cb0758a 100644
|
39 |
+
--- a/source/glbinding-aux/CMakeLists.txt
|
40 |
+
+++ b/source/glbinding-aux/CMakeLists.txt
|
41 |
+
@@ -137,7 +137,7 @@ add_library(${target}
|
42 |
+
add_library(${META_PROJECT_NAME}::${target} ALIAS ${target})
|
43 |
+
|
44 |
+
# Export library for downstream projects
|
45 |
+
-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake)
|
46 |
+
+export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake)
|
47 |
+
|
48 |
+
# Create API export header
|
49 |
+
generate_export_header(${target}
|
50 |
+
diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt
|
51 |
+
index bca68d1..f014494 100644
|
52 |
+
--- a/source/glbinding/CMakeLists.txt
|
53 |
+
+++ b/source/glbinding/CMakeLists.txt
|
54 |
+
@@ -172,7 +172,7 @@ add_library(${target}
|
55 |
+
add_library(${META_PROJECT_NAME}::${target} ALIAS ${target})
|
56 |
+
|
57 |
+
# Export library for downstream projects
|
58 |
+
-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake)
|
59 |
+
+export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake)
|
60 |
+
|
61 |
+
# Create API export header
|
62 |
+
generate_export_header(${target}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/0004_fix-config-expected-paths.patch
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/glbinding-config.cmake b/glbinding-config.cmake
|
2 |
+
index 03fc505..01b6cc8 100644
|
3 |
+
--- a/glbinding-config.cmake
|
4 |
+
+++ b/glbinding-config.cmake
|
5 |
+
@@ -1,7 +1,7 @@
|
6 |
+
|
7 |
+
# This config script tries to locate the project either in its source tree
|
8 |
+
# or from an install location.
|
9 |
+
-#
|
10 |
+
+#
|
11 |
+
# Please adjust the list of submodules to search for.
|
12 |
+
|
13 |
+
|
14 |
+
@@ -35,20 +35,11 @@ endmacro()
|
15 |
+
|
16 |
+
# Try install location
|
17 |
+
set(MODULE_FOUND FALSE)
|
18 |
+
-find_modules("cmake")
|
19 |
+
+find_modules(".")
|
20 |
+
|
21 |
+
if(MODULE_FOUND)
|
22 |
+
return()
|
23 |
+
endif()
|
24 |
+
|
25 |
+
-# Try common build locations
|
26 |
+
-if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
27 |
+
- find_modules("build-debug/cmake")
|
28 |
+
- find_modules("build/cmake")
|
29 |
+
-else()
|
30 |
+
- find_modules("build/cmake")
|
31 |
+
- find_modules("build-debug/cmake")
|
32 |
+
-endif()
|
33 |
+
-
|
34 |
+
# Signal success/failure to CMake
|
35 |
+
set(glbinding_FOUND ${MODULE_FOUND})
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/portfile.cmake
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO cginternals/glbinding
|
4 |
+
REF v3.1.0
|
5 |
+
SHA512 d7294c9a0dc47a7c107b134e5dfa78c5812fc6bf739b9fd778fa7ce946d5ea971839a65c3985e0915fd75311e4a85fb221d33a71856c460199eab0e7622f7151
|
6 |
+
HEAD_REF master
|
7 |
+
PATCHES
|
8 |
+
0001_force-system-install.patch
|
9 |
+
0002_fix-uwpmacro.patch
|
10 |
+
0003_fix-cmake-configs-paths.patch
|
11 |
+
0004_fix-config-expected-paths.patch
|
12 |
+
)
|
13 |
+
|
14 |
+
vcpkg_configure_cmake(
|
15 |
+
SOURCE_PATH ${SOURCE_PATH}
|
16 |
+
PREFER_NINJA
|
17 |
+
OPTIONS
|
18 |
+
-DOPTION_BUILD_TESTS=OFF
|
19 |
+
-DOPTION_BUILD_GPU_TESTS=OFF
|
20 |
+
-DOPTION_BUILD_TOOLS=OFF
|
21 |
+
-DOPTION_BUILD_EXAMPLES=OFF
|
22 |
+
-DGIT_REV=0
|
23 |
+
-DCMAKE_DISABLE_FIND_PACKAGE_cpplocate=ON
|
24 |
+
-DOPTION_BUILD_EXAMPLES=OFF
|
25 |
+
)
|
26 |
+
|
27 |
+
vcpkg_install_cmake()
|
28 |
+
vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding)
|
29 |
+
vcpkg_copy_pdbs()
|
30 |
+
|
31 |
+
## _IMPORT_PREFIX needs to go up one extra level in the directory tree.
|
32 |
+
file(GLOB_RECURSE TARGET_CMAKES "${CURRENT_PACKAGES_DIR}/*-export.cmake")
|
33 |
+
foreach(TARGET_CMAKE IN LISTS TARGET_CMAKES)
|
34 |
+
file(READ ${TARGET_CMAKE} _contents)
|
35 |
+
string(REPLACE
|
36 |
+
[[
|
37 |
+
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
38 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
39 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
40 |
+
]]
|
41 |
+
[[
|
42 |
+
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
43 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
44 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
45 |
+
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
46 |
+
]]
|
47 |
+
_contents "${_contents}")
|
48 |
+
file(WRITE ${TARGET_CMAKE} "${_contents}")
|
49 |
+
endforeach()
|
50 |
+
|
51 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
52 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
53 |
+
|
54 |
+
# Remove files already published by egl-registry
|
55 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/KHR)
|
56 |
+
|
57 |
+
# Handle copyright
|
58 |
+
file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/LICENSE ${CURRENT_PACKAGES_DIR}/share/glbinding/copyright)
|
59 |
+
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/glbinding/usage @ONLY)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/usage
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The package glbinding:@TARGET_TRIPLET@ provides CMake targets:
|
2 |
+
|
3 |
+
find_package(glbinding CONFIG REQUIRED)
|
4 |
+
target_link_libraries(main PRIVATE glbinding::glbinding glbinding::glbinding-aux)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glbinding/vcpkg.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glbinding",
|
3 |
+
"version-string": "3.1.0",
|
4 |
+
"port-version": 3,
|
5 |
+
"description": "glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API",
|
6 |
+
"homepage": "https://github.com/cginternals/glbinding",
|
7 |
+
"dependencies": [
|
8 |
+
"egl-registry"
|
9 |
+
]
|
10 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/fix-LNK2019.patch
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt
|
2 |
+
index 419c243..f81fab4 100644
|
3 |
+
--- a/build/cmake/CMakeLists.txt
|
4 |
+
+++ b/build/cmake/CMakeLists.txt
|
5 |
+
@@ -120,9 +120,9 @@ if (MSVC)
|
6 |
+
target_compile_options (glew PRIVATE -GS-)
|
7 |
+
target_compile_options (glew_s PRIVATE -GS-)
|
8 |
+
# remove stdlib dependency
|
9 |
+
- target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry)
|
10 |
+
- target_link_libraries (glew LINK_PRIVATE libvcruntime.lib)
|
11 |
+
- target_link_libraries (glew LINK_PRIVATE msvcrt.lib )
|
12 |
+
+ #target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry)
|
13 |
+
+ #target_link_libraries (glew LINK_PRIVATE libvcruntime.lib)
|
14 |
+
+ #target_link_libraries (glew LINK_PRIVATE msvcrt.lib )
|
15 |
+
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
16 |
+
elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang")))
|
17 |
+
# remove stdlib dependency on windows with GCC and Clang (for similar reasons
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/portfile.cmake
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
if(VCPKG_TARGET_IS_LINUX)
|
2 |
+
message(WARNING "${PORT} requires the following libraries from the system package manager:\n libxmu-dev\n libxi-dev\n libgl-dev\n\nThese can be installed on Ubuntu systems via apt-get install libxmu-dev libxi-dev libgl-dev.")
|
3 |
+
endif()
|
4 |
+
|
5 |
+
# Don't change to vcpkg_from_github! The sources in the git repository (archives) are missing some files that are distributed inside releases.
|
6 |
+
# More info: https://github.com/nigels-com/glew/issues/31 and https://github.com/nigels-com/glew/issues/13
|
7 |
+
vcpkg_download_distfile(ARCHIVE
|
8 |
+
URLS "https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz"
|
9 |
+
FILENAME "glew-2.2.0.tgz"
|
10 |
+
SHA512 57453646635609d54f62fb32a080b82b601fd471fcfd26e109f479b3fef6dfbc24b83f4ba62916d07d62cd06d1409ad7aa19bc1cd7cf3639c103c815b8be31d1
|
11 |
+
)
|
12 |
+
|
13 |
+
vcpkg_extract_source_archive_ex(
|
14 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
15 |
+
ARCHIVE ${ARCHIVE}
|
16 |
+
REF glew
|
17 |
+
PATCHES
|
18 |
+
fix-LNK2019.patch
|
19 |
+
)
|
20 |
+
|
21 |
+
vcpkg_cmake_configure(
|
22 |
+
SOURCE_PATH "${SOURCE_PATH}/build/cmake"
|
23 |
+
DISABLE_PARALLEL_CONFIGURE
|
24 |
+
OPTIONS
|
25 |
+
-DBUILD_UTILS=OFF
|
26 |
+
)
|
27 |
+
|
28 |
+
vcpkg_cmake_install()
|
29 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glew)
|
30 |
+
# Skip check the required dependency opengl
|
31 |
+
vcpkg_fixup_pkgconfig(SKIP_CHECK)
|
32 |
+
|
33 |
+
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
34 |
+
set(_targets_cmake_files)
|
35 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
36 |
+
list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake")
|
37 |
+
endif()
|
38 |
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
39 |
+
list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake")
|
40 |
+
endif()
|
41 |
+
|
42 |
+
foreach(FILE ${_targets_cmake_files})
|
43 |
+
file(READ ${FILE} _contents)
|
44 |
+
string(REPLACE "libglew32" "glew32" _contents "${_contents}")
|
45 |
+
file(WRITE ${FILE} "${_contents}")
|
46 |
+
endforeach()
|
47 |
+
|
48 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libglew32.lib")
|
49 |
+
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libglew32.lib" "${CURRENT_PACKAGES_DIR}/lib/glew32.lib")
|
50 |
+
endif()
|
51 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib")
|
52 |
+
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib")
|
53 |
+
endif()
|
54 |
+
endif()
|
55 |
+
|
56 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
57 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
58 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
59 |
+
foreach(FILE "${CURRENT_PACKAGES_DIR}/include/GL/glew.h" "${CURRENT_PACKAGES_DIR}/include/GL/wglew.h" "${CURRENT_PACKAGES_DIR}/include/GL/glxew.h")
|
60 |
+
file(READ ${FILE} _contents)
|
61 |
+
string(REPLACE "#ifdef GLEW_STATIC" "#if 1" _contents "${_contents}")
|
62 |
+
file(WRITE ${FILE} "${_contents}")
|
63 |
+
endforeach()
|
64 |
+
endif()
|
65 |
+
|
66 |
+
vcpkg_copy_pdbs()
|
67 |
+
|
68 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
69 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
70 |
+
|
71 |
+
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
72 |
+
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
73 |
+
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/usage
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The package glew is compatible with built-in CMake targets:
|
2 |
+
|
3 |
+
find_package(GLEW REQUIRED)
|
4 |
+
target_link_libraries(main PRIVATE GLEW::GLEW)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/vcpkg-cmake-wrapper.cmake
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include(SelectLibraryConfigurations)
|
2 |
+
_find_package(GLEW CONFIG)
|
3 |
+
if(GLEW_FOUND AND TARGET GLEW::GLEW AND NOT DEFINED GLEW_INCLUDE_DIRS)
|
4 |
+
get_target_property(GLEW_INCLUDE_DIRS GLEW::GLEW INTERFACE_INCLUDE_DIRECTORIES)
|
5 |
+
set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS})
|
6 |
+
get_target_property(_GLEW_DEFS GLEW::GLEW INTERFACE_COMPILE_DEFINITIONS)
|
7 |
+
if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC")
|
8 |
+
get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_LOCATION_DEBUG)
|
9 |
+
get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_LOCATION_RELEASE)
|
10 |
+
else()
|
11 |
+
get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_IMPLIB_DEBUG)
|
12 |
+
get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_IMPLIB_RELEASE)
|
13 |
+
endif()
|
14 |
+
get_target_property(_GLEW_LINK_INTERFACE GLEW::GLEW IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE) # same for debug and release
|
15 |
+
list(APPEND GLEW_LIBRARIES ${_GLEW_LINK_INTERFACE})
|
16 |
+
list(APPEND GLEW_LIBRARY ${_GLEW_LINK_INTERFACE})
|
17 |
+
select_library_configurations(GLEW)
|
18 |
+
if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC")
|
19 |
+
set(GLEW_STATIC_LIBRARIES ${GLEW_LIBRARIES})
|
20 |
+
else()
|
21 |
+
set(GLEW_SHARED_LIBRARIES ${GLEW_LIBRARIES})
|
22 |
+
endif()
|
23 |
+
unset(_GLEW_DEFS)
|
24 |
+
unset(_GLEW_LINK_INTERFACE)
|
25 |
+
endif()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glew/vcpkg.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glew",
|
3 |
+
"version-string": "2.2.0",
|
4 |
+
"description": "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library.",
|
5 |
+
"homepage": "https://github.com/nigels-com/glew",
|
6 |
+
"dependencies": [
|
7 |
+
"opengl",
|
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/glfw3/portfile.cmake
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO glfw/glfw
|
4 |
+
REF 45ce5ddd197d5c58f50fdd3296a5131c894e5527 #v3.3.7
|
5 |
+
SHA512 0802b499cb56f5c4f575304279aafe7d812443fcf3dbfa75178cfba7a3693fb88731ae5dd29c6937598ba977de156d92af1ea99929b70ff72ed8429693f301c7
|
6 |
+
HEAD_REF master
|
7 |
+
)
|
8 |
+
|
9 |
+
if(VCPKG_TARGET_IS_LINUX)
|
10 |
+
message(
|
11 |
+
"GLFW3 currently requires the following libraries from the system package manager:
|
12 |
+
xinerama
|
13 |
+
xcursor
|
14 |
+
xorg
|
15 |
+
libglu1-mesa
|
16 |
+
|
17 |
+
These can be installed on Ubuntu systems via sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev")
|
18 |
+
endif()
|
19 |
+
|
20 |
+
vcpkg_cmake_configure(
|
21 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
22 |
+
OPTIONS
|
23 |
+
-DGLFW_BUILD_EXAMPLES=OFF
|
24 |
+
-DGLFW_BUILD_TESTS=OFF
|
25 |
+
-DGLFW_BUILD_DOCS=OFF
|
26 |
+
)
|
27 |
+
|
28 |
+
vcpkg_cmake_install()
|
29 |
+
|
30 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glfw3)
|
31 |
+
|
32 |
+
vcpkg_fixup_pkgconfig()
|
33 |
+
|
34 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
35 |
+
|
36 |
+
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
37 |
+
|
38 |
+
vcpkg_copy_pdbs()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glfw3/vcpkg.json
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glfw3",
|
3 |
+
"version-semver": "3.3.7",
|
4 |
+
"description": "GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.",
|
5 |
+
"homepage": "https://github.com/glfw/glfw",
|
6 |
+
"license": "Zlib",
|
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/gli/disable-test.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 6eb1a68..610c0bc 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -71,7 +71,7 @@ endmacro(addExternalPackageGTC)
|
6 |
+
# Add subdirectory
|
7 |
+
|
8 |
+
add_subdirectory(gli)
|
9 |
+
-add_subdirectory(test)
|
10 |
+
+#add_subdirectory(test)
|
11 |
+
#add_subdirectory(doc)
|
12 |
+
|
13 |
+
################################
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gli/portfile.cmake
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#header-only library
|
2 |
+
|
3 |
+
vcpkg_from_github(
|
4 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
5 |
+
REPO g-truc/gli
|
6 |
+
REF 779b99ac6656e4d30c3b24e96e0136a59649a869
|
7 |
+
SHA512 6e7ab46b7943cb185c8c1f6e45b765f5463e03628973043a0e8b866458ccceb5249f69a2a77b5e69c73f3ace85af96c7b9b2137685ceb6d0fcb67e491a49be69
|
8 |
+
HEAD_REF master
|
9 |
+
PATCHES
|
10 |
+
disable-test.patch
|
11 |
+
)
|
12 |
+
|
13 |
+
vcpkg_configure_cmake(
|
14 |
+
SOURCE_PATH ${SOURCE_PATH}
|
15 |
+
PREFER_NINJA
|
16 |
+
)
|
17 |
+
|
18 |
+
vcpkg_install_cmake()
|
19 |
+
|
20 |
+
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gli)
|
21 |
+
|
22 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
23 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib)
|
24 |
+
file(REMOVE ${CURRENT_PACKAGES_DIR}/include/gli/CMakeLists.txt)
|
25 |
+
|
26 |
+
# Put the license file where vcpkg expects it
|
27 |
+
# manual.md contains the "licenses" section for the project
|
28 |
+
file(INSTALL ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gli/vcpkg.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gli",
|
3 |
+
"version-date": "2021-07-06",
|
4 |
+
"description": "OpenGL Image (GLI)",
|
5 |
+
"homepage": "https://gli.g-truc.net",
|
6 |
+
"dependencies": [
|
7 |
+
"glm"
|
8 |
+
]
|
9 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/libintl.patch
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/meson.build b/meson.build
|
2 |
+
index c418f50b1..e7158c036 100644
|
3 |
+
--- a/meson.build
|
4 |
+
+++ b/meson.build
|
5 |
+
@@ -2048,42 +2048,10 @@ endif
|
6 |
+
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
|
7 |
+
# implementations. This could be extended if issues are found in some platforms.
|
8 |
+
libintl_deps = []
|
9 |
+
-if cc.has_function('ngettext', args : osx_ldflags)
|
10 |
+
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
|
11 |
+
-else
|
12 |
+
- # First just find the bare library.
|
13 |
+
- libintl = cc.find_library('intl', required : false)
|
14 |
+
- # The bare library probably won't link without help if it's static.
|
15 |
+
- if libintl.found() and not cc.has_function('ngettext', args : osx_ldflags, dependencies : libintl)
|
16 |
+
- libintl_iconv = cc.find_library('iconv', required : false)
|
17 |
+
- # libintl supports different threading APIs, which may not
|
18 |
+
- # require additional flags, but it defaults to using pthreads if
|
19 |
+
- # found. Meson's "threads" dependency does not allow you to
|
20 |
+
- # prefer pthreads. We may not be using pthreads for glib itself
|
21 |
+
- # either so just link the library to satisfy libintl rather than
|
22 |
+
- # also defining the macros with the -pthread flag.
|
23 |
+
- libintl_pthread = cc.find_library('pthread', required : false)
|
24 |
+
- # Try linking with just libiconv.
|
25 |
+
- if libintl_iconv.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv])
|
26 |
+
- libintl_deps += [libintl_iconv]
|
27 |
+
- # Then also try linking with pthreads.
|
28 |
+
- elif libintl_iconv.found() and libintl_pthread.found() and cc.has_function('ngettext', args : osx_ldflags, dependencies : [libintl, libintl_iconv, libintl_pthread])
|
29 |
+
- libintl_deps += [libintl_iconv, libintl_pthread]
|
30 |
+
- else
|
31 |
+
- libintl = disabler()
|
32 |
+
- endif
|
33 |
+
- endif
|
34 |
+
- if not libintl.found()
|
35 |
+
- libintl = subproject('proxy-libintl').get_variable('intl_dep')
|
36 |
+
- libintl_deps = [libintl] + libintl_deps
|
37 |
+
- have_bind_textdomain_codeset = true # proxy-libintl supports it
|
38 |
+
- else
|
39 |
+
- libintl_deps = [libintl] + libintl_deps
|
40 |
+
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags,
|
41 |
+
+libintl = dependency('Intl', method:'cmake', required : true)
|
42 |
+
+libintl_deps += [libintl]
|
43 |
+
+have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', args : osx_ldflags,
|
44 |
+
dependencies : libintl_deps)
|
45 |
+
- endif
|
46 |
+
-endif
|
47 |
+
-
|
48 |
+
glib_conf.set('HAVE_BIND_TEXTDOMAIN_CODESET', have_bind_textdomain_codeset)
|
49 |
+
|
50 |
+
# We require gettext to always be present
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/portfile.cmake
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Glib relies on DllMain on Windows
|
2 |
+
if (VCPKG_TARGET_IS_WINDOWS)
|
3 |
+
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
4 |
+
#remove if merged: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1655
|
5 |
+
endif()
|
6 |
+
|
7 |
+
set(GLIB_MAJOR_MINOR 2.70)
|
8 |
+
set(GLIB_PATCH 5)
|
9 |
+
vcpkg_download_distfile(ARCHIVE
|
10 |
+
URLS "https://ftp.gnome.org/pub/gnome/sources/glib/${GLIB_MAJOR_MINOR}/glib-${GLIB_MAJOR_MINOR}.${GLIB_PATCH}.tar.xz"
|
11 |
+
FILENAME "glib-${GLIB_MAJOR_MINOR}.${GLIB_PATCH}.tar.xz"
|
12 |
+
SHA512 3dfb45a9b6fe67fcf185f5cbb3985b6f1da17caf9c6f01e638d8fe4a6271ea1a30b0cf4ca8f43728bd29a8ac13b05a34e1cf262ade7795f0c0d0a2c0b90b1ff8)
|
13 |
+
|
14 |
+
vcpkg_extract_source_archive_ex(
|
15 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
16 |
+
ARCHIVE ${ARCHIVE}
|
17 |
+
REF ${GLIB_VERSION}
|
18 |
+
PATCHES
|
19 |
+
use-libiconv-on-windows.patch
|
20 |
+
libintl.patch
|
21 |
+
)
|
22 |
+
|
23 |
+
|
24 |
+
if (selinux IN_LIST FEATURES)
|
25 |
+
if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT EXISTS "/usr/include/selinux")
|
26 |
+
message("Selinux was not found in its typical system location. Your build may fail. You can install Selinux with \"apt-get install selinux\".")
|
27 |
+
endif()
|
28 |
+
list(APPEND OPTIONS -Dselinux=enabled)
|
29 |
+
else()
|
30 |
+
list(APPEND OPTIONS -Dselinux=disabled)
|
31 |
+
endif()
|
32 |
+
|
33 |
+
if (libmount IN_LIST FEATURES)
|
34 |
+
list(APPEND OPTIONS -Dlibmount=enabled)
|
35 |
+
else()
|
36 |
+
list(APPEND OPTIONS -Dlibmount=disabled)
|
37 |
+
endif()
|
38 |
+
|
39 |
+
if(VCPKG_TARGET_IS_WINDOWS)
|
40 |
+
list(APPEND OPTIONS -Diconv=external)
|
41 |
+
endif()
|
42 |
+
|
43 |
+
vcpkg_configure_meson(
|
44 |
+
SOURCE_PATH ${SOURCE_PATH}
|
45 |
+
OPTIONS
|
46 |
+
-Dinstalled_tests=false
|
47 |
+
${OPTIONS}
|
48 |
+
-Dtests=false
|
49 |
+
-Dxattr=false
|
50 |
+
-Dlibelf=disabled
|
51 |
+
)
|
52 |
+
|
53 |
+
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
54 |
+
|
55 |
+
vcpkg_copy_pdbs()
|
56 |
+
|
57 |
+
set(GLIB_TOOLS gdbus
|
58 |
+
gio
|
59 |
+
gio-querymodules
|
60 |
+
glib-compile-resources
|
61 |
+
glib-compile-schemas
|
62 |
+
gobject-query
|
63 |
+
gresource
|
64 |
+
gsettings
|
65 |
+
)
|
66 |
+
|
67 |
+
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
68 |
+
if(NOT VCPKG_TARGET_IS_OSX)
|
69 |
+
list(APPEND GLIB_TOOLS gapplication)
|
70 |
+
endif()
|
71 |
+
list(APPEND GLIB_TOOLS glib-gettextize gtester)
|
72 |
+
endif()
|
73 |
+
set(GLIB_SCRIPTS gdbus-codegen glib-genmarshal glib-mkenums gtester-report)
|
74 |
+
|
75 |
+
|
76 |
+
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "x64|arm64")
|
77 |
+
list(APPEND GLIB_TOOLS gspawn-win64-helper${VCPKG_EXECUTABLE_SUFFIX}
|
78 |
+
gspawn-win64-helper-console${VCPKG_EXECUTABLE_SUFFIX})
|
79 |
+
elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
80 |
+
list(APPEND GLIB_TOOLS gspawn-win32-helper${VCPKG_EXECUTABLE_SUFFIX}
|
81 |
+
gspawn-win32-helper-console${VCPKG_EXECUTABLE_SUFFIX})
|
82 |
+
endif()
|
83 |
+
vcpkg_copy_tools(TOOL_NAMES ${GLIB_TOOLS} AUTO_CLEAN)
|
84 |
+
foreach(script IN LISTS GLIB_SCRIPTS)
|
85 |
+
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${script}" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/${script}")
|
86 |
+
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${script}")
|
87 |
+
endforeach()
|
88 |
+
|
89 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
90 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
91 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
92 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
93 |
+
endif()
|
94 |
+
|
95 |
+
IF(VCPKG_TARGET_IS_WINDOWS)
|
96 |
+
set(SYSTEM_LIBRARIES dnsapi iphlpapi winmm lshlwapi)
|
97 |
+
else()
|
98 |
+
set(SYSTEM_LIBRARIES resolv mount blkid selinux)
|
99 |
+
endif()
|
100 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gio-2.0.pc")
|
101 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gio-2.0.pc" "\${bindir}" "\${bindir}/../tools/${PORT}")
|
102 |
+
endif()
|
103 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gio-2.0.pc")
|
104 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gio-2.0.pc" "\${bindir}" "\${bindir}/../../tools/${PORT}")
|
105 |
+
endif()
|
106 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glib-2.0.pc")
|
107 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/glib-2.0.pc" "\${bindir}" "\${bindir}/../tools/${PORT}")
|
108 |
+
endif()
|
109 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glib-2.0.pc")
|
110 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/glib-2.0.pc" "\${bindir}" "\${bindir}/../../tools/${PORT}")
|
111 |
+
endif()
|
112 |
+
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES})
|
113 |
+
|
114 |
+
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
115 |
+
|
116 |
+
# Fix python scripts
|
117 |
+
set(_file "${CURRENT_PACKAGES_DIR}/tools/${PORT}/gdbus-codegen")
|
118 |
+
file(READ "${_file}" _contents)
|
119 |
+
string(REPLACE "elif os.path.basename(filedir) == 'bin':" "elif os.path.basename(filedir) == 'tools':" _contents "${_contents}")
|
120 |
+
string(REPLACE "path = os.path.join(filedir, '..', 'share', 'glib-2.0')" "path = os.path.join(filedir, '../..', 'share', 'glib-2.0')" _contents "${_contents}")
|
121 |
+
string(REPLACE "path = os.path.join(filedir, '..')" "path = os.path.join(filedir, '../../share/glib-2.0')" _contents "${_contents}")
|
122 |
+
string(REPLACE "path = os.path.join('${CURRENT_PACKAGES_DIR}/share', 'glib-2.0')" "path = os.path.join('unuseable/share', 'glib-2.0')" _contents "${_contents}")
|
123 |
+
|
124 |
+
file(WRITE "${_file}" "${_contents}")
|
125 |
+
|
126 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/gdb")
|
127 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/glib/glib-gettextize")
|
128 |
+
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/glib/glib-gettextize" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/../..")
|
129 |
+
endif()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/use-libiconv-on-windows.patch
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/glib/gconvert.c b/glib/gconvert.c
|
2 |
+
index 3deac78..134ded9 100644
|
3 |
+
--- a/glib/gconvert.c
|
4 |
+
+++ b/glib/gconvert.c
|
5 |
+
@@ -30,7 +30,8 @@
|
6 |
+
#include <stdlib.h>
|
7 |
+
|
8 |
+
#ifdef G_OS_WIN32
|
9 |
+
-#include "win_iconv.c"
|
10 |
+
+#define USE_LIBICONV_GNU
|
11 |
+
+#include <iconv.h>
|
12 |
+
#endif
|
13 |
+
|
14 |
+
#ifdef G_PLATFORM_WIN32
|
15 |
+
diff --git a/meson.build b/meson.build
|
16 |
+
index d938ddf51..2ba256115 100644
|
17 |
+
--- a/meson.build
|
18 |
+
+++ b/meson.build
|
19 |
+
@@ -1914,7 +1914,8 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
|
20 |
+
# the built-in implementation
|
21 |
+
iconv_opt = get_option('iconv')
|
22 |
+
if host_system == 'windows'
|
23 |
+
- libiconv = []
|
24 |
+
+ libiconv = [cc.find_library('iconv')]
|
25 |
+
+ found_iconv = true
|
26 |
+
# We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
|
27 |
+
# any external library for it
|
28 |
+
if iconv_opt != 'auto'
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glib/vcpkg.json
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glib",
|
3 |
+
"version": "2.70.5",
|
4 |
+
"description": "Portable, general-purpose utility library.",
|
5 |
+
"homepage": "https://developer.gnome.org/glib/",
|
6 |
+
"supports": "!uwp & !(windows & static)",
|
7 |
+
"dependencies": [
|
8 |
+
"dirent",
|
9 |
+
"gettext",
|
10 |
+
"libffi",
|
11 |
+
"libiconv",
|
12 |
+
"pcre",
|
13 |
+
{
|
14 |
+
"name": "vcpkg-tool-meson",
|
15 |
+
"host": true
|
16 |
+
},
|
17 |
+
"zlib"
|
18 |
+
],
|
19 |
+
"features": {
|
20 |
+
"libmount": {
|
21 |
+
"description": "Build with libmount support.",
|
22 |
+
"supports": "linux",
|
23 |
+
"dependencies": [
|
24 |
+
"libmount"
|
25 |
+
]
|
26 |
+
},
|
27 |
+
"selinux": {
|
28 |
+
"description": "Build with selinux support."
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glibmm/build-support-vs2022-builds.patch
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
commit b3a77c3f0b7dd2e1405a781ac9a76f648779d7fa
|
2 |
+
Author: Chun-wei Fan <[email protected]>
|
3 |
+
Date: Tue Nov 9 14:28:14 2021 +0800
|
4 |
+
|
5 |
+
Build: Support VS2022 builds
|
6 |
+
|
7 |
+
Make these builds distinct from the Visual Studio 2019 builds.
|
8 |
+
|
9 |
+
diff --git a/MSVC_NMake/detectenv-msvc.mak b/MSVC_NMake/detectenv-msvc.mak
|
10 |
+
index 6933505d..16d57810 100644
|
11 |
+
--- a/MSVC_NMake/detectenv-msvc.mak
|
12 |
+
+++ b/MSVC_NMake/detectenv-msvc.mak
|
13 |
+
@@ -98,9 +98,12 @@ PDBVER = 14
|
14 |
+
!if $(VCVERSION) > 1909 && $(VCVERSION) < 1920
|
15 |
+
VSVER_SUFFIX = 1
|
16 |
+
VSVER = 15
|
17 |
+
-!elseif $(VCVERSION) > 1919 && $(VCVERSION) < 2000
|
18 |
+
+!elseif $(VCVERSION) > 1919 && $(VCVERSION) < 1930
|
19 |
+
VSVER_SUFFIX = 2
|
20 |
+
VSVER = 16
|
21 |
+
+!elseif $(VCVERSION) > 1929 && $(VCVERSION) < 2000
|
22 |
+
+VSVER_SUFFIX = 3
|
23 |
+
+VSVER = 17
|
24 |
+
!else
|
25 |
+
VSVER = $(PDBVER)
|
26 |
+
!endif
|
27 |
+
diff --git a/meson.build b/meson.build
|
28 |
+
index b7c7f77e..a2ee5ef3 100644
|
29 |
+
--- a/meson.build
|
30 |
+
+++ b/meson.build
|
31 |
+
@@ -231,7 +231,9 @@ if is_msvc
|
32 |
+
add_project_arguments(disabled_warnings, language: 'cpp')
|
33 |
+
|
34 |
+
if use_msvc14x_toolset_ver
|
35 |
+
- if cpp_compiler.version().version_compare('>=19.20')
|
36 |
+
+ if cpp_compiler.version().version_compare('>=19.30')
|
37 |
+
+ msvc14x_toolset_ver = '-vc143'
|
38 |
+
+ elif cpp_compiler.version().version_compare('>=19.20')
|
39 |
+
msvc14x_toolset_ver = '-vc142'
|
40 |
+
elif cpp_compiler.version().version_compare('>=19.10')
|
41 |
+
msvc14x_toolset_ver = '-vc141'
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glibmm/portfile.cmake
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Glib uses winapi functions not available in WindowsStore
|
2 |
+
|
3 |
+
vcpkg_download_distfile(ARCHIVE
|
4 |
+
URLS "https://ftp.gnome.org/pub/GNOME/sources/glibmm/2.70/glibmm-2.70.0.tar.xz"
|
5 |
+
FILENAME "glibmm-2.70.0.tar.xz"
|
6 |
+
SHA512 059cab7f0b865303cef3cba6c4f3a29ae4e359aba428f5e79cea6fedd3f1e082199f673323cf804902cee14b91739598fbc6ff706ec36f19c4d793d032782518
|
7 |
+
)
|
8 |
+
|
9 |
+
vcpkg_extract_source_archive_ex(
|
10 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
11 |
+
ARCHIVE ${ARCHIVE}
|
12 |
+
PATCHES
|
13 |
+
build-support-vs2022-builds.patch
|
14 |
+
)
|
15 |
+
|
16 |
+
vcpkg_configure_meson(
|
17 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
18 |
+
OPTIONS
|
19 |
+
-Dbuild-examples=false
|
20 |
+
-Dmsvc14x-parallel-installable=false
|
21 |
+
)
|
22 |
+
vcpkg_install_meson()
|
23 |
+
vcpkg_copy_pdbs()
|
24 |
+
|
25 |
+
# intentionally 2.68 - glib does not install glibmm-2.70 files
|
26 |
+
file(REMOVE_RECURSE
|
27 |
+
"${CURRENT_PACKAGES_DIR}/debug/lib/glibmm-2.68/proc"
|
28 |
+
"${CURRENT_PACKAGES_DIR}/lib/glibmm-2.68/proc"
|
29 |
+
)
|
30 |
+
|
31 |
+
vcpkg_fixup_pkgconfig()
|
32 |
+
|
33 |
+
# Handle copyright and readme
|
34 |
+
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
35 |
+
file(INSTALL "${SOURCE_PATH}/README" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME readme.txt)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glibmm/vcpkg.json
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glibmm",
|
3 |
+
"version": "2.70.0",
|
4 |
+
"port-version": 1,
|
5 |
+
"description": "This is glibmm, a C++ API for parts of glib that are useful for C++.",
|
6 |
+
"homepage": "https://www.gtkmm.org.",
|
7 |
+
"license": "LGPL-2.1-or-later",
|
8 |
+
"supports": "!uwp",
|
9 |
+
"dependencies": [
|
10 |
+
"gettext",
|
11 |
+
"glib",
|
12 |
+
"libffi",
|
13 |
+
"libiconv",
|
14 |
+
"libsigcpp-3",
|
15 |
+
"pcre",
|
16 |
+
{
|
17 |
+
"name": "vcpkg-tool-meson",
|
18 |
+
"host": true
|
19 |
+
},
|
20 |
+
"zlib"
|
21 |
+
]
|
22 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glm/CMakeLists.txt
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
|
2 |
+
|
3 |
+
project(glm LANGUAGES CXX)
|
4 |
+
|
5 |
+
include(GNUInstallDirs)
|
6 |
+
|
7 |
+
add_library(glm INTERFACE)
|
8 |
+
target_include_directories(glm INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
9 |
+
|
10 |
+
install(
|
11 |
+
TARGETS glm EXPORT glm-config
|
12 |
+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/
|
13 |
+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/
|
14 |
+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/
|
15 |
+
)
|
16 |
+
|
17 |
+
install(
|
18 |
+
EXPORT glm-config
|
19 |
+
NAMESPACE glm::
|
20 |
+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glm
|
21 |
+
)
|
22 |
+
|
23 |
+
install(
|
24 |
+
DIRECTORY ${CMAKE_SOURCE_DIR}/glm
|
25 |
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
26 |
+
FILES_MATCHING PATTERN "*.hpp*" PATTERN "*.inl*" PATTERN "*.h*"
|
27 |
+
)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glm/portfile.cmake
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO g-truc/glm
|
4 |
+
REF bf71a834948186f4097caa076cd2663c69a10e1e #v0.9.9.8
|
5 |
+
SHA512 226266c02af616a96fb19ee32cf3f98347daa43a4fde5d618d36b38709dce1280de126c542524d40725ecf70359edcc5b60660554c65ce246514501fb4c9c87c
|
6 |
+
HEAD_REF master
|
7 |
+
)
|
8 |
+
|
9 |
+
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
10 |
+
|
11 |
+
vcpkg_configure_cmake(
|
12 |
+
SOURCE_PATH ${SOURCE_PATH}
|
13 |
+
PREFER_NINJA
|
14 |
+
)
|
15 |
+
|
16 |
+
vcpkg_install_cmake()
|
17 |
+
vcpkg_fixup_cmake_targets()
|
18 |
+
|
19 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
20 |
+
|
21 |
+
# Put the license file where vcpkg expects it
|
22 |
+
file(INSTALL ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glm/vcpkg.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glm",
|
3 |
+
"version-string": "0.9.9.8",
|
4 |
+
"port-version": 1,
|
5 |
+
"description": "OpenGL Mathematics (GLM)",
|
6 |
+
"homepage": "https://glm.g-truc.net"
|
7 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/fix-dependency-glm.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/source/globjects/CMakeLists.txt b/source/globjects/CMakeLists.txt
|
2 |
+
index 71e92d8..b8b4408 100644
|
3 |
+
--- a/source/globjects/CMakeLists.txt
|
4 |
+
+++ b/source/globjects/CMakeLists.txt
|
5 |
+
@@ -359,7 +359,7 @@ target_link_libraries(${target}
|
6 |
+
|
7 |
+
PUBLIC
|
8 |
+
${DEFAULT_LIBRARIES}
|
9 |
+
- glm
|
10 |
+
+ glm::glm
|
11 |
+
glbinding::glbinding
|
12 |
+
glbinding::glbinding-aux
|
13 |
+
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/portfile.cmake
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO cginternals/globjects
|
4 |
+
REF dc68b09a53ec20683d3b3a12ed8d9cb12602bb9a
|
5 |
+
SHA512 5145df795a73a8d74e983e143fd57441865f3082860efb89a3aa8c4d64c2eb6f0256a8049ccd5479dd77e53ef6638d9c903b29a8ef2b41a076003d9595912500
|
6 |
+
HEAD_REF master
|
7 |
+
PATCHES
|
8 |
+
system-install.patch
|
9 |
+
fix-dependency-glm.patch
|
10 |
+
)
|
11 |
+
|
12 |
+
vcpkg_configure_cmake(
|
13 |
+
SOURCE_PATH ${SOURCE_PATH}
|
14 |
+
PREFER_NINJA
|
15 |
+
OPTIONS
|
16 |
+
-DOPTION_BUILD_TESTS=OFF
|
17 |
+
-DOPTION_BUILD_GPU_TESTS=OFF
|
18 |
+
-DGIT_REV=0
|
19 |
+
)
|
20 |
+
|
21 |
+
vcpkg_install_cmake()
|
22 |
+
|
23 |
+
vcpkg_fixup_cmake_targets(CONFIG_PATH share/globjects/cmake/globjects)
|
24 |
+
|
25 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
26 |
+
|
27 |
+
file(WRITE ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-config.cmake "include(CMakeFindDependencyMacro)
|
28 |
+
find_dependency(glm)
|
29 |
+
find_dependency(glbinding)
|
30 |
+
|
31 |
+
include(\${CMAKE_CURRENT_LIST_DIR}/globjects-export.cmake)
|
32 |
+
")
|
33 |
+
|
34 |
+
# Handle copyright
|
35 |
+
file(RENAME ${CURRENT_PACKAGES_DIR}/share/globjects/LICENSE ${CURRENT_PACKAGES_DIR}/share/globjects/copyright)
|
36 |
+
|
37 |
+
vcpkg_copy_pdbs()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/system-install.patch
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 6556346..48ba95d 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -42,11 +42,13 @@ include(cmake/GenerateTemplateExportHeader.cmake)
|
6 |
+
#
|
7 |
+
|
8 |
+
# Get git revision
|
9 |
+
+if(NOT DEFINED GIT_REV)
|
10 |
+
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
11 |
+
string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV)
|
12 |
+
if(NOT GIT_SHA1)
|
13 |
+
set(GIT_REV "0")
|
14 |
+
endif()
|
15 |
+
+endif()
|
16 |
+
|
17 |
+
# Meta information about the project
|
18 |
+
set(META_PROJECT_NAME "globjects")
|
19 |
+
@@ -133,7 +135,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU
|
20 |
+
endif()
|
21 |
+
|
22 |
+
# Installation paths
|
23 |
+
-if(UNIX AND SYSTEM_DIR_INSTALL)
|
24 |
+
+if(1)
|
25 |
+
# Install into the system (/usr/bin or /usr/local/bin)
|
26 |
+
set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/<project>
|
27 |
+
set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share/<project>/cmake
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/globjects/vcpkg.json
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "globjects",
|
3 |
+
"version-string": "1.1.0",
|
4 |
+
"port-version": 4,
|
5 |
+
"description": "C++ library strictly wrapping OpenGL objects",
|
6 |
+
"homepage": "https://github.com/cginternals/globjects",
|
7 |
+
"dependencies": [
|
8 |
+
"glbinding",
|
9 |
+
"glm"
|
10 |
+
]
|
11 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/fix_glog_CMAKE_MODULE_PATH.patch
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 28e2688..cf87798 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -843,36 +843,6 @@ write_basic_package_version_file (
|
6 |
+
export (TARGETS glog NAMESPACE glog:: FILE glog-targets.cmake)
|
7 |
+
export (PACKAGE glog)
|
8 |
+
|
9 |
+
-get_filename_component (_PREFIX "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
|
10 |
+
-
|
11 |
+
-# Directory containing the find modules relative to the config install
|
12 |
+
-# directory.
|
13 |
+
-file (RELATIVE_PATH glog_REL_CMake_MODULES
|
14 |
+
- ${_PREFIX}/${_glog_CMake_INSTALLDIR}
|
15 |
+
- ${_PREFIX}/${_glog_CMake_DATADIR}/glog-modules.cmake)
|
16 |
+
-
|
17 |
+
-get_filename_component (glog_REL_CMake_DATADIR ${glog_REL_CMake_MODULES}
|
18 |
+
- DIRECTORY)
|
19 |
+
-
|
20 |
+
-set (glog_FULL_CMake_DATADIR
|
21 |
+
- ${CMAKE_CURRENT_BINARY_DIR}/${_glog_CMake_DATADIR})
|
22 |
+
-
|
23 |
+
-configure_file (glog-modules.cmake.in
|
24 |
+
- ${CMAKE_CURRENT_BINARY_DIR}/glog-modules.cmake @ONLY)
|
25 |
+
-
|
26 |
+
-install (CODE
|
27 |
+
-"
|
28 |
+
-set (glog_FULL_CMake_DATADIR \"\\\${CMAKE_CURRENT_LIST_DIR}/${glog_REL_CMake_DATADIR}\")
|
29 |
+
-configure_file (\"${CMAKE_CURRENT_SOURCE_DIR}/glog-modules.cmake.in\"
|
30 |
+
- \"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/glog-modules.cmake\" @ONLY)
|
31 |
+
-file (INSTALL
|
32 |
+
- \"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/glog-modules.cmake\"
|
33 |
+
- DESTINATION
|
34 |
+
- \"\${CMAKE_INSTALL_PREFIX}/${_glog_CMake_INSTALLDIR}\")
|
35 |
+
-"
|
36 |
+
- COMPONENT Development
|
37 |
+
-)
|
38 |
+
-
|
39 |
+
install (FILES
|
40 |
+
${CMAKE_CURRENT_BINARY_DIR}/glog-config.cmake
|
41 |
+
${CMAKE_CURRENT_BINARY_DIR}/glog-config-version.cmake
|
42 |
+
diff --git a/glog-config.cmake.in b/glog-config.cmake.in
|
43 |
+
index 5c5c9c0..31fac52 100644
|
44 |
+
--- a/glog-config.cmake.in
|
45 |
+
+++ b/glog-config.cmake.in
|
46 |
+
@@ -5,7 +5,6 @@ endif (CMAKE_VERSION VERSION_LESS @glog_CMake_VERSION@)
|
47 |
+
@PACKAGE_INIT@
|
48 |
+
|
49 |
+
include (CMakeFindDependencyMacro)
|
50 |
+
-include (${CMAKE_CURRENT_LIST_DIR}/glog-modules.cmake)
|
51 |
+
|
52 |
+
@gflags_DEPENDENCY@
|
53 |
+
@Unwind_DEPENDENCY@
|
54 |
+
diff --git a/glog-modules.cmake.in b/glog-modules.cmake.in
|
55 |
+
deleted file mode 100644
|
56 |
+
index 71c5160..0000000
|
57 |
+
--- a/glog-modules.cmake.in
|
58 |
+
+++ /dev/null
|
59 |
+
@@ -1,18 +0,0 @@
|
60 |
+
-cmake_policy (PUSH)
|
61 |
+
-cmake_policy (SET CMP0057 NEW)
|
62 |
+
-
|
63 |
+
-if (CMAKE_VERSION VERSION_LESS 3.3)
|
64 |
+
- message (FATAL_ERROR "glog-modules.cmake requires the consumer "
|
65 |
+
- "to use CMake 3.3 (or newer)")
|
66 |
+
-endif (CMAKE_VERSION VERSION_LESS 3.3)
|
67 |
+
-
|
68 |
+
-set (glog_MODULE_PATH "@glog_FULL_CMake_DATADIR@")
|
69 |
+
-list (APPEND CMAKE_MODULE_PATH ${glog_MODULE_PATH})
|
70 |
+
-
|
71 |
+
-if (NOT glog_MODULE_PATH IN_LIST CMAKE_MODULE_PATH)
|
72 |
+
- message (FATAL_ERROR "Cannot add '${glog_MODULE_PATH}' to "
|
73 |
+
- "CMAKE_MODULE_PATH. This will cause glog-config.cmake to fail at "
|
74 |
+
- "locating required find modules. Make sure CMAKE_MODULE_PATH is not a cache variable.")
|
75 |
+
-endif (NOT glog_MODULE_PATH IN_LIST CMAKE_MODULE_PATH)
|
76 |
+
-
|
77 |
+
-cmake_policy (POP)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/fix_log_every_n.patch
ADDED
@@ -0,0 +1,848 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 61e5f6c..889df87 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -65,7 +65,7 @@ include (GenerateExportHeader)
|
6 |
+
include (GetCacheVariables)
|
7 |
+
include (GNUInstallDirs)
|
8 |
+
|
9 |
+
-#set (CMAKE_DEBUG_POSTFIX d)
|
10 |
+
+#set (CMAKE_DEBUG_POSTFIX d)
|
11 |
+
set (CMAKE_THREAD_PREFER_PTHREAD 1)
|
12 |
+
|
13 |
+
find_package (GTest)
|
14 |
+
@@ -501,6 +501,7 @@ set (GLOG_PUBLIC_H
|
15 |
+
${CMAKE_CURRENT_BINARY_DIR}/glog/stl_logging.h
|
16 |
+
${CMAKE_CURRENT_BINARY_DIR}/glog/vlog_is_on.h
|
17 |
+
src/glog/log_severity.h
|
18 |
+
+ src/glog/platform.h
|
19 |
+
)
|
20 |
+
|
21 |
+
set (GLOG_SRCS
|
22 |
+
diff --git a/src/demangle.cc b/src/demangle.cc
|
23 |
+
index f3e6ad7..8c0bdc7 100644
|
24 |
+
--- a/src/demangle.cc
|
25 |
+
+++ b/src/demangle.cc
|
26 |
+
@@ -38,14 +38,14 @@
|
27 |
+
#include "utilities.h"
|
28 |
+
#include "demangle.h"
|
29 |
+
|
30 |
+
-#if defined(OS_WINDOWS)
|
31 |
+
+#if defined(GLOG_OS_WINDOWS)
|
32 |
+
#include <dbghelp.h>
|
33 |
+
#pragma comment(lib, "dbghelp")
|
34 |
+
#endif
|
35 |
+
|
36 |
+
_START_GOOGLE_NAMESPACE_
|
37 |
+
|
38 |
+
-#if !defined(OS_WINDOWS)
|
39 |
+
+#if !defined(GLOG_OS_WINDOWS)
|
40 |
+
typedef struct {
|
41 |
+
const char *abbrev;
|
42 |
+
const char *real_name;
|
43 |
+
@@ -1324,7 +1324,7 @@ static bool ParseTopLevelMangledName(State *state) {
|
44 |
+
|
45 |
+
// The demangler entry point.
|
46 |
+
bool Demangle(const char *mangled, char *out, int out_size) {
|
47 |
+
-#if defined(OS_WINDOWS)
|
48 |
+
+#if defined(GLOG_OS_WINDOWS)
|
49 |
+
// When built with incremental linking, the Windows debugger
|
50 |
+
// library provides a more complicated `Symbol->Name` with the
|
51 |
+
// Incremental Linking Table offset, which looks like
|
52 |
+
diff --git a/src/demangle_unittest.cc b/src/demangle_unittest.cc
|
53 |
+
index be48341..c65adc4 100644
|
54 |
+
--- a/src/demangle_unittest.cc
|
55 |
+
+++ b/src/demangle_unittest.cc
|
56 |
+
@@ -62,7 +62,7 @@ static const char *DemangleIt(const char * const mangled) {
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
-#if defined(OS_WINDOWS)
|
61 |
+
+#if defined(GLOG_OS_WINDOWS)
|
62 |
+
|
63 |
+
TEST(Demangle, Windows) {
|
64 |
+
EXPECT_STREQ(
|
65 |
+
diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in
|
66 |
+
index 421f1e0..3ecacfb 100644
|
67 |
+
--- a/src/glog/logging.h.in
|
68 |
+
+++ b/src/glog/logging.h.in
|
69 |
+
@@ -35,7 +35,6 @@
|
70 |
+
//
|
71 |
+
#ifndef _LOGGING_H_
|
72 |
+
#define _LOGGING_H_
|
73 |
+
-
|
74 |
+
#include <cerrno>
|
75 |
+
#include <cstddef>
|
76 |
+
#include <cstring>
|
77 |
+
@@ -58,6 +57,8 @@
|
78 |
+
#define GLOG_MSVC_POP_WARNING()
|
79 |
+
#endif
|
80 |
+
|
81 |
+
+#include <glog/platform.h>
|
82 |
+
+
|
83 |
+
#if @ac_cv_have_glog_export@
|
84 |
+
#include "glog/export.h"
|
85 |
+
#endif
|
86 |
+
@@ -101,7 +102,7 @@
|
87 |
+
|
88 |
+
#ifdef HAVE_CXX11_ATOMIC
|
89 |
+
#include <atomic>
|
90 |
+
-#elif defined(OS_WINDOWS)
|
91 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
92 |
+
#include <Windows.h>
|
93 |
+
#endif
|
94 |
+
|
95 |
+
@@ -1057,7 +1058,7 @@ namespace google {
|
96 |
+
__FILE__, __LINE__, @ac_google_namespace@::GLOG_ ## severity, LOG_OCCURRENCES, \
|
97 |
+
&what_to_do).stream()
|
98 |
+
|
99 |
+
-#elif defined(OS_WINDOWS)
|
100 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
101 |
+
|
102 |
+
#define SOME_KIND_OF_LOG_EVERY_N(severity, n, what_to_do) \
|
103 |
+
static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \
|
104 |
+
diff --git a/src/glog/platform.h b/src/glog/platform.h
|
105 |
+
new file mode 100644
|
106 |
+
index 0000000..e614411
|
107 |
+
--- /dev/null
|
108 |
+
+++ b/src/glog/platform.h
|
109 |
+
@@ -0,0 +1,58 @@
|
110 |
+
+// Copyright (c) 2008, Google Inc.
|
111 |
+
+// All rights reserved.
|
112 |
+
+//
|
113 |
+
+// Redistribution and use in source and binary forms, with or without
|
114 |
+
+// modification, are permitted provided that the following conditions are
|
115 |
+
+// met:
|
116 |
+
+//
|
117 |
+
+// * Redistributions of source code must retain the above copyright
|
118 |
+
+// notice, this list of conditions and the following disclaimer.
|
119 |
+
+// * Redistributions in binary form must reproduce the above
|
120 |
+
+// copyright notice, this list of conditions and the following disclaimer
|
121 |
+
+// in the documentation and/or other materials provided with the
|
122 |
+
+// distribution.
|
123 |
+
+// * Neither the name of Google Inc. nor the names of its
|
124 |
+
+// contributors may be used to endorse or promote products derived from
|
125 |
+
+// this software without specific prior written permission.
|
126 |
+
+//
|
127 |
+
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
128 |
+
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
129 |
+
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
130 |
+
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
131 |
+
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
132 |
+
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
133 |
+
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
134 |
+
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
135 |
+
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
136 |
+
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
137 |
+
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
138 |
+
+//
|
139 |
+
+// Author: Shinichiro Hamaji
|
140 |
+
+//
|
141 |
+
+// Detect supported platforms.
|
142 |
+
+
|
143 |
+
+#ifndef GLOG_PLATFORM_H
|
144 |
+
+#define GLOG_PLATFORM_H
|
145 |
+
+
|
146 |
+
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
147 |
+
+#define GLOG_OS_WINDOWS
|
148 |
+
+#elif defined(__CYGWIN__) || defined(__CYGWIN32__)
|
149 |
+
+#define GLOG_OS_CYGWIN
|
150 |
+
+#elif defined(linux) || defined(__linux) || defined(__linux__)
|
151 |
+
+#ifndef GLOG_OS_LINUX
|
152 |
+
+#define GLOG_OS_LINUX
|
153 |
+
+#endif
|
154 |
+
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
155 |
+
+#define GLOG_OS_MACOSX
|
156 |
+
+#elif defined(__FreeBSD__)
|
157 |
+
+#define GLOG_OS_FREEBSD
|
158 |
+
+#elif defined(__NetBSD__)
|
159 |
+
+#define GLOG_OS_NETBSD
|
160 |
+
+#elif defined(__OpenBSD__)
|
161 |
+
+#define GLOG_OS_OPENBSD
|
162 |
+
+#else
|
163 |
+
+// TODO(hamaji): Add other platforms.
|
164 |
+
+#error Platform not supported by glog. Please consider to contribute platform information by submitting a pull request on Github.
|
165 |
+
+#endif
|
166 |
+
+
|
167 |
+
+#endif // GLOG_PLATFORM_H
|
168 |
+
diff --git a/src/googletest.h b/src/googletest.h
|
169 |
+
index 7230606..a7ce3c2 100644
|
170 |
+
--- a/src/googletest.h
|
171 |
+
+++ b/src/googletest.h
|
172 |
+
@@ -72,7 +72,7 @@ _END_GOOGLE_NAMESPACE_
|
173 |
+
#define GOOGLE_GLOG_DLL_DECL
|
174 |
+
|
175 |
+
static inline string GetTempDir() {
|
176 |
+
-#ifndef OS_WINDOWS
|
177 |
+
+#ifndef GLOG_OS_WINDOWS
|
178 |
+
return "/tmp";
|
179 |
+
#else
|
180 |
+
char tmp[MAX_PATH];
|
181 |
+
@@ -81,7 +81,7 @@ static inline string GetTempDir() {
|
182 |
+
#endif
|
183 |
+
}
|
184 |
+
|
185 |
+
-#if defined(OS_WINDOWS) && defined(_MSC_VER) && !defined(TEST_SRC_DIR)
|
186 |
+
+#if defined(GLOG_OS_WINDOWS) && defined(_MSC_VER) && !defined(TEST_SRC_DIR)
|
187 |
+
// The test will run in glog/vsproject/<project name>
|
188 |
+
// (e.g., glog/vsproject/logging_unittest).
|
189 |
+
static const char TEST_SRC_DIR[] = "../..";
|
190 |
+
@@ -207,7 +207,7 @@ static inline void CalledAbort() {
|
191 |
+
longjmp(g_jmp_buf, 1);
|
192 |
+
}
|
193 |
+
|
194 |
+
-#ifdef OS_WINDOWS
|
195 |
+
+#ifdef GLOG_OS_WINDOWS
|
196 |
+
// TODO(hamaji): Death test somehow doesn't work in Windows.
|
197 |
+
#define ASSERT_DEATH(fn, msg)
|
198 |
+
#else
|
199 |
+
@@ -490,7 +490,7 @@ static inline bool MungeAndDiffTestStderr(const string& golden_filename) {
|
200 |
+
WriteToFile(golden, munged_golden);
|
201 |
+
string munged_captured = cap->filename() + ".munged";
|
202 |
+
WriteToFile(captured, munged_captured);
|
203 |
+
-#ifdef OS_WINDOWS
|
204 |
+
+#ifdef GLOG_OS_WINDOWS
|
205 |
+
string diffcmd("fc " + munged_golden + " " + munged_captured);
|
206 |
+
#else
|
207 |
+
string diffcmd("diff -u " + munged_golden + " " + munged_captured);
|
208 |
+
@@ -532,7 +532,7 @@ class Thread {
|
209 |
+
virtual ~Thread() {}
|
210 |
+
|
211 |
+
void SetJoinable(bool) {}
|
212 |
+
-#if defined(OS_WINDOWS) && !defined(OS_CYGWIN)
|
213 |
+
+#if defined(GLOG_OS_WINDOWS) && !defined(GLOG_OS_CYGWIN)
|
214 |
+
void Start() {
|
215 |
+
handle_ = CreateThread(NULL,
|
216 |
+
0,
|
217 |
+
@@ -565,7 +565,7 @@ class Thread {
|
218 |
+
return NULL;
|
219 |
+
}
|
220 |
+
|
221 |
+
-#if defined(OS_WINDOWS) && !defined(OS_CYGWIN)
|
222 |
+
+#if defined(GLOG_OS_WINDOWS) && !defined(GLOG_OS_CYGWIN)
|
223 |
+
HANDLE handle_;
|
224 |
+
DWORD th_;
|
225 |
+
#else
|
226 |
+
@@ -574,7 +574,7 @@ class Thread {
|
227 |
+
};
|
228 |
+
|
229 |
+
static inline void SleepForMilliseconds(int t) {
|
230 |
+
-#ifndef OS_WINDOWS
|
231 |
+
+#ifndef GLOG_OS_WINDOWS
|
232 |
+
# if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L
|
233 |
+
const struct timespec req = {0, t * 1000 * 1000};
|
234 |
+
nanosleep(&req, NULL);
|
235 |
+
diff --git a/src/logging.cc b/src/logging.cc
|
236 |
+
index 71de91d..f251d67 100644
|
237 |
+
--- a/src/logging.cc
|
238 |
+
+++ b/src/logging.cc
|
239 |
+
@@ -59,7 +59,7 @@
|
240 |
+
#include <vector>
|
241 |
+
#include <cerrno> // for errno
|
242 |
+
#include <sstream>
|
243 |
+
-#ifdef OS_WINDOWS
|
244 |
+
+#ifdef GLOG_OS_WINDOWS
|
245 |
+
#include "windows/dirent.h"
|
246 |
+
#else
|
247 |
+
#include <dirent.h> // for automatic removal of old logs
|
248 |
+
@@ -122,7 +122,7 @@ GLOG_DEFINE_bool(alsologtostderr, BoolFromEnv("GOOGLE_ALSOLOGTOSTDERR", false),
|
249 |
+
"log messages go to stderr in addition to logfiles");
|
250 |
+
GLOG_DEFINE_bool(colorlogtostderr, false,
|
251 |
+
"color messages logged to stderr (if supported by terminal)");
|
252 |
+
-#ifdef OS_LINUX
|
253 |
+
+#ifdef GLOG_OS_LINUX
|
254 |
+
GLOG_DEFINE_bool(drop_log_memory, true, "Drop in-memory buffers of log contents. "
|
255 |
+
"Logs can grow very quickly and they are rarely read before they "
|
256 |
+
"need to be evicted from memory. Instead, drop them from memory "
|
257 |
+
@@ -198,7 +198,7 @@ GLOG_DEFINE_bool(log_utc_time, false,
|
258 |
+
#define PATH_SEPARATOR '/'
|
259 |
+
|
260 |
+
#ifndef HAVE_PREAD
|
261 |
+
-#if defined(OS_WINDOWS)
|
262 |
+
+#if defined(GLOG_OS_WINDOWS)
|
263 |
+
#include <basetsd.h>
|
264 |
+
#define ssize_t SSIZE_T
|
265 |
+
#endif
|
266 |
+
@@ -241,7 +241,7 @@ static void GetHostName(string* hostname) {
|
267 |
+
*buf.nodename = '\0';
|
268 |
+
}
|
269 |
+
*hostname = buf.nodename;
|
270 |
+
-#elif defined(OS_WINDOWS)
|
271 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
272 |
+
char buf[MAX_COMPUTERNAME_LENGTH + 1];
|
273 |
+
DWORD len = MAX_COMPUTERNAME_LENGTH + 1;
|
274 |
+
if (GetComputerNameA(buf, &len)) {
|
275 |
+
@@ -258,7 +258,7 @@ static void GetHostName(string* hostname) {
|
276 |
+
// Returns true iff terminal supports using colors in output.
|
277 |
+
static bool TerminalSupportsColor() {
|
278 |
+
bool term_supports_color = false;
|
279 |
+
-#ifdef OS_WINDOWS
|
280 |
+
+#ifdef GLOG_OS_WINDOWS
|
281 |
+
// on Windows TERM variable is usually not set, but the console does
|
282 |
+
// support colors.
|
283 |
+
term_supports_color = true;
|
284 |
+
@@ -312,7 +312,7 @@ static GLogColor SeverityToColor(LogSeverity severity) {
|
285 |
+
return color;
|
286 |
+
}
|
287 |
+
|
288 |
+
-#ifdef OS_WINDOWS
|
289 |
+
+#ifdef GLOG_OS_WINDOWS
|
290 |
+
|
291 |
+
// Returns the character attribute for the given color.
|
292 |
+
static WORD GetColorAttribute(GLogColor color) {
|
293 |
+
@@ -337,7 +337,7 @@ static const char* GetAnsiColorCode(GLogColor color) {
|
294 |
+
return NULL; // stop warning about return type.
|
295 |
+
}
|
296 |
+
|
297 |
+
-#endif // OS_WINDOWS
|
298 |
+
+#endif // GLOG_OS_WINDOWS
|
299 |
+
|
300 |
+
// Safely get max_log_size, overriding to 1 if it somehow gets defined as 0
|
301 |
+
static int32 MaxLogSize() {
|
302 |
+
@@ -753,7 +753,7 @@ static void ColoredWriteToStderr(LogSeverity severity,
|
303 |
+
fwrite(message, len, 1, stderr);
|
304 |
+
return;
|
305 |
+
}
|
306 |
+
-#ifdef OS_WINDOWS
|
307 |
+
+#ifdef GLOG_OS_WINDOWS
|
308 |
+
const HANDLE stderr_handle = GetStdHandle(STD_ERROR_HANDLE);
|
309 |
+
|
310 |
+
// Gets the current text color.
|
311 |
+
@@ -775,7 +775,7 @@ static void ColoredWriteToStderr(LogSeverity severity,
|
312 |
+
fprintf(stderr, "\033[0;3%sm", GetAnsiColorCode(color));
|
313 |
+
fwrite(message, len, 1, stderr);
|
314 |
+
fprintf(stderr, "\033[m"); // Resets the terminal to default.
|
315 |
+
-#endif // OS_WINDOWS
|
316 |
+
+#endif // GLOG_OS_WINDOWS
|
317 |
+
}
|
318 |
+
|
319 |
+
static void WriteToStderr(const char* message, size_t len) {
|
320 |
+
@@ -788,7 +788,7 @@ inline void LogDestination::MaybeLogToStderr(LogSeverity severity,
|
321 |
+
const char* message, size_t message_len, size_t prefix_len) {
|
322 |
+
if ((severity >= FLAGS_stderrthreshold) || FLAGS_alsologtostderr) {
|
323 |
+
ColoredWriteToStderr(severity, message, message_len);
|
324 |
+
-#ifdef OS_WINDOWS
|
325 |
+
+#ifdef GLOG_OS_WINDOWS
|
326 |
+
// On Windows, also output to the debugger
|
327 |
+
::OutputDebugStringA(message);
|
328 |
+
#elif defined(__ANDROID__)
|
329 |
+
@@ -1056,7 +1056,7 @@ bool LogFileObject::CreateLogfile(const string& time_pid_string) {
|
330 |
+
}
|
331 |
+
return false;
|
332 |
+
}
|
333 |
+
-#ifdef OS_WINDOWS
|
334 |
+
+#ifdef GLOG_OS_WINDOWS
|
335 |
+
// https://github.com/golang/go/issues/27638 - make sure we seek to the end to append
|
336 |
+
// empirically replicated with wine over mingw build
|
337 |
+
if (!FLAGS_timestamp_in_logfile_name) {
|
338 |
+
@@ -1080,7 +1080,7 @@ bool LogFileObject::CreateLogfile(const string& time_pid_string) {
|
339 |
+
linkpath += linkname;
|
340 |
+
unlink(linkpath.c_str()); // delete old one if it exists
|
341 |
+
|
342 |
+
-#if defined(OS_WINDOWS)
|
343 |
+
+#if defined(GLOG_OS_WINDOWS)
|
344 |
+
// TODO(hamaji): Create lnk file on Windows?
|
345 |
+
#elif defined(HAVE_UNISTD_H)
|
346 |
+
// We must have unistd.h.
|
347 |
+
@@ -1270,7 +1270,7 @@ void LogFileObject::Write(bool force_flush,
|
348 |
+
(bytes_since_flush_ >= 1000000) ||
|
349 |
+
(CycleClock_Now() >= next_flush_time_) ) {
|
350 |
+
FlushUnlocked();
|
351 |
+
-#ifdef OS_LINUX
|
352 |
+
+#ifdef GLOG_OS_LINUX
|
353 |
+
// Only consider files >= 3MiB
|
354 |
+
if (FLAGS_drop_log_memory && file_length_ >= (3 << 20)) {
|
355 |
+
// Don't evict the most recent 1-2MiB so as not to impact a tailer
|
356 |
+
@@ -1305,7 +1305,7 @@ void LogFileObject::Write(bool force_flush,
|
357 |
+
|
358 |
+
|
359 |
+
LogCleaner::LogCleaner() : enabled_(false), overdue_days_(7), dir_delim_('/') {
|
360 |
+
-#ifdef OS_WINDOWS
|
361 |
+
+#ifdef GLOG_OS_WINDOWS
|
362 |
+
dir_delim_ = '\\';
|
363 |
+
#endif
|
364 |
+
}
|
365 |
+
@@ -1898,7 +1898,7 @@ void LogMessage::RecordCrashReason(
|
366 |
+
# define ATTRIBUTE_NORETURN
|
367 |
+
#endif
|
368 |
+
|
369 |
+
-#if defined(OS_WINDOWS)
|
370 |
+
+#if defined(GLOG_OS_WINDOWS)
|
371 |
+
__declspec(noreturn)
|
372 |
+
#endif
|
373 |
+
static void logging_fail() ATTRIBUTE_NORETURN;
|
374 |
+
@@ -2223,7 +2223,7 @@ bool SendEmail(const char*dest, const char *subject, const char*body){
|
375 |
+
|
376 |
+
static void GetTempDirectories(vector<string>* list) {
|
377 |
+
list->clear();
|
378 |
+
-#ifdef OS_WINDOWS
|
379 |
+
+#ifdef GLOG_OS_WINDOWS
|
380 |
+
// On windows we'll try to find a directory in this order:
|
381 |
+
// C:/Documents & Settings/whomever/TEMP (or whatever GetTempPath() is)
|
382 |
+
// C:/TMP/
|
383 |
+
@@ -2282,7 +2282,7 @@ const vector<string>& GetLoggingDirectories() {
|
384 |
+
logging_directories_list->push_back(FLAGS_log_dir.c_str());
|
385 |
+
} else {
|
386 |
+
GetTempDirectories(logging_directories_list);
|
387 |
+
-#ifdef OS_WINDOWS
|
388 |
+
+#ifdef GLOG_OS_WINDOWS
|
389 |
+
char tmp[MAX_PATH];
|
390 |
+
if (GetWindowsDirectoryA(tmp, MAX_PATH))
|
391 |
+
logging_directories_list->push_back(tmp);
|
392 |
+
@@ -2325,7 +2325,7 @@ void TruncateLogFile(const char *path, int64 limit, int64 keep) {
|
393 |
+
// Don't follow symlinks unless they're our own fd symlinks in /proc
|
394 |
+
int flags = O_RDWR;
|
395 |
+
// TODO(hamaji): Support other environments.
|
396 |
+
-#ifdef OS_LINUX
|
397 |
+
+#ifdef GLOG_OS_LINUX
|
398 |
+
const char *procfd_prefix = "/proc/self/fd/";
|
399 |
+
if (strncmp(procfd_prefix, path, strlen(procfd_prefix))) flags |= O_NOFOLLOW;
|
400 |
+
#endif
|
401 |
+
@@ -2464,7 +2464,7 @@ int posix_strerror_r(int err, char *buf, size_t len) {
|
402 |
+
return 0;
|
403 |
+
} else {
|
404 |
+
buf[0] = '\000';
|
405 |
+
-#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD)
|
406 |
+
+#if defined(GLOG_OS_MACOSX) || defined(GLOG_OS_FREEBSD) || defined(GLOG_OS_OPENBSD)
|
407 |
+
if (reinterpret_cast<intptr_t>(rc) < sys_nerr) {
|
408 |
+
// This means an error on MacOSX or FreeBSD.
|
409 |
+
return -1;
|
410 |
+
diff --git a/src/logging_custom_prefix_unittest.cc b/src/logging_custom_prefix_unittest.cc
|
411 |
+
index c9fb5b8..8740fad 100644
|
412 |
+
--- a/src/logging_custom_prefix_unittest.cc
|
413 |
+
+++ b/src/logging_custom_prefix_unittest.cc
|
414 |
+
@@ -588,7 +588,7 @@ void TestCHECK() {
|
415 |
+
|
416 |
+
// Tests using CHECK*() on anonymous enums.
|
417 |
+
// Apple's GCC doesn't like this.
|
418 |
+
-#if !defined(OS_MACOSX)
|
419 |
+
+#if !defined(GLOG_OS_MACOSX)
|
420 |
+
CHECK_EQ(CASE_A, CASE_A);
|
421 |
+
CHECK_NE(CASE_A, CASE_B);
|
422 |
+
CHECK_GE(CASE_A, CASE_A);
|
423 |
+
@@ -670,7 +670,7 @@ static void GetFiles(const string& pattern, vector<string>* files) {
|
424 |
+
files->push_back(string(g.gl_pathv[i]));
|
425 |
+
}
|
426 |
+
globfree(&g);
|
427 |
+
-#elif defined(OS_WINDOWS)
|
428 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
429 |
+
WIN32_FIND_DATAA data;
|
430 |
+
HANDLE handle = FindFirstFileA(pattern.c_str(), &data);
|
431 |
+
size_t index = pattern.rfind('\\');
|
432 |
+
@@ -799,7 +799,7 @@ static void TestTwoProcessesWrite() {
|
433 |
+
}
|
434 |
+
|
435 |
+
static void TestSymlink() {
|
436 |
+
-#ifndef OS_WINDOWS
|
437 |
+
+#ifndef GLOG_OS_WINDOWS
|
438 |
+
fprintf(stderr, "==== Test setting log file symlink\n");
|
439 |
+
string dest = FLAGS_test_tmpdir + "/logging_test_symlink";
|
440 |
+
string sym = FLAGS_test_tmpdir + "/symlinkbase";
|
441 |
+
@@ -942,7 +942,7 @@ static void TestTruncate() {
|
442 |
+
// MacOSX 10.4 doesn't fail in this case.
|
443 |
+
// Windows doesn't have symlink.
|
444 |
+
// Let's just ignore this test for these cases.
|
445 |
+
-#if !defined(OS_MACOSX) && !defined(OS_WINDOWS)
|
446 |
+
+#if !defined(GLOG_OS_MACOSX) && !defined(GLOG_OS_WINDOWS)
|
447 |
+
// Through a symlink should fail to truncate
|
448 |
+
string linkname = path + ".link";
|
449 |
+
unlink(linkname.c_str());
|
450 |
+
@@ -951,7 +951,7 @@ static void TestTruncate() {
|
451 |
+
#endif
|
452 |
+
|
453 |
+
// The /proc/self path makes sense only for linux.
|
454 |
+
-#if defined(OS_LINUX)
|
455 |
+
+#if defined(GLOG_OS_LINUX)
|
456 |
+
// Through an open fd symlink should work
|
457 |
+
int fd;
|
458 |
+
CHECK_ERR(fd = open(path.c_str(), O_APPEND | O_WRONLY));
|
459 |
+
@@ -1205,7 +1205,7 @@ TEST(Strerror, logging) {
|
460 |
+
CHECK_EQ(posix_strerror_r(errcode, buf, 0), -1);
|
461 |
+
CHECK_EQ(buf[0], 'A');
|
462 |
+
CHECK_EQ(posix_strerror_r(errcode, NULL, buf_size), -1);
|
463 |
+
-#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD)
|
464 |
+
+#if defined(GLOG_OS_MACOSX) || defined(GLOG_OS_FREEBSD) || defined(GLOG_OS_OPENBSD)
|
465 |
+
// MacOSX or FreeBSD considers this case is an error since there is
|
466 |
+
// no enough space.
|
467 |
+
CHECK_EQ(posix_strerror_r(errcode, buf, 1), -1);
|
468 |
+
diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc
|
469 |
+
index edc7d35..ce3c483 100644
|
470 |
+
--- a/src/logging_unittest.cc
|
471 |
+
+++ b/src/logging_unittest.cc
|
472 |
+
@@ -561,7 +561,7 @@ void TestCHECK() {
|
473 |
+
|
474 |
+
// Tests using CHECK*() on anonymous enums.
|
475 |
+
// Apple's GCC doesn't like this.
|
476 |
+
-#if !defined(OS_MACOSX)
|
477 |
+
+#if !defined(GLOG_OS_MACOSX)
|
478 |
+
CHECK_EQ(CASE_A, CASE_A);
|
479 |
+
CHECK_NE(CASE_A, CASE_B);
|
480 |
+
CHECK_GE(CASE_A, CASE_A);
|
481 |
+
@@ -643,7 +643,7 @@ static void GetFiles(const string& pattern, vector<string>* files) {
|
482 |
+
files->push_back(string(g.gl_pathv[i]));
|
483 |
+
}
|
484 |
+
globfree(&g);
|
485 |
+
-#elif defined(OS_WINDOWS)
|
486 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
487 |
+
WIN32_FIND_DATAA data;
|
488 |
+
HANDLE handle = FindFirstFileA(pattern.c_str(), &data);
|
489 |
+
size_t index = pattern.rfind('\\');
|
490 |
+
@@ -772,7 +772,7 @@ static void TestTwoProcessesWrite() {
|
491 |
+
}
|
492 |
+
|
493 |
+
static void TestSymlink() {
|
494 |
+
-#ifndef OS_WINDOWS
|
495 |
+
+#ifndef GLOG_OS_WINDOWS
|
496 |
+
fprintf(stderr, "==== Test setting log file symlink\n");
|
497 |
+
string dest = FLAGS_test_tmpdir + "/logging_test_symlink";
|
498 |
+
string sym = FLAGS_test_tmpdir + "/symlinkbase";
|
499 |
+
@@ -915,7 +915,7 @@ static void TestTruncate() {
|
500 |
+
// MacOSX 10.4 doesn't fail in this case.
|
501 |
+
// Windows doesn't have symlink.
|
502 |
+
// Let's just ignore this test for these cases.
|
503 |
+
-#if !defined(OS_MACOSX) && !defined(OS_WINDOWS)
|
504 |
+
+#if !defined(GLOG_OS_MACOSX) && !defined(GLOG_OS_WINDOWS)
|
505 |
+
// Through a symlink should fail to truncate
|
506 |
+
string linkname = path + ".link";
|
507 |
+
unlink(linkname.c_str());
|
508 |
+
@@ -924,7 +924,7 @@ static void TestTruncate() {
|
509 |
+
#endif
|
510 |
+
|
511 |
+
// The /proc/self path makes sense only for linux.
|
512 |
+
-#if defined(OS_LINUX)
|
513 |
+
+#if defined(GLOG_OS_LINUX)
|
514 |
+
// Through an open fd symlink should work
|
515 |
+
int fd;
|
516 |
+
CHECK_ERR(fd = open(path.c_str(), O_APPEND | O_WRONLY));
|
517 |
+
@@ -1178,7 +1178,7 @@ TEST(Strerror, logging) {
|
518 |
+
CHECK_EQ(posix_strerror_r(errcode, buf, 0), -1);
|
519 |
+
CHECK_EQ(buf[0], 'A');
|
520 |
+
CHECK_EQ(posix_strerror_r(errcode, NULL, buf_size), -1);
|
521 |
+
-#if defined(OS_MACOSX) || defined(OS_FREEBSD) || defined(OS_OPENBSD)
|
522 |
+
+#if defined(GLOG_OS_MACOSX) || defined(GLOG_OS_FREEBSD) || defined(GLOG_OS_OPENBSD)
|
523 |
+
// MacOSX or FreeBSD considers this case is an error since there is
|
524 |
+
// no enough space.
|
525 |
+
CHECK_EQ(posix_strerror_r(errcode, buf, 1), -1);
|
526 |
+
diff --git a/src/signalhandler.cc b/src/signalhandler.cc
|
527 |
+
index b6d6e25..ababf86 100644
|
528 |
+
--- a/src/signalhandler.cc
|
529 |
+
+++ b/src/signalhandler.cc
|
530 |
+
@@ -63,7 +63,7 @@ const struct {
|
531 |
+
{ SIGILL, "SIGILL" },
|
532 |
+
{ SIGFPE, "SIGFPE" },
|
533 |
+
{ SIGABRT, "SIGABRT" },
|
534 |
+
-#if !defined(OS_WINDOWS)
|
535 |
+
+#if !defined(GLOG_OS_WINDOWS)
|
536 |
+
{ SIGBUS, "SIGBUS" },
|
537 |
+
#endif
|
538 |
+
{ SIGTERM, "SIGTERM" },
|
539 |
+
@@ -208,7 +208,7 @@ void DumpSignalInfo(int signal_number, siginfo_t *siginfo) {
|
540 |
+
formatter.AppendUint64((uintptr_t)pthread_self(), 16);
|
541 |
+
formatter.AppendString(") ");
|
542 |
+
// Only linux has the PID of the signal sender in si_pid.
|
543 |
+
-#ifdef OS_LINUX
|
544 |
+
+#ifdef GLOG_OS_LINUX
|
545 |
+
formatter.AppendString("from PID ");
|
546 |
+
formatter.AppendUint64(siginfo->si_pid, 10);
|
547 |
+
formatter.AppendString("; ");
|
548 |
+
@@ -253,7 +253,7 @@ void InvokeDefaultSignalHandler(int signal_number) {
|
549 |
+
sig_action.sa_handler = SIG_DFL;
|
550 |
+
sigaction(signal_number, &sig_action, NULL);
|
551 |
+
kill(getpid(), signal_number);
|
552 |
+
-#elif defined(OS_WINDOWS)
|
553 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
554 |
+
signal(signal_number, SIG_DFL);
|
555 |
+
raise(signal_number);
|
556 |
+
#endif
|
557 |
+
@@ -267,7 +267,7 @@ static pthread_t* g_entered_thread_id_pointer = NULL;
|
558 |
+
|
559 |
+
// Dumps signal and stack frame information, and invokes the default
|
560 |
+
// signal handler once our job is done.
|
561 |
+
-#if defined(OS_WINDOWS)
|
562 |
+
+#if defined(GLOG_OS_WINDOWS)
|
563 |
+
void FailureSignalHandler(int signal_number)
|
564 |
+
#else
|
565 |
+
void FailureSignalHandler(int signal_number,
|
566 |
+
@@ -314,7 +314,7 @@ void FailureSignalHandler(int signal_number,
|
567 |
+
// First dump time info.
|
568 |
+
DumpTimeInfo();
|
569 |
+
|
570 |
+
-#if !defined(OS_WINDOWS)
|
571 |
+
+#if !defined(GLOG_OS_WINDOWS)
|
572 |
+
// Get the program counter from ucontext.
|
573 |
+
void *pc = GetPC(ucontext);
|
574 |
+
DumpStackFrameInfo("PC: ", pc);
|
575 |
+
@@ -364,7 +364,7 @@ bool IsFailureSignalHandlerInstalled() {
|
576 |
+
sigaction(SIGABRT, NULL, &sig_action);
|
577 |
+
if (sig_action.sa_sigaction == &FailureSignalHandler)
|
578 |
+
return true;
|
579 |
+
-#elif defined(OS_WINDOWS)
|
580 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
581 |
+
return kFailureSignalHandlerInstalled;
|
582 |
+
#endif // HAVE_SIGACTION
|
583 |
+
return false;
|
584 |
+
@@ -385,7 +385,7 @@ void InstallFailureSignalHandler() {
|
585 |
+
CHECK_ERR(sigaction(kFailureSignals[i].number, &sig_action, NULL));
|
586 |
+
}
|
587 |
+
kFailureSignalHandlerInstalled = true;
|
588 |
+
-#elif defined(OS_WINDOWS)
|
589 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
590 |
+
for (size_t i = 0; i < ARRAYSIZE(kFailureSignals); ++i) {
|
591 |
+
CHECK_NE(signal(kFailureSignals[i].number, &FailureSignalHandler),
|
592 |
+
SIG_ERR);
|
593 |
+
@@ -395,7 +395,7 @@ void InstallFailureSignalHandler() {
|
594 |
+
}
|
595 |
+
|
596 |
+
void InstallFailureWriter(void (*writer)(const char* data, int size)) {
|
597 |
+
-#if defined(HAVE_SIGACTION) || defined(OS_WINDOWS)
|
598 |
+
+#if defined(HAVE_SIGACTION) || defined(GLOG_OS_WINDOWS)
|
599 |
+
g_failure_writer = writer;
|
600 |
+
#endif // HAVE_SIGACTION
|
601 |
+
}
|
602 |
+
diff --git a/src/stacktrace_x86-inl.h b/src/stacktrace_x86-inl.h
|
603 |
+
index af2783d..99c5de7 100644
|
604 |
+
--- a/src/stacktrace_x86-inl.h
|
605 |
+
+++ b/src/stacktrace_x86-inl.h
|
606 |
+
@@ -31,9 +31,9 @@
|
607 |
+
|
608 |
+
#include <stdint.h> // for uintptr_t
|
609 |
+
|
610 |
+
-#include "utilities.h" // for OS_* macros
|
611 |
+
+#include "utilities.h" // for GLOG_OS_* macros
|
612 |
+
|
613 |
+
-#if !defined(OS_WINDOWS)
|
614 |
+
+#if !defined(GLOG_OS_WINDOWS)
|
615 |
+
#include <unistd.h>
|
616 |
+
#include <sys/mman.h>
|
617 |
+
#endif
|
618 |
+
@@ -74,7 +74,7 @@ static void **NextStackFrame(void **old_sp) {
|
619 |
+
// last two pages in the address space
|
620 |
+
if ((uintptr_t)new_sp >= 0xffffe000) return NULL;
|
621 |
+
#endif
|
622 |
+
-#if !defined(OS_WINDOWS)
|
623 |
+
+#if !defined(GLOG_OS_WINDOWS)
|
624 |
+
if (!STRICT_UNWINDING) {
|
625 |
+
// Lax sanity checks cause a crash in 32-bit tcmalloc/crash_reason_test
|
626 |
+
// on AMD-based machines with VDSO-enabled kernels.
|
627 |
+
diff --git a/src/symbolize.cc b/src/symbolize.cc
|
628 |
+
index f7fbc53..8688ca2 100644
|
629 |
+
--- a/src/symbolize.cc
|
630 |
+
+++ b/src/symbolize.cc
|
631 |
+
@@ -46,7 +46,7 @@
|
632 |
+
// and memmove(). We assume they are async-signal-safe.
|
633 |
+
//
|
634 |
+
// Additional header can be specified by the GLOG_BUILD_CONFIG_INCLUDE
|
635 |
+
-// macro to add platform specific defines (e.g. OS_OPENBSD).
|
636 |
+
+// macro to add platform specific defines (e.g. GLOG_OS_OPENBSD).
|
637 |
+
|
638 |
+
#ifdef GLOG_BUILD_CONFIG_INCLUDE
|
639 |
+
#include GLOG_BUILD_CONFIG_INCLUDE
|
640 |
+
@@ -113,7 +113,7 @@ _END_GOOGLE_NAMESPACE_
|
641 |
+
#if defined(HAVE_DLFCN_H)
|
642 |
+
#include <dlfcn.h>
|
643 |
+
#endif
|
644 |
+
-#if defined(OS_OPENBSD)
|
645 |
+
+#if defined(GLOG_OS_OPENBSD)
|
646 |
+
#include <sys/exec_elf.h>
|
647 |
+
#else
|
648 |
+
#include <elf.h>
|
649 |
+
@@ -846,7 +846,7 @@ static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out,
|
650 |
+
|
651 |
+
_END_GOOGLE_NAMESPACE_
|
652 |
+
|
653 |
+
-#elif defined(OS_MACOSX) && defined(HAVE_DLADDR)
|
654 |
+
+#elif defined(GLOG_OS_MACOSX) && defined(HAVE_DLADDR)
|
655 |
+
|
656 |
+
#include <dlfcn.h>
|
657 |
+
#include <cstring>
|
658 |
+
@@ -871,7 +871,7 @@ static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out,
|
659 |
+
|
660 |
+
_END_GOOGLE_NAMESPACE_
|
661 |
+
|
662 |
+
-#elif defined(OS_WINDOWS) || defined(OS_CYGWIN)
|
663 |
+
+#elif defined(GLOG_OS_WINDOWS) || defined(GLOG_OS_CYGWIN)
|
664 |
+
|
665 |
+
#include <windows.h>
|
666 |
+
#include <dbghelp.h>
|
667 |
+
diff --git a/src/symbolize_unittest.cc b/src/symbolize_unittest.cc
|
668 |
+
index 0b53230..7e8f6d4 100644
|
669 |
+
--- a/src/symbolize_unittest.cc
|
670 |
+
+++ b/src/symbolize_unittest.cc
|
671 |
+
@@ -359,7 +359,7 @@ static void ATTRIBUTE_NOINLINE TestWithReturnAddress() {
|
672 |
+
#endif
|
673 |
+
}
|
674 |
+
|
675 |
+
-# elif defined(OS_WINDOWS) || defined(OS_CYGWIN)
|
676 |
+
+# elif defined(GLOG_OS_WINDOWS) || defined(GLOG_OS_CYGWIN)
|
677 |
+
|
678 |
+
#ifdef _MSC_VER
|
679 |
+
#include <intrin.h>
|
680 |
+
@@ -411,10 +411,10 @@ int main(int argc, char **argv) {
|
681 |
+
TestWithPCInsideNonInlineFunction();
|
682 |
+
TestWithReturnAddress();
|
683 |
+
return RUN_ALL_TESTS();
|
684 |
+
-# elif defined(OS_WINDOWS) || defined(OS_CYGWIN)
|
685 |
+
+# elif defined(GLOG_OS_WINDOWS) || defined(GLOG_OS_CYGWIN)
|
686 |
+
TestWithReturnAddress();
|
687 |
+
return RUN_ALL_TESTS();
|
688 |
+
-# else // OS_WINDOWS
|
689 |
+
+# else // GLOG_OS_WINDOWS
|
690 |
+
printf("PASS (no symbolize_unittest support)\n");
|
691 |
+
return 0;
|
692 |
+
# endif // __ELF__
|
693 |
+
diff --git a/src/utilities.cc b/src/utilities.cc
|
694 |
+
index 6b9a69e..ecda730 100644
|
695 |
+
--- a/src/utilities.cc
|
696 |
+
+++ b/src/utilities.cc
|
697 |
+
@@ -151,7 +151,7 @@ static void DumpStackTraceAndExit() {
|
698 |
+
sigemptyset(&sig_action.sa_mask);
|
699 |
+
sig_action.sa_handler = SIG_DFL;
|
700 |
+
sigaction(SIGABRT, &sig_action, NULL);
|
701 |
+
-#elif defined(OS_WINDOWS)
|
702 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
703 |
+
signal(SIGABRT, SIG_DFL);
|
704 |
+
#endif // HAVE_SIGACTION
|
705 |
+
}
|
706 |
+
@@ -180,7 +180,7 @@ bool IsGoogleLoggingInitialized() {
|
707 |
+
return g_program_invocation_short_name != NULL;
|
708 |
+
}
|
709 |
+
|
710 |
+
-#ifdef OS_WINDOWS
|
711 |
+
+#ifdef GLOG_OS_WINDOWS
|
712 |
+
struct timeval {
|
713 |
+
long tv_sec, tv_usec;
|
714 |
+
};
|
715 |
+
@@ -236,9 +236,9 @@ bool PidHasChanged() {
|
716 |
+
|
717 |
+
pid_t GetTID() {
|
718 |
+
// On Linux and MacOSX, we try to use gettid().
|
719 |
+
-#if defined OS_LINUX || defined OS_MACOSX
|
720 |
+
+#if defined GLOG_OS_LINUX || defined GLOG_OS_MACOSX
|
721 |
+
#ifndef __NR_gettid
|
722 |
+
-#ifdef OS_MACOSX
|
723 |
+
+#ifdef GLOG_OS_MACOSX
|
724 |
+
#define __NR_gettid SYS_gettid
|
725 |
+
#elif ! defined __i386__
|
726 |
+
#error "Must define __NR_gettid for non-x86 platforms"
|
727 |
+
@@ -258,12 +258,12 @@ pid_t GetTID() {
|
728 |
+
// the value change to "true".
|
729 |
+
lacks_gettid = true;
|
730 |
+
}
|
731 |
+
-#endif // OS_LINUX || OS_MACOSX
|
732 |
+
+#endif // GLOG_OS_LINUX || GLOG_OS_MACOSX
|
733 |
+
|
734 |
+
// If gettid() could not be used, we use one of the following.
|
735 |
+
-#if defined OS_LINUX
|
736 |
+
+#if defined GLOG_OS_LINUX
|
737 |
+
return getpid(); // Linux: getpid returns thread ID when gettid is absent
|
738 |
+
-#elif defined OS_WINDOWS && !defined OS_CYGWIN
|
739 |
+
+#elif defined GLOG_OS_WINDOWS && !defined GLOG_OS_CYGWIN
|
740 |
+
return GetCurrentThreadId();
|
741 |
+
#elif defined(HAVE_PTHREAD)
|
742 |
+
// If none of the techniques above worked, we use pthread_self().
|
743 |
+
@@ -275,7 +275,7 @@ pid_t GetTID() {
|
744 |
+
|
745 |
+
const char* const_basename(const char* filepath) {
|
746 |
+
const char* base = strrchr(filepath, '/');
|
747 |
+
-#ifdef OS_WINDOWS // Look for either path separator in Windows
|
748 |
+
+#ifdef GLOG_OS_WINDOWS // Look for either path separator in Windows
|
749 |
+
if (!base)
|
750 |
+
base = strrchr(filepath, '\\');
|
751 |
+
#endif
|
752 |
+
@@ -288,7 +288,7 @@ const string& MyUserName() {
|
753 |
+
}
|
754 |
+
static void MyUserNameInitializer() {
|
755 |
+
// TODO(hamaji): Probably this is not portable.
|
756 |
+
-#if defined(OS_WINDOWS)
|
757 |
+
+#if defined(GLOG_OS_WINDOWS)
|
758 |
+
const char* user = getenv("USERNAME");
|
759 |
+
#else
|
760 |
+
const char* user = getenv("USER");
|
761 |
+
@@ -337,7 +337,7 @@ void InitGoogleLoggingUtilities(const char* argv0) {
|
762 |
+
CHECK(!IsGoogleLoggingInitialized())
|
763 |
+
<< "You called InitGoogleLogging() twice!";
|
764 |
+
const char* slash = strrchr(argv0, '/');
|
765 |
+
-#ifdef OS_WINDOWS
|
766 |
+
+#ifdef GLOG_OS_WINDOWS
|
767 |
+
if (!slash) slash = strrchr(argv0, '\\');
|
768 |
+
#endif
|
769 |
+
g_program_invocation_short_name = slash ? slash + 1 : argv0;
|
770 |
+
diff --git a/src/utilities.h b/src/utilities.h
|
771 |
+
index e4115ad..86bc296 100644
|
772 |
+
--- a/src/utilities.h
|
773 |
+
+++ b/src/utilities.h
|
774 |
+
@@ -34,25 +34,6 @@
|
775 |
+
#ifndef UTILITIES_H__
|
776 |
+
#define UTILITIES_H__
|
777 |
+
|
778 |
+
-#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
|
779 |
+
-# define OS_WINDOWS
|
780 |
+
-#elif defined(__CYGWIN__) || defined(__CYGWIN32__)
|
781 |
+
-# define OS_CYGWIN
|
782 |
+
-#elif defined(linux) || defined(__linux) || defined(__linux__)
|
783 |
+
-# ifndef OS_LINUX
|
784 |
+
-# define OS_LINUX
|
785 |
+
-# endif
|
786 |
+
-#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
787 |
+
-# define OS_MACOSX
|
788 |
+
-#elif defined(__FreeBSD__)
|
789 |
+
-# define OS_FREEBSD
|
790 |
+
-#elif defined(__NetBSD__)
|
791 |
+
-# define OS_NETBSD
|
792 |
+
-#elif defined(__OpenBSD__)
|
793 |
+
-# define OS_OPENBSD
|
794 |
+
-#else
|
795 |
+
-// TODO(hamaji): Add other platforms.
|
796 |
+
-#endif
|
797 |
+
|
798 |
+
// printf macros for size_t, in the style of inttypes.h
|
799 |
+
#ifdef _LP64
|
800 |
+
@@ -76,12 +57,12 @@
|
801 |
+
|
802 |
+
#include <string>
|
803 |
+
|
804 |
+
-#if defined(OS_WINDOWS)
|
805 |
+
+#include "glog/logging.h"
|
806 |
+
+#if defined(GLOG_OS_WINDOWS)
|
807 |
+
# include "port.h"
|
808 |
+
#endif
|
809 |
+
|
810 |
+
#include "config.h"
|
811 |
+
-#include "glog/logging.h"
|
812 |
+
|
813 |
+
// There are three different ways we can try to get the stack trace:
|
814 |
+
//
|
815 |
+
@@ -114,7 +95,7 @@
|
816 |
+
# define STACKTRACE_H "stacktrace_x86_64-inl.h"
|
817 |
+
# elif (defined(__ppc__) || defined(__PPC__)) && __GNUC__ >= 2
|
818 |
+
# define STACKTRACE_H "stacktrace_powerpc-inl.h"
|
819 |
+
-# elif defined(OS_WINDOWS)
|
820 |
+
+# elif defined(GLOG_OS_WINDOWS)
|
821 |
+
# define STACKTRACE_H "stacktrace_windows-inl.h"
|
822 |
+
# endif
|
823 |
+
#endif
|
824 |
+
@@ -130,12 +111,12 @@
|
825 |
+
#ifndef GLOG_NO_SYMBOLIZE_DETECTION
|
826 |
+
#ifndef HAVE_SYMBOLIZE
|
827 |
+
// defined by gcc
|
828 |
+
-#if defined(__ELF__) && defined(OS_LINUX)
|
829 |
+
+#if defined(__ELF__) && defined(GLOG_OS_LINUX)
|
830 |
+
# define HAVE_SYMBOLIZE
|
831 |
+
-#elif defined(OS_MACOSX) && defined(HAVE_DLADDR)
|
832 |
+
+#elif defined(GLOG_OS_MACOSX) && defined(HAVE_DLADDR)
|
833 |
+
// Use dladdr to symbolize.
|
834 |
+
# define HAVE_SYMBOLIZE
|
835 |
+
-#elif defined(OS_WINDOWS)
|
836 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
837 |
+
// Use DbgHelp to symbolize
|
838 |
+
# define HAVE_SYMBOLIZE
|
839 |
+
#endif
|
840 |
+
@@ -154,7 +135,7 @@ namespace glog_internal_namespace_ {
|
841 |
+
#ifdef HAVE___ATTRIBUTE__
|
842 |
+
# define ATTRIBUTE_NOINLINE __attribute__ ((noinline))
|
843 |
+
# define HAVE_ATTRIBUTE_NOINLINE
|
844 |
+
-#elif defined(OS_WINDOWS)
|
845 |
+
+#elif defined(GLOG_OS_WINDOWS)
|
846 |
+
# define ATTRIBUTE_NOINLINE __declspec(noinline)
|
847 |
+
# define HAVE_ATTRIBUTE_NOINLINE
|
848 |
+
#else
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/glog_disable_debug_postfix.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index 62ebbcc..28e2688 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -65,7 +65,7 @@ include (GenerateExportHeader)
|
6 |
+
include (GetCacheVariables)
|
7 |
+
include (GNUInstallDirs)
|
8 |
+
|
9 |
+
-set (CMAKE_DEBUG_POSTFIX d)
|
10 |
+
+#set (CMAKE_DEBUG_POSTFIX d)
|
11 |
+
set (CMAKE_THREAD_PREFER_PTHREAD 1)
|
12 |
+
|
13 |
+
find_package (GTest)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/nogdi-nominmax.patch
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in
|
2 |
+
index 3ecacfb..42cc9b1 100644
|
3 |
+
--- a/src/glog/logging.h.in
|
4 |
+
+++ b/src/glog/logging.h.in
|
5 |
+
@@ -103,6 +103,18 @@
|
6 |
+
#ifdef HAVE_CXX11_ATOMIC
|
7 |
+
#include <atomic>
|
8 |
+
#elif defined(GLOG_OS_WINDOWS)
|
9 |
+
+# ifndef WIN32_LEAN_AND_MEAN
|
10 |
+
+# define WIN32_LEAN_AND_MEAN // We only need minimal includes
|
11 |
+
+# endif
|
12 |
+
+// To avoid macro definition of ERROR.
|
13 |
+
+# ifndef NOGDI
|
14 |
+
+# define NOGDI
|
15 |
+
+# endif
|
16 |
+
+// To avoid macro definition of min/max.
|
17 |
+
+# ifndef NOMINMAX
|
18 |
+
+# define NOMINMAX
|
19 |
+
+# endif
|
20 |
+
+
|
21 |
+
#include <Windows.h>
|
22 |
+
#endif
|
23 |
+
|
24 |
+
@@ -1061,7 +1073,7 @@ namespace google {
|
25 |
+
#elif defined(GLOG_OS_WINDOWS)
|
26 |
+
|
27 |
+
#define SOME_KIND_OF_LOG_EVERY_N(severity, n, what_to_do) \
|
28 |
+
- static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \
|
29 |
+
+ static volatile unsigned LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \
|
30 |
+
InterlockedIncrement(&LOG_OCCURRENCES); \
|
31 |
+
if (InterlockedIncrement(&LOG_OCCURRENCES_MOD_N) > n) \
|
32 |
+
InterlockedExchangeSubtract(&LOG_OCCURRENCES_MOD_N, n); \
|
33 |
+
@@ -1071,7 +1083,7 @@ namespace google {
|
34 |
+
&what_to_do).stream()
|
35 |
+
|
36 |
+
#define SOME_KIND_OF_LOG_IF_EVERY_N(severity, condition, n, what_to_do) \
|
37 |
+
- static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \
|
38 |
+
+ static volatile unsigned LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \
|
39 |
+
InterlockedIncrement(&LOG_OCCURRENCES); \
|
40 |
+
if (condition && \
|
41 |
+
(InterlockedIncrement(&LOG_OCCURRENCES_MOD_N) || true) && \
|
42 |
+
@@ -1082,7 +1094,7 @@ namespace google {
|
43 |
+
&what_to_do).stream()
|
44 |
+
|
45 |
+
#define SOME_KIND_OF_PLOG_EVERY_N(severity, n, what_to_do) \
|
46 |
+
- static int LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \
|
47 |
+
+ static volatile unsigned LOG_OCCURRENCES = 0, LOG_OCCURRENCES_MOD_N = 0; \
|
48 |
+
InterlockedIncrement(&LOG_OCCURRENCES); \
|
49 |
+
if (InterlockedIncrement(&LOG_OCCURRENCES_MOD_N) > n) \
|
50 |
+
InterlockedExchangeSubtract(&LOG_OCCURRENCES_MOD_N, n); \
|
51 |
+
@@ -1092,7 +1104,7 @@ namespace google {
|
52 |
+
&what_to_do).stream()
|
53 |
+
|
54 |
+
#define SOME_KIND_OF_LOG_FIRST_N(severity, n, what_to_do) \
|
55 |
+
- static int LOG_OCCURRENCES = 0; \
|
56 |
+
+ static volatile unsigned LOG_OCCURRENCES = 0; \
|
57 |
+
if (LOG_OCCURRENCES <= n) \
|
58 |
+
InterlockedIncrement(&LOG_OCCURRENCES); \
|
59 |
+
if (LOG_OCCURRENCES <= n) \
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/portfile.cmake
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO google/glog
|
4 |
+
REF v0.5.0
|
5 |
+
SHA512 445e4338f3d81cd0b065f2da9c6ce343c243263ca144cea424ef97531a4e9e09c06ffd6942ac01c5213a8003c75cfbbede3c4028d12f0134f23ff29314769c1a
|
6 |
+
HEAD_REF master
|
7 |
+
PATCHES
|
8 |
+
glog_disable_debug_postfix.patch
|
9 |
+
fix_glog_CMAKE_MODULE_PATH.patch
|
10 |
+
fix_log_every_n.patch
|
11 |
+
nogdi-nominmax.patch
|
12 |
+
|
13 |
+
)
|
14 |
+
|
15 |
+
vcpkg_cmake_configure(
|
16 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
17 |
+
OPTIONS
|
18 |
+
-DBUILD_TESTING=OFF
|
19 |
+
)
|
20 |
+
|
21 |
+
vcpkg_cmake_install()
|
22 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/glog)
|
23 |
+
|
24 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
25 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
26 |
+
|
27 |
+
vcpkg_copy_pdbs()
|
28 |
+
|
29 |
+
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glog/vcpkg.json
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glog",
|
3 |
+
"version": "0.5.0",
|
4 |
+
"description": "C++ implementation of the Google logging module",
|
5 |
+
"homepage": "https://github.com/google/glog",
|
6 |
+
"license": null,
|
7 |
+
"dependencies": [
|
8 |
+
"gflags",
|
9 |
+
{
|
10 |
+
"name": "vcpkg-cmake",
|
11 |
+
"host": true
|
12 |
+
},
|
13 |
+
{
|
14 |
+
"name": "vcpkg-cmake-config",
|
15 |
+
"host": true
|
16 |
+
}
|
17 |
+
]
|
18 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gloo/portfile.cmake
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO facebookincubator/gloo
|
4 |
+
REF 1da21174054eaabbbd189b7f657ea24842d821e2
|
5 |
+
SHA512 ebd8369e413aee739a3928f8e6738c15708f009e0cd5a3763b8cadbe6f6d0a9d758585a7a2b0f7dd6d39a12882ff2f9497ab2d4edcebd4eb2a7237ab857f317e
|
6 |
+
HEAD_REF master
|
7 |
+
)
|
8 |
+
|
9 |
+
# Determine which backend to build via specified feature
|
10 |
+
vcpkg_check_features(
|
11 |
+
OUT_FEATURE_OPTIONS GLOO_FEATURE_OPTIONS
|
12 |
+
FEATURES
|
13 |
+
mpi USE_MPI
|
14 |
+
redis USE_REDIS
|
15 |
+
)
|
16 |
+
|
17 |
+
if ("cuda" IN_LIST FEATURES)
|
18 |
+
list(APPEND GLOO_FEATURE_OPTIONS "-DUSE_CUDA=1" "-DUSE_NCCL=1")
|
19 |
+
endif()
|
20 |
+
|
21 |
+
vcpkg_configure_cmake(
|
22 |
+
SOURCE_PATH ${SOURCE_PATH}
|
23 |
+
PREFER_NINJA
|
24 |
+
OPTIONS ${GLOO_FEATURE_OPTIONS}
|
25 |
+
)
|
26 |
+
vcpkg_install_cmake()
|
27 |
+
|
28 |
+
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/Gloo)
|
29 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
30 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
31 |
+
|
32 |
+
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/gloo/vcpkg.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "gloo",
|
3 |
+
"version-string": "20201203",
|
4 |
+
"description": "Collective communications library with various primitives for multi-machine training.",
|
5 |
+
"homepage": "https://github.com/facebookincubator/gloo",
|
6 |
+
"supports": "x64 & linux",
|
7 |
+
"features": {
|
8 |
+
"cuda": {
|
9 |
+
"description": "for CUDA aware algorithms",
|
10 |
+
"dependencies": [
|
11 |
+
"cuda",
|
12 |
+
"nccl"
|
13 |
+
]
|
14 |
+
},
|
15 |
+
"mpi": {
|
16 |
+
"description": "for coordinating machine rendezvous through MPI",
|
17 |
+
"dependencies": [
|
18 |
+
"openmpi"
|
19 |
+
]
|
20 |
+
},
|
21 |
+
"redis": {
|
22 |
+
"description": "for coordinating machine rendezvous through Redis",
|
23 |
+
"dependencies": [
|
24 |
+
"hiredis"
|
25 |
+
]
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/always-install-resource-limits.patch
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
|
2 |
+
index 751d1cd71..0f5cf0dc0 100644
|
3 |
+
--- a/StandAlone/CMakeLists.txt
|
4 |
+
+++ b/StandAlone/CMakeLists.txt
|
5 |
+
@@ -98,7 +98,7 @@ if(ENABLE_GLSLANG_INSTALL)
|
6 |
+
install(EXPORT spirv-remapTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
|
7 |
+
endif()
|
8 |
+
|
9 |
+
- if(BUILD_SHARED_LIBS)
|
10 |
+
+ if(BUILD_SHARED_LIBS OR TRUE)
|
11 |
+
install(TARGETS glslang-default-resource-limits EXPORT glslang-default-resource-limitsTargets
|
12 |
+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
13 |
+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/glslang-config.cmake
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include(CMakeFindDependencyMacro)
|
2 |
+
|
3 |
+
find_dependency(Threads)
|
4 |
+
|
5 |
+
foreach(targets OGLCompiler OSDependent glslang glslang-default-resource-limits glslangValidator HLSL SPIRV spirv-remap SPVRemapper)
|
6 |
+
include("${CMAKE_CURRENT_LIST_DIR}/${targets}Targets.cmake" OPTIONAL)
|
7 |
+
endforeach()
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/ignore-crt.patch
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake
|
2 |
+
index b1561263..b6c8c3a6 100644
|
3 |
+
--- a/ChooseMSVCCRT.cmake
|
4 |
+
+++ b/ChooseMSVCCRT.cmake
|
5 |
+
@@ -135,4 +135,3 @@ set(MSVC_CRT
|
6 |
+
MT
|
7 |
+
MTd)
|
8 |
+
|
9 |
+
-choose_msvc_crt(MSVC_CRT)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/portfile.cmake
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2 |
+
|
3 |
+
vcpkg_from_github(
|
4 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
5 |
+
REPO KhronosGroup/glslang
|
6 |
+
REF 11.8.0
|
7 |
+
SHA512 b60d328fab6d5319e49fbf8aeb86c31a7c8dfb4bc75d39c081cbb72f90750fd98f2a4f3ab091614187ad9e0d2e27471f9dab7ca5547cabb856d17bff694f8c98
|
8 |
+
HEAD_REF master
|
9 |
+
PATCHES
|
10 |
+
ignore-crt.patch
|
11 |
+
always-install-resource-limits.patch
|
12 |
+
)
|
13 |
+
|
14 |
+
vcpkg_find_acquire_program(PYTHON3)
|
15 |
+
get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY)
|
16 |
+
vcpkg_add_to_path("${PYTHON_PATH}")
|
17 |
+
|
18 |
+
if(VCPKG_TARGET_IS_IOS)
|
19 |
+
# this case will report error since all executable will require BUNDLE DESTINATION
|
20 |
+
set(BUILD_BINARIES OFF)
|
21 |
+
else()
|
22 |
+
set(BUILD_BINARIES ON)
|
23 |
+
endif()
|
24 |
+
|
25 |
+
vcpkg_cmake_configure(
|
26 |
+
SOURCE_PATH "${SOURCE_PATH}"
|
27 |
+
OPTIONS
|
28 |
+
-DSKIP_GLSLANG_INSTALL=OFF
|
29 |
+
-DBUILD_EXTERNAL=OFF
|
30 |
+
-DENABLE_GLSLANG_BINARIES=${BUILD_BINARIES}
|
31 |
+
)
|
32 |
+
|
33 |
+
vcpkg_cmake_install()
|
34 |
+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
|
35 |
+
|
36 |
+
vcpkg_copy_pdbs()
|
37 |
+
|
38 |
+
if(NOT BUILD_BINARIES)
|
39 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
40 |
+
else()
|
41 |
+
vcpkg_copy_tools(TOOL_NAMES glslangValidator spirv-remap AUTO_CLEAN)
|
42 |
+
endif()
|
43 |
+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
44 |
+
"${CURRENT_PACKAGES_DIR}/debug/bin")
|
45 |
+
|
46 |
+
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/glslang/glslang-config.cmake" OR EXISTS "${CURRENT_PACKAGES_DIR}/share/glslang/glslangConfig.cmake")
|
47 |
+
message(FATAL_ERROR "glslang has been updated to provide a -config file -- please remove the vcpkg provided version from the portfile")
|
48 |
+
endif()
|
49 |
+
|
50 |
+
file(COPY
|
51 |
+
"${CMAKE_CURRENT_LIST_DIR}/glslang-config.cmake"
|
52 |
+
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
53 |
+
)
|
54 |
+
|
55 |
+
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glslang/vcpkg.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "glslang",
|
3 |
+
"version": "11.8.0",
|
4 |
+
"description": "Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator",
|
5 |
+
"homepage": "https://github.com/KhronosGroup/glslang",
|
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/glui/install-one-flavor.patch
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2 |
+
index c0f7d32..8446f3c 100644
|
3 |
+
--- a/CMakeLists.txt
|
4 |
+
+++ b/CMakeLists.txt
|
5 |
+
@@ -59,6 +59,22 @@ target_include_directories(glui_obj
|
6 |
+
# create static *and* shared libraries without double compilation
|
7 |
+
set_target_properties( glui_obj PROPERTIES POSITION_INDEPENDENT_CODE 1)
|
8 |
+
|
9 |
+
+if (MSVC)
|
10 |
+
+ target_compile_options(glui_obj
|
11 |
+
+ PRIVATE
|
12 |
+
+ /D_CRT_SECURE_NO_WARNINGS
|
13 |
+
+ /wd4244
|
14 |
+
+ /wd4305
|
15 |
+
+ )
|
16 |
+
+endif()
|
17 |
+
+
|
18 |
+
+if(BUILD_SHARED_LIBS)
|
19 |
+
+ if(WIN32)
|
20 |
+
+ target_compile_definitions(glui_obj
|
21 |
+
+ PRIVATE GLUI_BUILDING_LIB
|
22 |
+
+ PUBLIC GLUIDLL
|
23 |
+
+ )
|
24 |
+
+ endif()
|
25 |
+
add_library(glui SHARED $<TARGET_OBJECTS:glui_obj>)
|
26 |
+
target_include_directories(glui
|
27 |
+
PUBLIC
|
28 |
+
@@ -71,7 +87,7 @@ set_target_properties(glui PROPERTIES
|
29 |
+
DEBUG_POSTFIX "d"
|
30 |
+
VERSION ${PROJECT_VERSION}
|
31 |
+
SOVERSION ${PROJECT_VERSION})
|
32 |
+
-
|
33 |
+
+else()
|
34 |
+
add_library(glui_static STATIC $<TARGET_OBJECTS:glui_obj>)
|
35 |
+
target_include_directories(glui_static
|
36 |
+
PUBLIC
|
37 |
+
@@ -81,7 +97,9 @@ target_include_directories(glui_static
|
38 |
+
${GLUT_INCLUDE_DIR})
|
39 |
+
target_link_libraries(glui_static PUBLIC ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
|
40 |
+
set_target_properties(glui_static PROPERTIES DEBUG_POSTFIX "d")
|
41 |
+
+endif()
|
42 |
+
|
43 |
+
+if(GLUI_BUILD_EXAMPLES)
|
44 |
+
add_executable(ppm2array tools/ppm.cpp tools/ppm2array.cpp)
|
45 |
+
target_link_libraries(ppm2array)
|
46 |
+
|
47 |
+
@@ -97,7 +115,7 @@ add_executable(example5 example/example5.cpp)
|
48 |
+
target_link_libraries(example5 glui_static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
|
49 |
+
add_executable(example6 example/example6.cpp)
|
50 |
+
target_link_libraries(example6 glui_static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
|
51 |
+
-
|
52 |
+
+endif()
|
53 |
+
|
54 |
+
|
55 |
+
####
|
56 |
+
@@ -130,8 +148,13 @@ configure_package_config_file(
|
57 |
+
)
|
58 |
+
|
59 |
+
# Targets:
|
60 |
+
+if(BUILD_SHARED_LIBS)
|
61 |
+
+ set(glui_target glui)
|
62 |
+
+else()
|
63 |
+
+ set(glui_target glui_static)
|
64 |
+
+endif()
|
65 |
+
install(
|
66 |
+
- TARGETS glui_static glui
|
67 |
+
+ TARGETS ${glui_target}
|
68 |
+
EXPORT "${targets_export_name}"
|
69 |
+
LIBRARY DESTINATION "lib"
|
70 |
+
ARCHIVE DESTINATION "lib"
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glui/portfile.cmake
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
vcpkg_from_github(
|
2 |
+
OUT_SOURCE_PATH SOURCE_PATH
|
3 |
+
REPO libglui/glui
|
4 |
+
REF 093edc777c02118282910bdee59f8db1bd46a84d
|
5 |
+
SHA512 650e169a6a55cd7d599176ac0767cd95b511fbc0a9b27aab2fa4f94a6395fa1a5762b6c23f5f1a9fc5ac9ce70c44fee4e4cbb6d6afd2307130cedfb80aae877a
|
6 |
+
HEAD_REF master
|
7 |
+
PATCHES
|
8 |
+
install-one-flavor.patch
|
9 |
+
)
|
10 |
+
|
11 |
+
vcpkg_configure_cmake(
|
12 |
+
SOURCE_PATH ${SOURCE_PATH}
|
13 |
+
PREFER_NINJA
|
14 |
+
)
|
15 |
+
|
16 |
+
vcpkg_install_cmake()
|
17 |
+
|
18 |
+
vcpkg_copy_pdbs()
|
19 |
+
|
20 |
+
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
21 |
+
|
22 |
+
file(COPY
|
23 |
+
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
24 |
+
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
25 |
+
)
|
26 |
+
|
27 |
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
28 |
+
|
29 |
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
30 |
+
vcpkg_replace_string(
|
31 |
+
${CURRENT_PACKAGES_DIR}/include/GL/glui.h
|
32 |
+
"ifdef GLUIDLL"
|
33 |
+
"if 1 //ifdef GLUIDLL"
|
34 |
+
)
|
35 |
+
endif()
|
36 |
+
|
37 |
+
file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
third-party/DPVO/Pangolin/scripts/vcpkg/ports/glui/vcpkg-cmake-wrapper.cmake
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_find_package(${ARGS})
|
2 |
+
|
3 |
+
if(TARGET glui::glui AND NOT TARGET glui::glui_static)
|
4 |
+
add_library(glui::glui_static INTERFACE IMPORTED)
|
5 |
+
set_target_properties(glui::glui_static PROPERTIES INTERFACE_LINK_LIBRARIES glui::glui)
|
6 |
+
elseif(TARGET glui::glui_static AND NOT TARGET glui::glui)
|
7 |
+
add_library(glui::glui INTERFACE IMPORTED)
|
8 |
+
set_target_properties(glui::glui PROPERTIES INTERFACE_LINK_LIBRARIES glui::glui_static)
|
9 |
+
endif()
|