Stylique commited on
Commit
789eef1
·
verified ·
1 Parent(s): 3ab4811

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +481 -0
  2. submodule/gaussian-splatting/.gitmodules +13 -0
  3. submodule/gaussian-splatting/LICENSE.md +91 -0
  4. submodule/gaussian-splatting/README.md +615 -0
  5. submodule/gaussian-splatting/SIBR_viewers/CMakeLists.txt +213 -0
  6. submodule/gaussian-splatting/SIBR_viewers/LICENSE.md +204 -0
  7. submodule/gaussian-splatting/SIBR_viewers/README.md +142 -0
  8. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/MSVCsetUserCommand.cmake +149 -0
  9. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindASSIMP.cmake +114 -0
  10. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindEGL.cmake +161 -0
  11. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindEmbree.cmake +94 -0
  12. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindFFMPEG.cmake +110 -0
  13. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindGLFW.cmake +109 -0
  14. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Win3rdParty.cmake +337 -0
  15. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/cmake_policies.cmake +19 -0
  16. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/dependencies.cmake +324 -0
  17. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/downloadAndExtractZipFile.cmake +243 -0
  18. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/git_describe.cmake +114 -0
  19. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/include_once.cmake +22 -0
  20. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/install_runtime.cmake +887 -0
  21. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/parse_arguments_multi.cmake +304 -0
  22. submodule/gaussian-splatting/SIBR_viewers/cmake/linux/sibr_library.cmake +174 -0
  23. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/MSVCsetUserCommand.cmake +149 -0
  24. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Modules/FindASSIMP.cmake +104 -0
  25. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Modules/FindEmbree.cmake +95 -0
  26. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Modules/FindFFmpeg.cmake +104 -0
  27. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Win3rdParty.cmake +337 -0
  28. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/cmake_policies.cmake +19 -0
  29. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/dependencies.cmake +292 -0
  30. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/downloadAndExtractZipFile.cmake +243 -0
  31. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/git_describe.cmake +114 -0
  32. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/include_once.cmake +22 -0
  33. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/install_runtime.cmake +880 -0
  34. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/parse_arguments_multi.cmake +304 -0
  35. submodule/gaussian-splatting/SIBR_viewers/cmake/windows/sibr_library.cmake +169 -0
  36. submodule/gaussian-splatting/SIBR_viewers/docs/CMakeLists.txt +63 -0
  37. submodule/gaussian-splatting/SIBR_viewers/docs/doxyfile.in +0 -0
  38. submodule/gaussian-splatting/SIBR_viewers/docs/doxygen_prebuild.cmake.in +24 -0
  39. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealaddinputs.png +0 -0
  40. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealalignimages.png +0 -0
  41. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealcolorizesimplify.png +0 -0
  42. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealexportmodel.png +0 -0
  43. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealinputsonly.png +3 -0
  44. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealmesh.png +3 -0
  45. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealmeshreconstruction.png +0 -0
  46. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealnew.png +0 -0
  47. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealpointcloud.png +3 -0
  48. submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/meshlab.png +3 -0
  49. submodule/gaussian-splatting/SIBR_viewers/docs/img/cmake.gif +0 -0
  50. submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/class/sibr_classes_v2.png +3 -0
.gitattributes CHANGED
@@ -39,3 +39,484 @@ work_dirs/demo_data/13.jpg filter=lfs diff=lfs merge=lfs -text
39
  work_dirs/demo_data/13_smplx_render.jpg filter=lfs diff=lfs merge=lfs -text
40
  work_dirs/demo_data/4.jpg filter=lfs diff=lfs merge=lfs -text
41
  work_dirs/demo_data/4_smplx_render.jpg filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  work_dirs/demo_data/13_smplx_render.jpg filter=lfs diff=lfs merge=lfs -text
40
  work_dirs/demo_data/4.jpg filter=lfs diff=lfs merge=lfs -text
41
  work_dirs/demo_data/4_smplx_render.jpg filter=lfs diff=lfs merge=lfs -text
42
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealinputsonly.png filter=lfs diff=lfs merge=lfs -text
43
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealmesh.png filter=lfs diff=lfs merge=lfs -text
44
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealpointcloud.png filter=lfs diff=lfs merge=lfs -text
45
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/meshlab.png filter=lfs diff=lfs merge=lfs -text
46
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/class/sibr_classes_v2.png filter=lfs diff=lfs merge=lfs -text
47
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/sequence/AssetStreamer/seq_assetStreamer.pdf filter=lfs diff=lfs merge=lfs -text
48
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/sequence/Renderers/seq_insideOut.pdf filter=lfs diff=lfs merge=lfs -text
49
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/sequence/Renderers/seq_ulr_stream.pdf filter=lfs diff=lfs merge=lfs -text
50
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/sequence/Renderers/seq_ulr_v3_landscape.pdf filter=lfs diff=lfs merge=lfs -text
51
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/sequence/Unity/seq_unity_ulr_rendering.pdf filter=lfs diff=lfs merge=lfs -text
52
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/sequence/Unity/seq_unity_ulr_texture_upload.pdf filter=lfs diff=lfs merge=lfs -text
53
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/ibr_common_cmake.png filter=lfs diff=lfs merge=lfs -text
54
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/jesnault_git_cheat_sheet.png filter=lfs diff=lfs merge=lfs -text
55
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/multimeshmanager.png filter=lfs diff=lfs merge=lfs -text
56
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/multiviewmanager.png filter=lfs diff=lfs merge=lfs -text
57
+ submodule/gaussian-splatting/SIBR_viewers/docs/img/ulr_screenshot.png filter=lfs diff=lfs merge=lfs -text
58
+ submodule/gaussian-splatting/assets/Exposure_comparison.png filter=lfs diff=lfs merge=lfs -text
59
+ submodule/gaussian-splatting/assets/aa_onoff.gif filter=lfs diff=lfs merge=lfs -text
60
+ submodule/gaussian-splatting/assets/better.png filter=lfs diff=lfs merge=lfs -text
61
+ submodule/gaussian-splatting/assets/depth_comparison.png filter=lfs diff=lfs merge=lfs -text
62
+ submodule/gaussian-splatting/assets/teaser.png filter=lfs diff=lfs merge=lfs -text
63
+ submodule/gaussian-splatting/assets/top_view_image_alpha.gif filter=lfs diff=lfs merge=lfs -text
64
+ submodule/gaussian-splatting/assets/top_view_open.gif filter=lfs diff=lfs merge=lfs -text
65
+ submodule/gaussian-splatting/assets/top_view_options.gif filter=lfs diff=lfs merge=lfs -text
66
+ submodule/gaussian-splatting/assets/worse.png filter=lfs diff=lfs merge=lfs -text
67
+ submodule/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/doc/manual/frontpage1.png filter=lfs diff=lfs merge=lfs -text
68
+ submodule/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/doc/manual/frontpage2.png filter=lfs diff=lfs merge=lfs -text
69
+ submodule/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/doc/manual.pdf filter=lfs diff=lfs merge=lfs -text
70
+ submodule/gaussian-splatting/submodules/fused-ssim/images/albert.jpg filter=lfs diff=lfs merge=lfs -text
71
+ submodule/gaussian-splatting/submodules/fused-ssim/images/inference_time.png filter=lfs diff=lfs merge=lfs -text
72
+ submodule/gaussian-splatting/submodules/fused-ssim/images/predicted.jpg filter=lfs diff=lfs merge=lfs -text
73
+ submodule/gaussian-splatting/submodules/fused-ssim/images/training_time.png filter=lfs diff=lfs merge=lfs -text
74
+ submodule/pytorch3d/.github/bundle_adjust.gif filter=lfs diff=lfs merge=lfs -text
75
+ submodule/pytorch3d/.github/camera_position_teapot.gif filter=lfs diff=lfs merge=lfs -text
76
+ submodule/pytorch3d/.github/cow_deform.gif filter=lfs diff=lfs merge=lfs -text
77
+ submodule/pytorch3d/.github/densepose_render.png filter=lfs diff=lfs merge=lfs -text
78
+ submodule/pytorch3d/.github/dolphin_deform.gif filter=lfs diff=lfs merge=lfs -text
79
+ submodule/pytorch3d/.github/fit_nerf.gif filter=lfs diff=lfs merge=lfs -text
80
+ submodule/pytorch3d/.github/fit_textured_volume.gif filter=lfs diff=lfs merge=lfs -text
81
+ submodule/pytorch3d/.github/implicitron_config.gif filter=lfs diff=lfs merge=lfs -text
82
+ submodule/pytorch3d/.github/nerf_project_logo.gif filter=lfs diff=lfs merge=lfs -text
83
+ submodule/pytorch3d/.github/render_textured_mesh.gif filter=lfs diff=lfs merge=lfs -text
84
+ submodule/pytorch3d/.github/shapenet_render.png filter=lfs diff=lfs merge=lfs -text
85
+ submodule/pytorch3d/build/lib.macosx-11.1-arm64-cpython-313/pytorch3d/_C.cpython-313-darwin.so filter=lfs diff=lfs merge=lfs -text
86
+ submodule/pytorch3d/build/temp.macosx-11.1-arm64-cpython-313/.ninja_deps filter=lfs diff=lfs merge=lfs -text
87
+ submodule/pytorch3d/build/temp.macosx-11.1-arm64-cpython-313/Users/kabeer/IDOL/submodule/pytorch3d/pytorch3d/csrc/ext.o filter=lfs diff=lfs merge=lfs -text
88
+ submodule/pytorch3d/build/temp.macosx-11.1-arm64-cpython-313/Users/kabeer/IDOL/submodule/pytorch3d/pytorch3d/csrc/pulsar/pytorch/renderer.o filter=lfs diff=lfs merge=lfs -text
89
+ submodule/pytorch3d/build/temp.macosx-11.1-arm64-cpython-313/Users/kabeer/IDOL/submodule/pytorch3d/pytorch3d/csrc/rasterize_meshes/rasterize_meshes_cpu.o filter=lfs diff=lfs merge=lfs -text
90
+ submodule/pytorch3d/docs/notes/assets/architecture_renderer.jpg filter=lfs diff=lfs merge=lfs -text
91
+ submodule/pytorch3d/docs/notes/assets/batch_intro.png filter=lfs diff=lfs merge=lfs -text
92
+ submodule/pytorch3d/docs/notes/assets/batch_modes.gif filter=lfs diff=lfs merge=lfs -text
93
+ submodule/pytorch3d/docs/notes/assets/iou3d.gif filter=lfs diff=lfs merge=lfs -text
94
+ submodule/pytorch3d/docs/notes/assets/meshrcnn.png filter=lfs diff=lfs merge=lfs -text
95
+ submodule/pytorch3d/docs/notes/assets/p3d_naive_vs_coarse.png filter=lfs diff=lfs merge=lfs -text
96
+ submodule/pytorch3d/docs/notes/assets/p3d_vs_softras.png filter=lfs diff=lfs merge=lfs -text
97
+ submodule/pytorch3d/docs/notes/assets/transforms_overview.jpg filter=lfs diff=lfs merge=lfs -text
98
+ submodule/pytorch3d/docs/notes/assets/world_camera_image.jpg filter=lfs diff=lfs merge=lfs -text
99
+ submodule/pytorch3d/pytorch3d/_C.cpython-313-darwin.so filter=lfs diff=lfs merge=lfs -text
100
+ submodule/pytorch3d/tests/data/cow.glb filter=lfs diff=lfs merge=lfs -text
101
+ submodule/pytorch3d/tests/data/test_cow_image_rectangle_MeshRasterizerOpenGL.png filter=lfs diff=lfs merge=lfs -text
102
+ submodule/pytorch3d/tests/pulsar/reference/examples_TestRenderer_test_cam.png filter=lfs diff=lfs merge=lfs -text
103
+ submodule/pytorch3d/tests/pulsar/reference/examples_TestRenderer_test_smallopt.png filter=lfs diff=lfs merge=lfs -text
104
+ submodule/sapiens/assets/01.gif filter=lfs diff=lfs merge=lfs -text
105
+ submodule/sapiens/assets/02.gif filter=lfs diff=lfs merge=lfs -text
106
+ submodule/sapiens/assets/03.gif filter=lfs diff=lfs merge=lfs -text
107
+ submodule/sapiens/assets/04.gif filter=lfs diff=lfs merge=lfs -text
108
+ submodule/sapiens/assets/depth.gif filter=lfs diff=lfs merge=lfs -text
109
+ submodule/sapiens/assets/keypoints133.gif filter=lfs diff=lfs merge=lfs -text
110
+ submodule/sapiens/assets/keypoints133_openpose.gif filter=lfs diff=lfs merge=lfs -text
111
+ submodule/sapiens/assets/keypoints17.gif filter=lfs diff=lfs merge=lfs -text
112
+ submodule/sapiens/assets/keypoints17_openpose.gif filter=lfs diff=lfs merge=lfs -text
113
+ submodule/sapiens/assets/keypoints308.gif filter=lfs diff=lfs merge=lfs -text
114
+ submodule/sapiens/assets/normal.gif filter=lfs diff=lfs merge=lfs -text
115
+ submodule/sapiens/assets/sapiens_animation.gif filter=lfs diff=lfs merge=lfs -text
116
+ submodule/sapiens/assets/seg.gif filter=lfs diff=lfs merge=lfs -text
117
+ submodule/sapiens/assets/seg_face.gif filter=lfs diff=lfs merge=lfs -text
118
+ submodule/sapiens/lite/assets/depth.gif filter=lfs diff=lfs merge=lfs -text
119
+ submodule/sapiens/lite/assets/keypoints133.gif filter=lfs diff=lfs merge=lfs -text
120
+ submodule/sapiens/lite/assets/keypoints17.gif filter=lfs diff=lfs merge=lfs -text
121
+ submodule/sapiens/lite/assets/keypoints308.gif filter=lfs diff=lfs merge=lfs -text
122
+ submodule/sapiens/lite/assets/normal.gif filter=lfs diff=lfs merge=lfs -text
123
+ submodule/sapiens/lite/assets/seg.gif filter=lfs diff=lfs merge=lfs -text
124
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000000.jpg filter=lfs diff=lfs merge=lfs -text
125
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000001.jpg filter=lfs diff=lfs merge=lfs -text
126
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000002.jpg filter=lfs diff=lfs merge=lfs -text
127
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000003.jpg filter=lfs diff=lfs merge=lfs -text
128
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000004.jpg filter=lfs diff=lfs merge=lfs -text
129
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000005.jpg filter=lfs diff=lfs merge=lfs -text
130
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000006.jpg filter=lfs diff=lfs merge=lfs -text
131
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000007.jpg filter=lfs diff=lfs merge=lfs -text
132
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000008.jpg filter=lfs diff=lfs merge=lfs -text
133
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000009.jpg filter=lfs diff=lfs merge=lfs -text
134
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000010.jpg filter=lfs diff=lfs merge=lfs -text
135
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000011.jpg filter=lfs diff=lfs merge=lfs -text
136
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000012.jpg filter=lfs diff=lfs merge=lfs -text
137
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000013.jpg filter=lfs diff=lfs merge=lfs -text
138
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000014.jpg filter=lfs diff=lfs merge=lfs -text
139
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000015.jpg filter=lfs diff=lfs merge=lfs -text
140
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000016.jpg filter=lfs diff=lfs merge=lfs -text
141
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000017.jpg filter=lfs diff=lfs merge=lfs -text
142
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000018.jpg filter=lfs diff=lfs merge=lfs -text
143
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000019.jpg filter=lfs diff=lfs merge=lfs -text
144
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000020.jpg filter=lfs diff=lfs merge=lfs -text
145
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000021.jpg filter=lfs diff=lfs merge=lfs -text
146
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000022.jpg filter=lfs diff=lfs merge=lfs -text
147
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000023.jpg filter=lfs diff=lfs merge=lfs -text
148
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000024.jpg filter=lfs diff=lfs merge=lfs -text
149
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000025.jpg filter=lfs diff=lfs merge=lfs -text
150
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000026.jpg filter=lfs diff=lfs merge=lfs -text
151
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000027.jpg filter=lfs diff=lfs merge=lfs -text
152
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000028.jpg filter=lfs diff=lfs merge=lfs -text
153
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000029.jpg filter=lfs diff=lfs merge=lfs -text
154
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000030.jpg filter=lfs diff=lfs merge=lfs -text
155
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000031.jpg filter=lfs diff=lfs merge=lfs -text
156
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000032.jpg filter=lfs diff=lfs merge=lfs -text
157
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000033.jpg filter=lfs diff=lfs merge=lfs -text
158
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000034.jpg filter=lfs diff=lfs merge=lfs -text
159
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000035.jpg filter=lfs diff=lfs merge=lfs -text
160
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000036.jpg filter=lfs diff=lfs merge=lfs -text
161
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000037.jpg filter=lfs diff=lfs merge=lfs -text
162
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000038.jpg filter=lfs diff=lfs merge=lfs -text
163
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000039.jpg filter=lfs diff=lfs merge=lfs -text
164
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000040.jpg filter=lfs diff=lfs merge=lfs -text
165
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000041.jpg filter=lfs diff=lfs merge=lfs -text
166
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000042.jpg filter=lfs diff=lfs merge=lfs -text
167
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000043.jpg filter=lfs diff=lfs merge=lfs -text
168
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000044.jpg filter=lfs diff=lfs merge=lfs -text
169
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000045.jpg filter=lfs diff=lfs merge=lfs -text
170
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000046.jpg filter=lfs diff=lfs merge=lfs -text
171
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000047.jpg filter=lfs diff=lfs merge=lfs -text
172
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000048.jpg filter=lfs diff=lfs merge=lfs -text
173
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000049.jpg filter=lfs diff=lfs merge=lfs -text
174
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000050.jpg filter=lfs diff=lfs merge=lfs -text
175
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000051.jpg filter=lfs diff=lfs merge=lfs -text
176
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000052.jpg filter=lfs diff=lfs merge=lfs -text
177
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000053.jpg filter=lfs diff=lfs merge=lfs -text
178
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000054.jpg filter=lfs diff=lfs merge=lfs -text
179
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000055.jpg filter=lfs diff=lfs merge=lfs -text
180
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000056.jpg filter=lfs diff=lfs merge=lfs -text
181
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000057.jpg filter=lfs diff=lfs merge=lfs -text
182
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000058.jpg filter=lfs diff=lfs merge=lfs -text
183
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000059.jpg filter=lfs diff=lfs merge=lfs -text
184
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000060.jpg filter=lfs diff=lfs merge=lfs -text
185
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000061.jpg filter=lfs diff=lfs merge=lfs -text
186
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000062.jpg filter=lfs diff=lfs merge=lfs -text
187
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000063.jpg filter=lfs diff=lfs merge=lfs -text
188
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000064.jpg filter=lfs diff=lfs merge=lfs -text
189
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000065.jpg filter=lfs diff=lfs merge=lfs -text
190
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000066.jpg filter=lfs diff=lfs merge=lfs -text
191
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000067.jpg filter=lfs diff=lfs merge=lfs -text
192
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000068.jpg filter=lfs diff=lfs merge=lfs -text
193
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000069.jpg filter=lfs diff=lfs merge=lfs -text
194
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000070.jpg filter=lfs diff=lfs merge=lfs -text
195
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000071.jpg filter=lfs diff=lfs merge=lfs -text
196
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000072.jpg filter=lfs diff=lfs merge=lfs -text
197
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000073.jpg filter=lfs diff=lfs merge=lfs -text
198
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000074.jpg filter=lfs diff=lfs merge=lfs -text
199
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000075.jpg filter=lfs diff=lfs merge=lfs -text
200
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000076.jpg filter=lfs diff=lfs merge=lfs -text
201
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000077.jpg filter=lfs diff=lfs merge=lfs -text
202
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000078.jpg filter=lfs diff=lfs merge=lfs -text
203
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000079.jpg filter=lfs diff=lfs merge=lfs -text
204
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000080.jpg filter=lfs diff=lfs merge=lfs -text
205
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000081.jpg filter=lfs diff=lfs merge=lfs -text
206
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000082.jpg filter=lfs diff=lfs merge=lfs -text
207
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000083.jpg filter=lfs diff=lfs merge=lfs -text
208
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000084.jpg filter=lfs diff=lfs merge=lfs -text
209
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000085.jpg filter=lfs diff=lfs merge=lfs -text
210
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000086.jpg filter=lfs diff=lfs merge=lfs -text
211
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000087.jpg filter=lfs diff=lfs merge=lfs -text
212
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000088.jpg filter=lfs diff=lfs merge=lfs -text
213
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000089.jpg filter=lfs diff=lfs merge=lfs -text
214
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000090.jpg filter=lfs diff=lfs merge=lfs -text
215
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000091.jpg filter=lfs diff=lfs merge=lfs -text
216
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000092.jpg filter=lfs diff=lfs merge=lfs -text
217
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000093.jpg filter=lfs diff=lfs merge=lfs -text
218
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000094.jpg filter=lfs diff=lfs merge=lfs -text
219
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000095.jpg filter=lfs diff=lfs merge=lfs -text
220
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000096.jpg filter=lfs diff=lfs merge=lfs -text
221
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000097.jpg filter=lfs diff=lfs merge=lfs -text
222
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000098.jpg filter=lfs diff=lfs merge=lfs -text
223
+ submodule/sapiens/pose/demo/data/itw_videos/reel1/000099.jpg filter=lfs diff=lfs merge=lfs -text
224
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000001.jpg filter=lfs diff=lfs merge=lfs -text
225
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000002.jpg filter=lfs diff=lfs merge=lfs -text
226
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000003.jpg filter=lfs diff=lfs merge=lfs -text
227
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000004.jpg filter=lfs diff=lfs merge=lfs -text
228
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000005.jpg filter=lfs diff=lfs merge=lfs -text
229
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000006.jpg filter=lfs diff=lfs merge=lfs -text
230
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000007.jpg filter=lfs diff=lfs merge=lfs -text
231
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000008.jpg filter=lfs diff=lfs merge=lfs -text
232
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000009.jpg filter=lfs diff=lfs merge=lfs -text
233
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000010.jpg filter=lfs diff=lfs merge=lfs -text
234
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000011.jpg filter=lfs diff=lfs merge=lfs -text
235
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000012.jpg filter=lfs diff=lfs merge=lfs -text
236
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000013.jpg filter=lfs diff=lfs merge=lfs -text
237
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000014.jpg filter=lfs diff=lfs merge=lfs -text
238
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000015.jpg filter=lfs diff=lfs merge=lfs -text
239
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000016.jpg filter=lfs diff=lfs merge=lfs -text
240
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000017.jpg filter=lfs diff=lfs merge=lfs -text
241
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000018.jpg filter=lfs diff=lfs merge=lfs -text
242
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000019.jpg filter=lfs diff=lfs merge=lfs -text
243
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000020.jpg filter=lfs diff=lfs merge=lfs -text
244
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000021.jpg filter=lfs diff=lfs merge=lfs -text
245
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000022.jpg filter=lfs diff=lfs merge=lfs -text
246
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000023.jpg filter=lfs diff=lfs merge=lfs -text
247
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000024.jpg filter=lfs diff=lfs merge=lfs -text
248
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000025.jpg filter=lfs diff=lfs merge=lfs -text
249
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000026.jpg filter=lfs diff=lfs merge=lfs -text
250
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000027.jpg filter=lfs diff=lfs merge=lfs -text
251
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000028.jpg filter=lfs diff=lfs merge=lfs -text
252
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000029.jpg filter=lfs diff=lfs merge=lfs -text
253
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000030.jpg filter=lfs diff=lfs merge=lfs -text
254
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000031.jpg filter=lfs diff=lfs merge=lfs -text
255
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000032.jpg filter=lfs diff=lfs merge=lfs -text
256
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000033.jpg filter=lfs diff=lfs merge=lfs -text
257
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000034.jpg filter=lfs diff=lfs merge=lfs -text
258
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000035.jpg filter=lfs diff=lfs merge=lfs -text
259
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000036.jpg filter=lfs diff=lfs merge=lfs -text
260
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000037.jpg filter=lfs diff=lfs merge=lfs -text
261
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000038.jpg filter=lfs diff=lfs merge=lfs -text
262
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000039.jpg filter=lfs diff=lfs merge=lfs -text
263
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000040.jpg filter=lfs diff=lfs merge=lfs -text
264
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000041.jpg filter=lfs diff=lfs merge=lfs -text
265
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000042.jpg filter=lfs diff=lfs merge=lfs -text
266
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000043.jpg filter=lfs diff=lfs merge=lfs -text
267
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000044.jpg filter=lfs diff=lfs merge=lfs -text
268
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000045.jpg filter=lfs diff=lfs merge=lfs -text
269
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000046.jpg filter=lfs diff=lfs merge=lfs -text
270
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000047.jpg filter=lfs diff=lfs merge=lfs -text
271
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000048.jpg filter=lfs diff=lfs merge=lfs -text
272
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000049.jpg filter=lfs diff=lfs merge=lfs -text
273
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000050.jpg filter=lfs diff=lfs merge=lfs -text
274
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000051.jpg filter=lfs diff=lfs merge=lfs -text
275
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000052.jpg filter=lfs diff=lfs merge=lfs -text
276
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000053.jpg filter=lfs diff=lfs merge=lfs -text
277
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000054.jpg filter=lfs diff=lfs merge=lfs -text
278
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000055.jpg filter=lfs diff=lfs merge=lfs -text
279
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000056.jpg filter=lfs diff=lfs merge=lfs -text
280
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000057.jpg filter=lfs diff=lfs merge=lfs -text
281
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000058.jpg filter=lfs diff=lfs merge=lfs -text
282
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000059.jpg filter=lfs diff=lfs merge=lfs -text
283
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000060.jpg filter=lfs diff=lfs merge=lfs -text
284
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000061.jpg filter=lfs diff=lfs merge=lfs -text
285
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000062.jpg filter=lfs diff=lfs merge=lfs -text
286
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000063.jpg filter=lfs diff=lfs merge=lfs -text
287
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000064.jpg filter=lfs diff=lfs merge=lfs -text
288
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000065.jpg filter=lfs diff=lfs merge=lfs -text
289
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000066.jpg filter=lfs diff=lfs merge=lfs -text
290
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000067.jpg filter=lfs diff=lfs merge=lfs -text
291
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000068.jpg filter=lfs diff=lfs merge=lfs -text
292
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000069.jpg filter=lfs diff=lfs merge=lfs -text
293
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000070.jpg filter=lfs diff=lfs merge=lfs -text
294
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000071.jpg filter=lfs diff=lfs merge=lfs -text
295
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000072.jpg filter=lfs diff=lfs merge=lfs -text
296
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000073.jpg filter=lfs diff=lfs merge=lfs -text
297
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000074.jpg filter=lfs diff=lfs merge=lfs -text
298
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000075.jpg filter=lfs diff=lfs merge=lfs -text
299
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000076.jpg filter=lfs diff=lfs merge=lfs -text
300
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000077.jpg filter=lfs diff=lfs merge=lfs -text
301
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000078.jpg filter=lfs diff=lfs merge=lfs -text
302
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000079.jpg filter=lfs diff=lfs merge=lfs -text
303
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000080.jpg filter=lfs diff=lfs merge=lfs -text
304
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000081.jpg filter=lfs diff=lfs merge=lfs -text
305
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000082.jpg filter=lfs diff=lfs merge=lfs -text
306
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000083.jpg filter=lfs diff=lfs merge=lfs -text
307
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000084.jpg filter=lfs diff=lfs merge=lfs -text
308
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000085.jpg filter=lfs diff=lfs merge=lfs -text
309
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000086.jpg filter=lfs diff=lfs merge=lfs -text
310
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000087.jpg filter=lfs diff=lfs merge=lfs -text
311
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000088.jpg filter=lfs diff=lfs merge=lfs -text
312
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000089.jpg filter=lfs diff=lfs merge=lfs -text
313
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000090.jpg filter=lfs diff=lfs merge=lfs -text
314
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000091.jpg filter=lfs diff=lfs merge=lfs -text
315
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000092.jpg filter=lfs diff=lfs merge=lfs -text
316
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000093.jpg filter=lfs diff=lfs merge=lfs -text
317
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000094.jpg filter=lfs diff=lfs merge=lfs -text
318
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000095.jpg filter=lfs diff=lfs merge=lfs -text
319
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000096.jpg filter=lfs diff=lfs merge=lfs -text
320
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000097.jpg filter=lfs diff=lfs merge=lfs -text
321
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000098.jpg filter=lfs diff=lfs merge=lfs -text
322
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000099.jpg filter=lfs diff=lfs merge=lfs -text
323
+ submodule/sapiens/pose/demo/data/itw_videos/reel2/000100.jpg filter=lfs diff=lfs merge=lfs -text
324
+ submodule/sapiens/seg/demo/data/face_reel/000001.jpg filter=lfs diff=lfs merge=lfs -text
325
+ submodule/sapiens/seg/demo/data/face_reel/000002.jpg filter=lfs diff=lfs merge=lfs -text
326
+ submodule/sapiens/seg/demo/data/face_reel/000003.jpg filter=lfs diff=lfs merge=lfs -text
327
+ submodule/sapiens/seg/demo/data/face_reel/000004.jpg filter=lfs diff=lfs merge=lfs -text
328
+ submodule/sapiens/seg/demo/data/face_reel/000005.jpg filter=lfs diff=lfs merge=lfs -text
329
+ submodule/sapiens/seg/demo/data/face_reel/000006.jpg filter=lfs diff=lfs merge=lfs -text
330
+ submodule/sapiens/seg/demo/data/face_reel/000007.jpg filter=lfs diff=lfs merge=lfs -text
331
+ submodule/sapiens/seg/demo/data/face_reel/000008.jpg filter=lfs diff=lfs merge=lfs -text
332
+ submodule/sapiens/seg/demo/data/face_reel/000009.jpg filter=lfs diff=lfs merge=lfs -text
333
+ submodule/sapiens/seg/demo/data/face_reel/000010.jpg filter=lfs diff=lfs merge=lfs -text
334
+ submodule/sapiens/seg/demo/data/face_reel/000011.jpg filter=lfs diff=lfs merge=lfs -text
335
+ submodule/sapiens/seg/demo/data/face_reel/000012.jpg filter=lfs diff=lfs merge=lfs -text
336
+ submodule/sapiens/seg/demo/data/face_reel/000013.jpg filter=lfs diff=lfs merge=lfs -text
337
+ submodule/sapiens/seg/demo/data/face_reel/000014.jpg filter=lfs diff=lfs merge=lfs -text
338
+ submodule/sapiens/seg/demo/data/face_reel/000015.jpg filter=lfs diff=lfs merge=lfs -text
339
+ submodule/sapiens/seg/demo/data/face_reel/000016.jpg filter=lfs diff=lfs merge=lfs -text
340
+ submodule/sapiens/seg/demo/data/face_reel/000017.jpg filter=lfs diff=lfs merge=lfs -text
341
+ submodule/sapiens/seg/demo/data/face_reel/000018.jpg filter=lfs diff=lfs merge=lfs -text
342
+ submodule/sapiens/seg/demo/data/face_reel/000019.jpg filter=lfs diff=lfs merge=lfs -text
343
+ submodule/sapiens/seg/demo/data/face_reel/000020.jpg filter=lfs diff=lfs merge=lfs -text
344
+ submodule/sapiens/seg/demo/data/face_reel/000021.jpg filter=lfs diff=lfs merge=lfs -text
345
+ submodule/sapiens/seg/demo/data/face_reel/000022.jpg filter=lfs diff=lfs merge=lfs -text
346
+ submodule/sapiens/seg/demo/data/face_reel/000023.jpg filter=lfs diff=lfs merge=lfs -text
347
+ submodule/sapiens/seg/demo/data/face_reel/000024.jpg filter=lfs diff=lfs merge=lfs -text
348
+ submodule/sapiens/seg/demo/data/face_reel/000025.jpg filter=lfs diff=lfs merge=lfs -text
349
+ submodule/sapiens/seg/demo/data/face_reel/000026.jpg filter=lfs diff=lfs merge=lfs -text
350
+ submodule/sapiens/seg/demo/data/face_reel/000027.jpg filter=lfs diff=lfs merge=lfs -text
351
+ submodule/sapiens/seg/demo/data/face_reel/000028.jpg filter=lfs diff=lfs merge=lfs -text
352
+ submodule/sapiens/seg/demo/data/face_reel/000029.jpg filter=lfs diff=lfs merge=lfs -text
353
+ submodule/sapiens/seg/demo/data/face_reel/000030.jpg filter=lfs diff=lfs merge=lfs -text
354
+ submodule/sapiens/seg/demo/data/face_reel/000031.jpg filter=lfs diff=lfs merge=lfs -text
355
+ submodule/sapiens/seg/demo/data/face_reel/000032.jpg filter=lfs diff=lfs merge=lfs -text
356
+ submodule/sapiens/seg/demo/data/face_reel/000033.jpg filter=lfs diff=lfs merge=lfs -text
357
+ submodule/sapiens/seg/demo/data/face_reel/000034.jpg filter=lfs diff=lfs merge=lfs -text
358
+ submodule/sapiens/seg/demo/data/face_reel/000035.jpg filter=lfs diff=lfs merge=lfs -text
359
+ submodule/sapiens/seg/demo/data/face_reel/000036.jpg filter=lfs diff=lfs merge=lfs -text
360
+ submodule/sapiens/seg/demo/data/face_reel/000037.jpg filter=lfs diff=lfs merge=lfs -text
361
+ submodule/sapiens/seg/demo/data/face_reel/000038.jpg filter=lfs diff=lfs merge=lfs -text
362
+ submodule/sapiens/seg/demo/data/face_reel/000039.jpg filter=lfs diff=lfs merge=lfs -text
363
+ submodule/sapiens/seg/demo/data/face_reel/000040.jpg filter=lfs diff=lfs merge=lfs -text
364
+ submodule/sapiens/seg/demo/data/face_reel/000041.jpg filter=lfs diff=lfs merge=lfs -text
365
+ submodule/sapiens/seg/demo/data/face_reel/000042.jpg filter=lfs diff=lfs merge=lfs -text
366
+ submodule/sapiens/seg/demo/data/face_reel/000043.jpg filter=lfs diff=lfs merge=lfs -text
367
+ submodule/sapiens/seg/demo/data/face_reel/000044.jpg filter=lfs diff=lfs merge=lfs -text
368
+ submodule/sapiens/seg/demo/data/face_reel/000045.jpg filter=lfs diff=lfs merge=lfs -text
369
+ submodule/sapiens/seg/demo/data/face_reel/000046.jpg filter=lfs diff=lfs merge=lfs -text
370
+ submodule/sapiens/seg/demo/data/face_reel/000047.jpg filter=lfs diff=lfs merge=lfs -text
371
+ submodule/sapiens/seg/demo/data/face_reel/000048.jpg filter=lfs diff=lfs merge=lfs -text
372
+ submodule/sapiens/seg/demo/data/face_reel/000049.jpg filter=lfs diff=lfs merge=lfs -text
373
+ submodule/sapiens/seg/demo/data/face_reel/000050.jpg filter=lfs diff=lfs merge=lfs -text
374
+ submodule/sapiens/seg/demo/data/face_reel/000051.jpg filter=lfs diff=lfs merge=lfs -text
375
+ submodule/sapiens/seg/demo/data/face_reel/000052.jpg filter=lfs diff=lfs merge=lfs -text
376
+ submodule/sapiens/seg/demo/data/face_reel/000053.jpg filter=lfs diff=lfs merge=lfs -text
377
+ submodule/sapiens/seg/demo/data/face_reel/000054.jpg filter=lfs diff=lfs merge=lfs -text
378
+ submodule/sapiens/seg/demo/data/face_reel/000055.jpg filter=lfs diff=lfs merge=lfs -text
379
+ submodule/sapiens/seg/demo/data/face_reel/000056.jpg filter=lfs diff=lfs merge=lfs -text
380
+ submodule/sapiens/seg/demo/data/face_reel/000057.jpg filter=lfs diff=lfs merge=lfs -text
381
+ submodule/sapiens/seg/demo/data/face_reel/000058.jpg filter=lfs diff=lfs merge=lfs -text
382
+ submodule/sapiens/seg/demo/data/face_reel/000059.jpg filter=lfs diff=lfs merge=lfs -text
383
+ submodule/sapiens/seg/demo/data/face_reel/000060.jpg filter=lfs diff=lfs merge=lfs -text
384
+ submodule/sapiens/seg/demo/data/face_reel/000061.jpg filter=lfs diff=lfs merge=lfs -text
385
+ submodule/sapiens/seg/demo/data/face_reel/000062.jpg filter=lfs diff=lfs merge=lfs -text
386
+ submodule/sapiens/seg/demo/data/face_reel/000063.jpg filter=lfs diff=lfs merge=lfs -text
387
+ submodule/sapiens/seg/demo/data/face_reel/000064.jpg filter=lfs diff=lfs merge=lfs -text
388
+ submodule/sapiens/seg/demo/data/face_reel/000065.jpg filter=lfs diff=lfs merge=lfs -text
389
+ submodule/sapiens/seg/demo/data/face_reel/000066.jpg filter=lfs diff=lfs merge=lfs -text
390
+ submodule/sapiens/seg/demo/data/face_reel/000067.jpg filter=lfs diff=lfs merge=lfs -text
391
+ submodule/sapiens/seg/demo/data/face_reel/000068.jpg filter=lfs diff=lfs merge=lfs -text
392
+ submodule/sapiens/seg/demo/data/face_reel/000069.jpg filter=lfs diff=lfs merge=lfs -text
393
+ submodule/sapiens/seg/demo/data/face_reel/000070.jpg filter=lfs diff=lfs merge=lfs -text
394
+ submodule/sapiens/seg/demo/data/face_reel/000071.jpg filter=lfs diff=lfs merge=lfs -text
395
+ submodule/sapiens/seg/demo/data/face_reel/000072.jpg filter=lfs diff=lfs merge=lfs -text
396
+ submodule/sapiens/seg/demo/data/face_reel/000073.jpg filter=lfs diff=lfs merge=lfs -text
397
+ submodule/sapiens/seg/demo/data/face_reel/000074.jpg filter=lfs diff=lfs merge=lfs -text
398
+ submodule/sapiens/seg/demo/data/face_reel/000075.jpg filter=lfs diff=lfs merge=lfs -text
399
+ submodule/sapiens/seg/demo/data/face_reel/000076.jpg filter=lfs diff=lfs merge=lfs -text
400
+ submodule/sapiens/seg/demo/data/face_reel/000077.jpg filter=lfs diff=lfs merge=lfs -text
401
+ submodule/sapiens/seg/demo/data/face_reel/000078.jpg filter=lfs diff=lfs merge=lfs -text
402
+ submodule/sapiens/seg/demo/data/face_reel/000079.jpg filter=lfs diff=lfs merge=lfs -text
403
+ submodule/sapiens/seg/demo/data/face_reel/000080.jpg filter=lfs diff=lfs merge=lfs -text
404
+ submodule/sapiens/seg/demo/data/face_reel/000081.jpg filter=lfs diff=lfs merge=lfs -text
405
+ submodule/sapiens/seg/demo/data/face_reel/000082.jpg filter=lfs diff=lfs merge=lfs -text
406
+ submodule/sapiens/seg/demo/data/face_reel/000083.jpg filter=lfs diff=lfs merge=lfs -text
407
+ submodule/sapiens/seg/demo/data/face_reel/000084.jpg filter=lfs diff=lfs merge=lfs -text
408
+ submodule/sapiens/seg/demo/data/face_reel/000085.jpg filter=lfs diff=lfs merge=lfs -text
409
+ submodule/sapiens/seg/demo/data/face_reel/000086.jpg filter=lfs diff=lfs merge=lfs -text
410
+ submodule/sapiens/seg/demo/data/face_reel/000087.jpg filter=lfs diff=lfs merge=lfs -text
411
+ submodule/sapiens/seg/demo/data/face_reel/000088.jpg filter=lfs diff=lfs merge=lfs -text
412
+ submodule/sapiens/seg/demo/data/face_reel/000089.jpg filter=lfs diff=lfs merge=lfs -text
413
+ submodule/sapiens/seg/demo/data/face_reel/000090.jpg filter=lfs diff=lfs merge=lfs -text
414
+ submodule/sapiens/seg/demo/data/face_reel/000091.jpg filter=lfs diff=lfs merge=lfs -text
415
+ submodule/sapiens/seg/demo/data/face_reel/000092.jpg filter=lfs diff=lfs merge=lfs -text
416
+ submodule/sapiens/seg/demo/data/face_reel/000093.jpg filter=lfs diff=lfs merge=lfs -text
417
+ submodule/sapiens/seg/demo/data/face_reel/000094.jpg filter=lfs diff=lfs merge=lfs -text
418
+ submodule/sapiens/seg/demo/data/face_reel/000095.jpg filter=lfs diff=lfs merge=lfs -text
419
+ submodule/sapiens/seg/demo/data/face_reel/000096.jpg filter=lfs diff=lfs merge=lfs -text
420
+ submodule/sapiens/seg/demo/data/face_reel/000097.jpg filter=lfs diff=lfs merge=lfs -text
421
+ submodule/sapiens/seg/demo/data/face_reel/000098.jpg filter=lfs diff=lfs merge=lfs -text
422
+ submodule/sapiens/seg/demo/data/face_reel/000099.jpg filter=lfs diff=lfs merge=lfs -text
423
+ submodule/sapiens/seg/demo/data/face_reel/000100.jpg filter=lfs diff=lfs merge=lfs -text
424
+ submodule/sapiens/seg/demo/data/face_reel/000101.jpg filter=lfs diff=lfs merge=lfs -text
425
+ submodule/sapiens/seg/demo/data/face_reel/000102.jpg filter=lfs diff=lfs merge=lfs -text
426
+ submodule/sapiens/seg/demo/data/face_reel/000103.jpg filter=lfs diff=lfs merge=lfs -text
427
+ submodule/sapiens/seg/demo/data/face_reel/000104.jpg filter=lfs diff=lfs merge=lfs -text
428
+ submodule/sapiens/seg/demo/data/face_reel/000105.jpg filter=lfs diff=lfs merge=lfs -text
429
+ submodule/sapiens/seg/demo/data/face_reel/000106.jpg filter=lfs diff=lfs merge=lfs -text
430
+ submodule/sapiens/seg/demo/data/face_reel/000107.jpg filter=lfs diff=lfs merge=lfs -text
431
+ submodule/sapiens/seg/demo/data/face_reel/000108.jpg filter=lfs diff=lfs merge=lfs -text
432
+ submodule/sapiens/seg/demo/data/face_reel/000109.jpg filter=lfs diff=lfs merge=lfs -text
433
+ submodule/sapiens/seg/demo/data/face_reel/000110.jpg filter=lfs diff=lfs merge=lfs -text
434
+ submodule/sapiens/seg/demo/data/face_reel/000111.jpg filter=lfs diff=lfs merge=lfs -text
435
+ submodule/sapiens/seg/demo/data/face_reel/000112.jpg filter=lfs diff=lfs merge=lfs -text
436
+ submodule/sapiens/seg/demo/data/face_reel/000113.jpg filter=lfs diff=lfs merge=lfs -text
437
+ submodule/sapiens/seg/demo/data/face_reel/000114.jpg filter=lfs diff=lfs merge=lfs -text
438
+ submodule/sapiens/seg/demo/data/face_reel/000115.jpg filter=lfs diff=lfs merge=lfs -text
439
+ submodule/sapiens/seg/demo/data/face_reel/000116.jpg filter=lfs diff=lfs merge=lfs -text
440
+ submodule/sapiens/seg/demo/data/face_reel/000117.jpg filter=lfs diff=lfs merge=lfs -text
441
+ submodule/sapiens/seg/demo/data/face_reel/000118.jpg filter=lfs diff=lfs merge=lfs -text
442
+ submodule/sapiens/seg/demo/data/face_reel/000119.jpg filter=lfs diff=lfs merge=lfs -text
443
+ submodule/sapiens/seg/demo/data/face_reel/000120.jpg filter=lfs diff=lfs merge=lfs -text
444
+ submodule/sapiens/seg/demo/data/face_reel/000121.jpg filter=lfs diff=lfs merge=lfs -text
445
+ submodule/sapiens/seg/demo/data/face_reel/000122.jpg filter=lfs diff=lfs merge=lfs -text
446
+ submodule/sapiens/seg/demo/data/face_reel/000123.jpg filter=lfs diff=lfs merge=lfs -text
447
+ submodule/sapiens/seg/demo/data/face_reel/000124.jpg filter=lfs diff=lfs merge=lfs -text
448
+ submodule/sapiens/seg/demo/data/face_reel/000125.jpg filter=lfs diff=lfs merge=lfs -text
449
+ submodule/sapiens/seg/demo/data/face_reel/000126.jpg filter=lfs diff=lfs merge=lfs -text
450
+ submodule/sapiens/seg/demo/data/face_reel/000127.jpg filter=lfs diff=lfs merge=lfs -text
451
+ submodule/sapiens/seg/demo/data/face_reel/000128.jpg filter=lfs diff=lfs merge=lfs -text
452
+ submodule/sapiens/seg/demo/data/face_reel/000129.jpg filter=lfs diff=lfs merge=lfs -text
453
+ submodule/sapiens/seg/demo/data/face_reel/000130.jpg filter=lfs diff=lfs merge=lfs -text
454
+ submodule/sapiens/seg/demo/data/face_reel/000131.jpg filter=lfs diff=lfs merge=lfs -text
455
+ submodule/sapiens/seg/demo/data/face_reel/000132.jpg filter=lfs diff=lfs merge=lfs -text
456
+ submodule/sapiens/seg/demo/data/face_reel/000133.jpg filter=lfs diff=lfs merge=lfs -text
457
+ submodule/sapiens/seg/demo/data/face_reel/000134.jpg filter=lfs diff=lfs merge=lfs -text
458
+ submodule/sapiens/seg/demo/data/face_reel/000135.jpg filter=lfs diff=lfs merge=lfs -text
459
+ submodule/sapiens/seg/demo/data/face_reel/000136.jpg filter=lfs diff=lfs merge=lfs -text
460
+ submodule/sapiens/seg/demo/data/face_reel/000137.jpg filter=lfs diff=lfs merge=lfs -text
461
+ submodule/sapiens/seg/demo/data/face_reel/000138.jpg filter=lfs diff=lfs merge=lfs -text
462
+ submodule/sapiens/seg/demo/data/face_reel/000139.jpg filter=lfs diff=lfs merge=lfs -text
463
+ submodule/sapiens/seg/demo/data/face_reel/000140.jpg filter=lfs diff=lfs merge=lfs -text
464
+ submodule/sapiens/seg/demo/data/face_reel/000141.jpg filter=lfs diff=lfs merge=lfs -text
465
+ submodule/sapiens/seg/demo/data/face_reel/000142.jpg filter=lfs diff=lfs merge=lfs -text
466
+ submodule/sapiens/seg/demo/data/face_reel/000143.jpg filter=lfs diff=lfs merge=lfs -text
467
+ submodule/sapiens/seg/demo/data/face_reel/000144.jpg filter=lfs diff=lfs merge=lfs -text
468
+ submodule/sapiens/seg/demo/data/face_reel/000145.jpg filter=lfs diff=lfs merge=lfs -text
469
+ submodule/sapiens/seg/demo/data/face_reel/000146.jpg filter=lfs diff=lfs merge=lfs -text
470
+ submodule/sapiens/seg/demo/data/face_reel/000147.jpg filter=lfs diff=lfs merge=lfs -text
471
+ submodule/sapiens/seg/demo/data/face_reel/000148.jpg filter=lfs diff=lfs merge=lfs -text
472
+ submodule/sapiens/seg/demo/data/face_reel/000149.jpg filter=lfs diff=lfs merge=lfs -text
473
+ submodule/sapiens/seg/demo/data/face_reel/000150.jpg filter=lfs diff=lfs merge=lfs -text
474
+ submodule/sapiens/seg/demo/data/face_reel/000151.jpg filter=lfs diff=lfs merge=lfs -text
475
+ submodule/sapiens/seg/demo/data/face_reel/000152.jpg filter=lfs diff=lfs merge=lfs -text
476
+ submodule/sapiens/seg/demo/data/face_reel/000153.jpg filter=lfs diff=lfs merge=lfs -text
477
+ submodule/sapiens/seg/demo/data/face_reel/000154.jpg filter=lfs diff=lfs merge=lfs -text
478
+ submodule/sapiens/seg/demo/data/face_reel/000155.jpg filter=lfs diff=lfs merge=lfs -text
479
+ submodule/sapiens/seg/demo/data/face_reel/000156.jpg filter=lfs diff=lfs merge=lfs -text
480
+ submodule/sapiens/seg/demo/data/face_reel/000157.jpg filter=lfs diff=lfs merge=lfs -text
481
+ submodule/sapiens/seg/demo/data/face_reel/000158.jpg filter=lfs diff=lfs merge=lfs -text
482
+ submodule/sapiens/seg/demo/data/face_reel/000159.jpg filter=lfs diff=lfs merge=lfs -text
483
+ submodule/sapiens/seg/demo/data/face_reel/000160.jpg filter=lfs diff=lfs merge=lfs -text
484
+ submodule/sapiens/seg/demo/data/face_reel/000161.jpg filter=lfs diff=lfs merge=lfs -text
485
+ submodule/sapiens/seg/demo/data/face_reel/000162.jpg filter=lfs diff=lfs merge=lfs -text
486
+ submodule/sapiens/seg/demo/data/face_reel/000163.jpg filter=lfs diff=lfs merge=lfs -text
487
+ submodule/sapiens/seg/demo/data/face_reel/000164.jpg filter=lfs diff=lfs merge=lfs -text
488
+ submodule/sapiens/seg/demo/data/face_reel/000165.jpg filter=lfs diff=lfs merge=lfs -text
489
+ submodule/sapiens/seg/demo/data/face_reel/000166.jpg filter=lfs diff=lfs merge=lfs -text
490
+ submodule/sapiens/seg/demo/data/face_reel/000167.jpg filter=lfs diff=lfs merge=lfs -text
491
+ submodule/sapiens/seg/demo/data/face_reel/000168.jpg filter=lfs diff=lfs merge=lfs -text
492
+ submodule/sapiens/seg/demo/data/face_reel/000169.jpg filter=lfs diff=lfs merge=lfs -text
493
+ submodule/sapiens/seg/demo/data/face_reel/000170.jpg filter=lfs diff=lfs merge=lfs -text
494
+ submodule/sapiens/seg/demo/data/face_reel/000171.jpg filter=lfs diff=lfs merge=lfs -text
495
+ submodule/sapiens/seg/demo/data/face_reel/000172.jpg filter=lfs diff=lfs merge=lfs -text
496
+ submodule/sapiens/seg/demo/data/face_reel/000173.jpg filter=lfs diff=lfs merge=lfs -text
497
+ submodule/sapiens/seg/demo/data/face_reel/000174.jpg filter=lfs diff=lfs merge=lfs -text
498
+ submodule/sapiens/seg/demo/data/face_reel/000175.jpg filter=lfs diff=lfs merge=lfs -text
499
+ submodule/sapiens/seg/demo/data/face_reel/000176.jpg filter=lfs diff=lfs merge=lfs -text
500
+ submodule/sapiens/seg/demo/data/face_reel/000177.jpg filter=lfs diff=lfs merge=lfs -text
501
+ submodule/sapiens/seg/demo/data/face_reel/000178.jpg filter=lfs diff=lfs merge=lfs -text
502
+ submodule/sapiens/seg/demo/data/face_reel/000179.jpg filter=lfs diff=lfs merge=lfs -text
503
+ submodule/sapiens/seg/demo/data/face_reel/000180.jpg filter=lfs diff=lfs merge=lfs -text
504
+ submodule/sapiens/seg/demo/data/face_reel/000181.jpg filter=lfs diff=lfs merge=lfs -text
505
+ submodule/sapiens/seg/demo/data/face_reel/000182.jpg filter=lfs diff=lfs merge=lfs -text
506
+ submodule/sapiens/seg/demo/data/face_reel/000183.jpg filter=lfs diff=lfs merge=lfs -text
507
+ submodule/sapiens/seg/demo/data/face_reel/000184.jpg filter=lfs diff=lfs merge=lfs -text
508
+ submodule/sapiens/seg/demo/data/face_reel/000185.jpg filter=lfs diff=lfs merge=lfs -text
509
+ submodule/sapiens/seg/demo/data/face_reel/000186.jpg filter=lfs diff=lfs merge=lfs -text
510
+ submodule/sapiens/seg/demo/data/face_reel/000187.jpg filter=lfs diff=lfs merge=lfs -text
511
+ submodule/sapiens/seg/demo/data/face_reel/000188.jpg filter=lfs diff=lfs merge=lfs -text
512
+ submodule/sapiens/seg/demo/data/face_reel/000189.jpg filter=lfs diff=lfs merge=lfs -text
513
+ submodule/sapiens/seg/demo/data/face_reel/000190.jpg filter=lfs diff=lfs merge=lfs -text
514
+ submodule/sapiens/seg/demo/data/face_reel/000191.jpg filter=lfs diff=lfs merge=lfs -text
515
+ submodule/sapiens/seg/demo/data/face_reel/000192.jpg filter=lfs diff=lfs merge=lfs -text
516
+ submodule/sapiens/seg/demo/data/face_reel/000193.jpg filter=lfs diff=lfs merge=lfs -text
517
+ submodule/sapiens/seg/demo/data/face_reel/000194.jpg filter=lfs diff=lfs merge=lfs -text
518
+ submodule/sapiens/seg/demo/data/face_reel/000195.jpg filter=lfs diff=lfs merge=lfs -text
519
+ submodule/sapiens/seg/demo/data/face_reel/000196.jpg filter=lfs diff=lfs merge=lfs -text
520
+ submodule/sapiens/seg/demo/data/face_reel/000197.jpg filter=lfs diff=lfs merge=lfs -text
521
+ submodule/sapiens/seg/demo/data/face_reel/000198.jpg filter=lfs diff=lfs merge=lfs -text
522
+ submodule/sapiens/seg/demo/data/face_reel/000199.jpg filter=lfs diff=lfs merge=lfs -text
submodule/gaussian-splatting/.gitmodules ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [submodule "submodules/simple-knn"]
2
+ path = submodules/simple-knn
3
+ url = https://gitlab.inria.fr/bkerbl/simple-knn.git
4
+ [submodule "submodules/diff-gaussian-rasterization"]
5
+ path = submodules/diff-gaussian-rasterization
6
+ url = https://github.com/graphdeco-inria/diff-gaussian-rasterization.git
7
+ branch = dr_aa
8
+ [submodule "SIBR_viewers"]
9
+ path = SIBR_viewers
10
+ url = https://gitlab.inria.fr/sibr/sibr_core.git
11
+ [submodule "submodules/fused-ssim"]
12
+ path = submodules/fused-ssim
13
+ url = https://github.com/rahul-goel/fused-ssim.git
submodule/gaussian-splatting/LICENSE.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Gaussian-Splatting License
2
+ ===========================
3
+
4
+ **Inria** and **the Max Planck Institut for Informatik (MPII)** hold all the ownership rights on the *Software* named **gaussian-splatting**.
5
+ The *Software* is in the process of being registered with the Agence pour la Protection des
6
+ Programmes (APP).
7
+
8
+ The *Software* is still being developed by the *Licensor*.
9
+
10
+ *Licensor*'s goal is to allow the research community to use, test and evaluate
11
+ the *Software*.
12
+
13
+ ## 1. Definitions
14
+
15
+ *Licensee* means any person or entity that uses the *Software* and distributes
16
+ its *Work*.
17
+
18
+ *Licensor* means the owners of the *Software*, i.e Inria and MPII
19
+
20
+ *Software* means the original work of authorship made available under this
21
+ License ie gaussian-splatting.
22
+
23
+ *Work* means the *Software* and any additions to or derivative works of the
24
+ *Software* that are made available under this License.
25
+
26
+
27
+ ## 2. Purpose
28
+ This license is intended to define the rights granted to the *Licensee* by
29
+ Licensors under the *Software*.
30
+
31
+ ## 3. Rights granted
32
+
33
+ For the above reasons Licensors have decided to distribute the *Software*.
34
+ Licensors grant non-exclusive rights to use the *Software* for research purposes
35
+ to research users (both academic and industrial), free of charge, without right
36
+ to sublicense.. The *Software* may be used "non-commercially", i.e., for research
37
+ and/or evaluation purposes only.
38
+
39
+ Subject to the terms and conditions of this License, you are granted a
40
+ non-exclusive, royalty-free, license to reproduce, prepare derivative works of,
41
+ publicly display, publicly perform and distribute its *Work* and any resulting
42
+ derivative works in any form.
43
+
44
+ ## 4. Limitations
45
+
46
+ **4.1 Redistribution.** You may reproduce or distribute the *Work* only if (a) you do
47
+ so under this License, (b) you include a complete copy of this License with
48
+ your distribution, and (c) you retain without modification any copyright,
49
+ patent, trademark, or attribution notices that are present in the *Work*.
50
+
51
+ **4.2 Derivative Works.** You may specify that additional or different terms apply
52
+ to the use, reproduction, and distribution of your derivative works of the *Work*
53
+ ("Your Terms") only if (a) Your Terms provide that the use limitation in
54
+ Section 2 applies to your derivative works, and (b) you identify the specific
55
+ derivative works that are subject to Your Terms. Notwithstanding Your Terms,
56
+ this License (including the redistribution requirements in Section 3.1) will
57
+ continue to apply to the *Work* itself.
58
+
59
+ **4.3** Any other use without of prior consent of Licensors is prohibited. Research
60
+ users explicitly acknowledge having received from Licensors all information
61
+ allowing to appreciate the adequacy between of the *Software* and their needs and
62
+ to undertake all necessary precautions for its execution and use.
63
+
64
+ **4.4** The *Software* is provided both as a compiled library file and as source
65
+ code. In case of using the *Software* for a publication or other results obtained
66
+ through the use of the *Software*, users are strongly encouraged to cite the
67
+ corresponding publications as explained in the documentation of the *Software*.
68
+
69
+ ## 5. Disclaimer
70
+
71
+ THE USER CANNOT USE, EXPLOIT OR DISTRIBUTE THE *SOFTWARE* FOR COMMERCIAL PURPOSES
72
+ WITHOUT PRIOR AND EXPLICIT CONSENT OF LICENSORS. YOU MUST CONTACT INRIA FOR ANY
73
+ UNAUTHORIZED USE: stip-sophia.transfert@inria.fr . ANY SUCH ACTION WILL
74
+ CONSTITUTE A FORGERY. THIS *SOFTWARE* IS PROVIDED "AS IS" WITHOUT ANY WARRANTIES
75
+ OF ANY NATURE AND ANY EXPRESS OR IMPLIED WARRANTIES, WITH REGARDS TO COMMERCIAL
76
+ USE, PROFESSIONNAL USE, LEGAL OR NOT, OR OTHER, OR COMMERCIALISATION OR
77
+ ADAPTATION. UNLESS EXPLICITLY PROVIDED BY LAW, IN NO EVENT, SHALL INRIA OR THE
78
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
79
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
80
+ GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION)
81
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
82
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING FROM, OUT OF OR
83
+ IN CONNECTION WITH THE *SOFTWARE* OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE*.
84
+
85
+ ## 6. Files subject to permissive licenses
86
+ The contents of the file ```utils/loss_utils.py``` are based on publicly available code authored by Evan Su, which falls under the permissive MIT license.
87
+
88
+ Title: pytorch-ssim\
89
+ Project code: https://github.com/Po-Hsun-Su/pytorch-ssim\
90
+ Copyright Evan Su, 2017\
91
+ License: https://github.com/Po-Hsun-Su/pytorch-ssim/blob/master/LICENSE.txt (MIT)
submodule/gaussian-splatting/README.md ADDED
@@ -0,0 +1,615 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 3D Gaussian Splatting for Real-Time Radiance Field Rendering
2
+ Bernhard Kerbl*, Georgios Kopanas*, Thomas Leimkühler, George Drettakis (* indicates equal contribution)<br>
3
+ | [Webpage](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/) | [Full Paper](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/3d_gaussian_splatting_high.pdf) | [Video](https://youtu.be/T_kXY43VZnk) | [Other GRAPHDECO Publications](http://www-sop.inria.fr/reves/publis/gdindex.php) | [FUNGRAPH project page](https://fungraph.inria.fr) |<br>
4
+ | [T&T+DB COLMAP (650MB)](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/datasets/input/tandt_db.zip) | [Pre-trained Models (14 GB)](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/datasets/pretrained/models.zip) | [Viewers for Windows (60MB)](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/binaries/viewers.zip) | [Evaluation Images (7 GB)](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/evaluation/images.zip) |<br>
5
+ ![Teaser image](assets/teaser.png)
6
+
7
+ This repository contains the official authors implementation associated with the paper "3D Gaussian Splatting for Real-Time Radiance Field Rendering", which can be found [here](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/). We further provide the reference images used to create the error metrics reported in the paper, as well as recently created, pre-trained models.
8
+
9
+ <a href="https://www.inria.fr/"><img height="100" src="assets/logo_inria.png"> </a>
10
+ <a href="https://univ-cotedazur.eu/"><img height="100" src="assets/logo_uca.png"> </a>
11
+ <a href="https://www.mpi-inf.mpg.de"><img height="100" src="assets/logo_mpi.png"> </a>
12
+ <a href="https://team.inria.fr/graphdeco/"> <img style="width:100%;" src="assets/logo_graphdeco.png"></a>
13
+
14
+ Abstract: *Radiance Field methods have recently revolutionized novel-view synthesis of scenes captured with multiple photos or videos. However, achieving high visual quality still requires neural networks that are costly to train and render, while recent faster methods inevitably trade off speed for quality. For unbounded and complete scenes (rather than isolated objects) and 1080p resolution rendering, no current method can achieve real-time display rates. We introduce three key elements that allow us to achieve state-of-the-art visual quality while maintaining competitive training times and importantly allow high-quality real-time (≥ 30 fps) novel-view synthesis at 1080p resolution. First, starting from sparse points produced during camera calibration, we represent the scene with 3D Gaussians that preserve desirable properties of continuous volumetric radiance fields for scene optimization while avoiding unnecessary computation in empty space; Second, we perform interleaved optimization/density control of the 3D Gaussians, notably optimizing anisotropic covariance to achieve an accurate representation of the scene; Third, we develop a fast visibility-aware rendering algorithm that supports anisotropic splatting and both accelerates training and allows realtime rendering. We demonstrate state-of-the-art visual quality and real-time rendering on several established datasets.*
15
+
16
+ <section class="section" id="BibTeX">
17
+ <div class="container is-max-desktop content">
18
+ <h2 class="title">BibTeX</h2>
19
+ <pre><code>@Article{kerbl3Dgaussians,
20
+ author = {Kerbl, Bernhard and Kopanas, Georgios and Leimk{\"u}hler, Thomas and Drettakis, George},
21
+ title = {3D Gaussian Splatting for Real-Time Radiance Field Rendering},
22
+ journal = {ACM Transactions on Graphics},
23
+ number = {4},
24
+ volume = {42},
25
+ month = {July},
26
+ year = {2023},
27
+ url = {https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/}
28
+ }</code></pre>
29
+ </div>
30
+ </section>
31
+
32
+
33
+
34
+ ## Funding and Acknowledgments
35
+
36
+ This research was funded by the ERC Advanced grant FUNGRAPH No 788065. The authors are grateful to Adobe for generous donations, the OPAL infrastructure from Université Côte d’Azur and for the HPC resources from GENCI–IDRIS (Grant 2022-AD011013409). The authors thank the anonymous reviewers for their valuable feedback, P. Hedman and A. Tewari for proofreading earlier drafts also T. Müller, A. Yu and S. Fridovich-Keil for helping with the comparisons.
37
+
38
+ ## NEW FEATURES !
39
+
40
+ We have limited resources for maintaining and updating the code. However, we have added a few new features since the original release that are inspired by some of the excellent work many other researchers have been doing on 3DGS. We will be adding other features within the ability of our resources.
41
+
42
+ **Update of October 2024**: We integrated [training speed acceleration](#training-speed-acceleration) and made it compatible with [depth regularization](#depth-regularization), [anti-aliasing](#anti-aliasing) and [exposure compensation](#exposure-compensation). We have enhanced the SIBR real time viewer by correcting bugs and adding features in the [Top View](#sibr-top-view) that allows visualization of input and user cameras.
43
+
44
+ **Update of Spring 2024**:
45
+ Orange Labs has kindly added [OpenXR support](#openxr-support) for VR viewing.
46
+
47
+ ## Step-by-step Tutorial
48
+
49
+ Jonathan Stephens made a fantastic step-by-step tutorial for setting up Gaussian Splatting on your machine, along with instructions for creating usable datasets from videos. If the instructions below are too dry for you, go ahead and check it out [here](https://www.youtube.com/watch?v=UXtuigy_wYc).
50
+
51
+ ## Colab
52
+
53
+ User [camenduru](https://github.com/camenduru) was kind enough to provide a Colab template that uses this repo's source (status: August 2023!) for quick and easy access to the method. Please check it out [here](https://github.com/camenduru/gaussian-splatting-colab).
54
+
55
+ ## Cloning the Repository
56
+
57
+ The repository contains submodules, thus please check it out with
58
+ ```shell
59
+ # SSH
60
+ git clone git@github.com:graphdeco-inria/gaussian-splatting.git --recursive
61
+ ```
62
+ or
63
+ ```shell
64
+ # HTTPS
65
+ git clone https://github.com/graphdeco-inria/gaussian-splatting --recursive
66
+ ```
67
+
68
+ ## Overview
69
+
70
+ The codebase has 4 main components:
71
+ - A PyTorch-based optimizer to produce a 3D Gaussian model from SfM inputs
72
+ - A network viewer that allows to connect to and visualize the optimization process
73
+ - An OpenGL-based real-time viewer to render trained models in real-time.
74
+ - A script to help you turn your own images into optimization-ready SfM data sets
75
+
76
+ The components have different requirements w.r.t. both hardware and software. They have been tested on Windows 10 and Ubuntu Linux 22.04. Instructions for setting up and running each of them are found in the sections below.
77
+
78
+
79
+
80
+
81
+ ## Optimizer
82
+
83
+ The optimizer uses PyTorch and CUDA extensions in a Python environment to produce trained models.
84
+
85
+ ### Hardware Requirements
86
+
87
+ - CUDA-ready GPU with Compute Capability 7.0+
88
+ - 24 GB VRAM (to train to paper evaluation quality)
89
+ - Please see FAQ for smaller VRAM configurations
90
+
91
+ ### Software Requirements
92
+ - Conda (recommended for easy setup)
93
+ - C++ Compiler for PyTorch extensions (we used Visual Studio 2019 for Windows)
94
+ - CUDA SDK 11 for PyTorch extensions, install *after* Visual Studio (we used 11.8, **known issues with 11.6**)
95
+ - C++ Compiler and CUDA SDK must be compatible
96
+
97
+ ### Setup
98
+
99
+ #### Local Setup
100
+
101
+ Our default, provided install method is based on Conda package and environment management:
102
+ ```shell
103
+ SET DISTUTILS_USE_SDK=1 # Windows only
104
+ conda env create --file environment.yml
105
+ conda activate gaussian_splatting
106
+ ```
107
+ Please note that this process assumes that you have CUDA SDK **11** installed, not **12**. For modifications, see below.
108
+
109
+ Tip: Downloading packages and creating a new environment with Conda can require a significant amount of disk space. By default, Conda will use the main system hard drive. You can avoid this by specifying a different package download location and an environment on a different drive:
110
+
111
+ ```shell
112
+ conda config --add pkgs_dirs <Drive>/<pkg_path>
113
+ conda env create --file environment.yml --prefix <Drive>/<env_path>/gaussian_splatting
114
+ conda activate <Drive>/<env_path>/gaussian_splatting
115
+ ```
116
+
117
+ #### Modifications
118
+
119
+ If you can afford the disk space, we recommend using our environment files for setting up a training environment identical to ours. If you want to make modifications, please note that major version changes might affect the results of our method. However, our (limited) experiments suggest that the codebase works just fine inside a more up-to-date environment (Python 3.8, PyTorch 2.0.0, CUDA 12). Make sure to create an environment where PyTorch and its CUDA runtime version match and the installed CUDA SDK has no major version difference with PyTorch's CUDA version.
120
+
121
+ #### Known Issues
122
+
123
+ Some users experience problems building the submodules on Windows (```cl.exe: File not found``` or similar). Please consider the workaround for this problem from the FAQ.
124
+
125
+ ### Running
126
+
127
+ To run the optimizer, simply use
128
+
129
+ ```shell
130
+ python train.py -s <path to COLMAP or NeRF Synthetic dataset>
131
+ ```
132
+
133
+ <details>
134
+ <summary><span style="font-weight: bold;">Command Line Arguments for train.py</span></summary>
135
+
136
+ #### --source_path / -s
137
+ Path to the source directory containing a COLMAP or Synthetic NeRF data set.
138
+ #### --model_path / -m
139
+ Path where the trained model should be stored (```output/<random>``` by default).
140
+ #### --images / -i
141
+ Alternative subdirectory for COLMAP images (```images``` by default).
142
+ #### --eval
143
+ Add this flag to use a MipNeRF360-style training/test split for evaluation.
144
+ #### --resolution / -r
145
+ Specifies resolution of the loaded images before training. If provided ```1, 2, 4``` or ```8```, uses original, 1/2, 1/4 or 1/8 resolution, respectively. For all other values, rescales the width to the given number while maintaining image aspect. **If not set and input image width exceeds 1.6K pixels, inputs are automatically rescaled to this target.**
146
+ #### --data_device
147
+ Specifies where to put the source image data, ```cuda``` by default, recommended to use ```cpu``` if training on large/high-resolution dataset, will reduce VRAM consumption, but slightly slow down training. Thanks to [HrsPythonix](https://github.com/HrsPythonix).
148
+ #### --white_background / -w
149
+ Add this flag to use white background instead of black (default), e.g., for evaluation of NeRF Synthetic dataset.
150
+ #### --sh_degree
151
+ Order of spherical harmonics to be used (no larger than 3). ```3``` by default.
152
+ #### --convert_SHs_python
153
+ Flag to make pipeline compute forward and backward of SHs with PyTorch instead of ours.
154
+ #### --convert_cov3D_python
155
+ Flag to make pipeline compute forward and backward of the 3D covariance with PyTorch instead of ours.
156
+ #### --debug
157
+ Enables debug mode if you experience erros. If the rasterizer fails, a ```dump``` file is created that you may forward to us in an issue so we can take a look.
158
+ #### --debug_from
159
+ Debugging is **slow**. You may specify an iteration (starting from 0) after which the above debugging becomes active.
160
+ #### --iterations
161
+ Number of total iterations to train for, ```30_000``` by default.
162
+ #### --ip
163
+ IP to start GUI server on, ```127.0.0.1``` by default.
164
+ #### --port
165
+ Port to use for GUI server, ```6009``` by default.
166
+ #### --test_iterations
167
+ Space-separated iterations at which the training script computes L1 and PSNR over test set, ```7000 30000``` by default.
168
+ #### --save_iterations
169
+ Space-separated iterations at which the training script saves the Gaussian model, ```7000 30000 <iterations>``` by default.
170
+ #### --checkpoint_iterations
171
+ Space-separated iterations at which to store a checkpoint for continuing later, saved in the model directory.
172
+ #### --start_checkpoint
173
+ Path to a saved checkpoint to continue training from.
174
+ #### --quiet
175
+ Flag to omit any text written to standard out pipe.
176
+ #### --feature_lr
177
+ Spherical harmonics features learning rate, ```0.0025``` by default.
178
+ #### --opacity_lr
179
+ Opacity learning rate, ```0.05``` by default.
180
+ #### --scaling_lr
181
+ Scaling learning rate, ```0.005``` by default.
182
+ #### --rotation_lr
183
+ Rotation learning rate, ```0.001``` by default.
184
+ #### --position_lr_max_steps
185
+ Number of steps (from 0) where position learning rate goes from ```initial``` to ```final```. ```30_000``` by default.
186
+ #### --position_lr_init
187
+ Initial 3D position learning rate, ```0.00016``` by default.
188
+ #### --position_lr_final
189
+ Final 3D position learning rate, ```0.0000016``` by default.
190
+ #### --position_lr_delay_mult
191
+ Position learning rate multiplier (cf. Plenoxels), ```0.01``` by default.
192
+ #### --densify_from_iter
193
+ Iteration where densification starts, ```500``` by default.
194
+ #### --densify_until_iter
195
+ Iteration where densification stops, ```15_000``` by default.
196
+ #### --densify_grad_threshold
197
+ Limit that decides if points should be densified based on 2D position gradient, ```0.0002``` by default.
198
+ #### --densification_interval
199
+ How frequently to densify, ```100``` (every 100 iterations) by default.
200
+ #### --opacity_reset_interval
201
+ How frequently to reset opacity, ```3_000``` by default.
202
+ #### --lambda_dssim
203
+ Influence of SSIM on total loss from 0 to 1, ```0.2``` by default.
204
+ #### --percent_dense
205
+ Percentage of scene extent (0--1) a point must exceed to be forcibly densified, ```0.01``` by default.
206
+
207
+ </details>
208
+ <br>
209
+
210
+ Note that similar to MipNeRF360, we target images at resolutions in the 1-1.6K pixel range. For convenience, arbitrary-size inputs can be passed and will be automatically resized if their width exceeds 1600 pixels. We recommend to keep this behavior, but you may force training to use your higher-resolution images by setting ```-r 1```.
211
+
212
+ The MipNeRF360 scenes are hosted by the paper authors [here](https://jonbarron.info/mipnerf360/). You can find our SfM data sets for Tanks&Temples and Deep Blending [here](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/datasets/input/tandt_db.zip). If you do not provide an output model directory (```-m```), trained models are written to folders with randomized unique names inside the ```output``` directory. At this point, the trained models may be viewed with the real-time viewer (see further below).
213
+
214
+ ### Evaluation
215
+ By default, the trained models use all available images in the dataset. To train them while withholding a test set for evaluation, use the ```--eval``` flag. This way, you can render training/test sets and produce error metrics as follows:
216
+ ```shell
217
+ python train.py -s <path to COLMAP or NeRF Synthetic dataset> --eval # Train with train/test split
218
+ python render.py -m <path to trained model> # Generate renderings
219
+ python metrics.py -m <path to trained model> # Compute error metrics on renderings
220
+ ```
221
+
222
+ If you want to evaluate our [pre-trained models](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/datasets/pretrained/models.zip), you will have to download the corresponding source data sets and indicate their location to ```render.py``` with an additional ```--source_path/-s``` flag. Note: The pre-trained models were created with the release codebase. This code base has been cleaned up and includes bugfixes, hence the metrics you get from evaluating them will differ from those in the paper.
223
+ ```shell
224
+ python render.py -m <path to pre-trained model> -s <path to COLMAP dataset>
225
+ python metrics.py -m <path to pre-trained model>
226
+ ```
227
+
228
+ <details>
229
+ <summary><span style="font-weight: bold;">Command Line Arguments for render.py</span></summary>
230
+
231
+ #### --model_path / -m
232
+ Path to the trained model directory you want to create renderings for.
233
+ #### --skip_train
234
+ Flag to skip rendering the training set.
235
+ #### --skip_test
236
+ Flag to skip rendering the test set.
237
+ #### --quiet
238
+ Flag to omit any text written to standard out pipe.
239
+
240
+ **The below parameters will be read automatically from the model path, based on what was used for training. However, you may override them by providing them explicitly on the command line.**
241
+
242
+ #### --source_path / -s
243
+ Path to the source directory containing a COLMAP or Synthetic NeRF data set.
244
+ #### --images / -i
245
+ Alternative subdirectory for COLMAP images (```images``` by default).
246
+ #### --eval
247
+ Add this flag to use a MipNeRF360-style training/test split for evaluation.
248
+ #### --resolution / -r
249
+ Changes the resolution of the loaded images before training. If provided ```1, 2, 4``` or ```8```, uses original, 1/2, 1/4 or 1/8 resolution, respectively. For all other values, rescales the width to the given number while maintaining image aspect. ```1``` by default.
250
+ #### --white_background / -w
251
+ Add this flag to use white background instead of black (default), e.g., for evaluation of NeRF Synthetic dataset.
252
+ #### --convert_SHs_python
253
+ Flag to make pipeline render with computed SHs from PyTorch instead of ours.
254
+ #### --convert_cov3D_python
255
+ Flag to make pipeline render with computed 3D covariance from PyTorch instead of ours.
256
+
257
+ </details>
258
+
259
+ <details>
260
+ <summary><span style="font-weight: bold;">Command Line Arguments for metrics.py</span></summary>
261
+
262
+ #### --model_paths / -m
263
+ Space-separated list of model paths for which metrics should be computed.
264
+ </details>
265
+ <br>
266
+
267
+ We further provide the ```full_eval.py``` script. This script specifies the routine used in our evaluation and demonstrates the use of some additional parameters, e.g., ```--images (-i)``` to define alternative image directories within COLMAP data sets. If you have downloaded and extracted all the training data, you can run it like this:
268
+ ```shell
269
+ python full_eval.py -m360 <mipnerf360 folder> -tat <tanks and temples folder> -db <deep blending folder>
270
+ ```
271
+ In the current version, this process takes about 7h on our reference machine containing an A6000. If you want to do the full evaluation on our pre-trained models, you can specify their download location and skip training.
272
+ ```shell
273
+ python full_eval.py -o <directory with pretrained models> --skip_training -m360 <mipnerf360 folder> -tat <tanks and temples folder> -db <deep blending folder>
274
+ ```
275
+
276
+ If you want to compute the metrics on our paper's [evaluation images](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/evaluation/images.zip), you can also skip rendering. In this case it is not necessary to provide the source datasets. You can compute metrics for multiple image sets at a time.
277
+ ```shell
278
+ python full_eval.py -m <directory with evaluation images>/garden ... --skip_training --skip_rendering
279
+ ```
280
+
281
+ <details>
282
+ <summary><span style="font-weight: bold;">Command Line Arguments for full_eval.py</span></summary>
283
+
284
+ #### --skip_training
285
+ Flag to skip training stage.
286
+ #### --skip_rendering
287
+ Flag to skip rendering stage.
288
+ #### --skip_metrics
289
+ Flag to skip metrics calculation stage.
290
+ #### --output_path
291
+ Directory to put renderings and results in, ```./eval``` by default, set to pre-trained model location if evaluating them.
292
+ #### --mipnerf360 / -m360
293
+ Path to MipNeRF360 source datasets, required if training or rendering.
294
+ #### --tanksandtemples / -tat
295
+ Path to Tanks&Temples source datasets, required if training or rendering.
296
+ #### --deepblending / -db
297
+ Path to Deep Blending source datasets, required if training or rendering.
298
+ </details>
299
+ <br>
300
+
301
+ ## Interactive Viewers
302
+ We provide two interactive viewers for our method: remote and real-time. Our viewing solutions are based on the [SIBR](https://sibr.gitlabpages.inria.fr/) framework, developed by the GRAPHDECO group for several novel-view synthesis projects.
303
+
304
+ ### Hardware Requirements
305
+ - OpenGL 4.5-ready GPU and drivers (or latest MESA software)
306
+ - 4 GB VRAM recommended
307
+ - CUDA-ready GPU with Compute Capability 7.0+ (only for Real-Time Viewer)
308
+
309
+ ### Software Requirements
310
+ - Visual Studio or g++, **not Clang** (we used Visual Studio 2019 for Windows)
311
+ - CUDA SDK 11, install *after* Visual Studio (we used 11.8)
312
+ - CMake (recent version, we used 3.24)
313
+ - 7zip (only on Windows)
314
+
315
+ ### Pre-built Windows Binaries
316
+ We provide pre-built binaries for Windows [here](https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/binaries/viewers.zip). We recommend using them on Windows for an efficient setup, since the building of SIBR involves several external dependencies that must be downloaded and compiled on-the-fly.
317
+
318
+ ### Installation from Source
319
+ If you cloned with submodules (e.g., using ```--recursive```), the source code for the viewers is found in ```SIBR_viewers```. The network viewer runs within the SIBR framework for Image-based Rendering applications.
320
+
321
+ #### Windows
322
+ CMake should take care of your dependencies.
323
+ ```shell
324
+ cd SIBR_viewers
325
+ cmake -Bbuild .
326
+ cmake --build build --target install --config RelWithDebInfo
327
+ ```
328
+ You may specify a different configuration, e.g. ```Debug``` if you need more control during development.
329
+
330
+ #### Ubuntu 22.04
331
+ You will need to install a few dependencies before running the project setup.
332
+ ```shell
333
+ # Dependencies
334
+ sudo apt install -y libglew-dev libassimp-dev libboost-all-dev libgtk-3-dev libopencv-dev libglfw3-dev libavdevice-dev libavcodec-dev libeigen3-dev libxxf86vm-dev libembree-dev
335
+ # Project setup
336
+ cd SIBR_viewers
337
+ cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release # add -G Ninja to build faster
338
+ cmake --build build -j24 --target install
339
+ ```
340
+
341
+ #### Ubuntu 20.04
342
+ Backwards compatibility with Focal Fossa is not fully tested, but building SIBR with CMake should still work after invoking
343
+ ```shell
344
+ git checkout fossa_compatibility
345
+ ```
346
+
347
+ ### Navigation in SIBR Viewers
348
+ The SIBR interface provides several methods of navigating the scene. By default, you will be started with an FPS navigator, which you can control with ```W, A, S, D, Q, E``` for camera translation and ```I, K, J, L, U, O``` for rotation. Alternatively, you may want to use a Trackball-style navigator (select from the floating menu). You can also snap to a camera from the data set with the ```Snap to``` button or find the closest camera with ```Snap to closest```. The floating menues also allow you to change the navigation speed. You can use the ```Scaling Modifier``` to control the size of the displayed Gaussians, or show the initial point cloud.
349
+
350
+ ### Running the Network Viewer
351
+
352
+
353
+
354
+ https://github.com/graphdeco-inria/gaussian-splatting/assets/40643808/90a2e4d3-cf2e-4633-b35f-bfe284e28ff7
355
+
356
+
357
+
358
+ After extracting or installing the viewers, you may run the compiled ```SIBR_remoteGaussian_app[_config]``` app in ```<SIBR install dir>/bin```, e.g.:
359
+ ```shell
360
+ ./<SIBR install dir>/bin/SIBR_remoteGaussian_app
361
+ ```
362
+ The network viewer allows you to connect to a running training process on the same or a different machine. If you are training on the same machine and OS, no command line parameters should be required: the optimizer communicates the location of the training data to the network viewer. By default, optimizer and network viewer will try to establish a connection on **localhost** on port **6009**. You can change this behavior by providing matching ```--ip``` and ```--port``` parameters to both the optimizer and the network viewer. If for some reason the path used by the optimizer to find the training data is not reachable by the network viewer (e.g., due to them running on different (virtual) machines), you may specify an override location to the viewer by using ```-s <source path>```.
363
+
364
+ <details>
365
+ <summary><span style="font-weight: bold;">Primary Command Line Arguments for Network Viewer</span></summary>
366
+
367
+ #### --path / -s
368
+ Argument to override model's path to source dataset.
369
+ #### --ip
370
+ IP to use for connection to a running training script.
371
+ #### --port
372
+ Port to use for connection to a running training script.
373
+ #### --rendering-size
374
+ Takes two space separated numbers to define the resolution at which network rendering occurs, ```1200``` width by default.
375
+ Note that to enforce an aspect that differs from the input images, you need ```--force-aspect-ratio``` too.
376
+ #### --load_images
377
+ Flag to load source dataset images to be displayed in the top view for each camera.
378
+ </details>
379
+ <br>
380
+
381
+ ### Running the Real-Time Viewer
382
+
383
+
384
+
385
+
386
+ https://github.com/graphdeco-inria/gaussian-splatting/assets/40643808/0940547f-1d82-4c2f-a616-44eabbf0f816
387
+
388
+
389
+
390
+
391
+ After extracting or installing the viewers, you may run the compiled ```SIBR_gaussianViewer_app[_config]``` app in ```<SIBR install dir>/bin```, e.g.:
392
+ ```shell
393
+ ./<SIBR install dir>/bin/SIBR_gaussianViewer_app -m <path to trained model>
394
+ ```
395
+
396
+ It should suffice to provide the ```-m``` parameter pointing to a trained model directory. Alternatively, you can specify an override location for training input data using ```-s```. To use a specific resolution other than the auto-chosen one, specify ```--rendering-size <width> <height>```. Combine it with ```--force-aspect-ratio``` if you want the exact resolution and don't mind image distortion.
397
+
398
+ **To unlock the full frame rate, please disable V-Sync on your machine and also in the application (Menu &rarr; Display). In a multi-GPU system (e.g., laptop) your OpenGL/Display GPU should be the same as your CUDA GPU (e.g., by setting the application's GPU preference on Windows, see below) for maximum performance.**
399
+
400
+ ![Teaser image](assets/select.png)
401
+
402
+ In addition to the initial point cloud and the splats, you also have the option to visualize the Gaussians by rendering them as ellipsoids from the floating menu.
403
+ SIBR has many other functionalities, please see the [documentation](https://sibr.gitlabpages.inria.fr/) for more details on the viewer, navigation options etc. There is also a Top View (available from the menu) that shows the placement of the input cameras and the original SfM point cloud; please note that Top View slows rendering when enabled. The real-time viewer also uses slightly more aggressive, fast culling, which can be toggled in the floating menu. If you ever encounter an issue that can be solved by turning fast culling off, please let us know.
404
+
405
+ <details>
406
+ <summary><span style="font-weight: bold;">Primary Command Line Arguments for Real-Time Viewer</span></summary>
407
+
408
+ #### --model-path / -m
409
+ Path to trained model.
410
+ #### --iteration
411
+ Specifies which of state to load if multiple are available. Defaults to latest available iteration.
412
+ #### --path / -s
413
+ Argument to override model's path to source dataset.
414
+ #### --rendering-size
415
+ Takes two space separated numbers to define the resolution at which real-time rendering occurs, ```1200``` width by default. Note that to enforce an aspect that differs from the input images, you need ```--force-aspect-ratio``` too.
416
+ #### --load_images
417
+ Flag to load source dataset images to be displayed in the top view for each camera.
418
+ #### --device
419
+ Index of CUDA device to use for rasterization if multiple are available, ```0``` by default.
420
+ #### --no_interop
421
+ Disables CUDA/GL interop forcibly. Use on systems that may not behave according to spec (e.g., WSL2 with MESA GL 4.5 software rendering).
422
+ </details>
423
+ <br>
424
+
425
+ ## Processing your own Scenes
426
+
427
+ Our COLMAP loaders expect the following dataset structure in the source path location:
428
+
429
+ ```
430
+ <location>
431
+ |---images
432
+ | |---<image 0>
433
+ | |---<image 1>
434
+ | |---...
435
+ |---sparse
436
+ |---0
437
+ |---cameras.bin
438
+ |---images.bin
439
+ |---points3D.bin
440
+ ```
441
+
442
+ For rasterization, the camera models must be either a SIMPLE_PINHOLE or PINHOLE camera. We provide a converter script ```convert.py```, to extract undistorted images and SfM information from input images. Optionally, you can use ImageMagick to resize the undistorted images. This rescaling is similar to MipNeRF360, i.e., it creates images with 1/2, 1/4 and 1/8 the original resolution in corresponding folders. To use them, please first install a recent version of COLMAP (ideally CUDA-powered) and ImageMagick. Put the images you want to use in a directory ```<location>/input```.
443
+ ```
444
+ <location>
445
+ |---input
446
+ |---<image 0>
447
+ |---<image 1>
448
+ |---...
449
+ ```
450
+ If you have COLMAP and ImageMagick on your system path, you can simply run
451
+ ```shell
452
+ python convert.py -s <location> [--resize] #If not resizing, ImageMagick is not needed
453
+ ```
454
+ Alternatively, you can use the optional parameters ```--colmap_executable``` and ```--magick_executable``` to point to the respective paths. Please note that on Windows, the executable should point to the COLMAP ```.bat``` file that takes care of setting the execution environment. Once done, ```<location>``` will contain the expected COLMAP data set structure with undistorted, resized input images, in addition to your original images and some temporary (distorted) data in the directory ```distorted```.
455
+
456
+ If you have your own COLMAP dataset without undistortion (e.g., using ```OPENCV``` camera), you can try to just run the last part of the script: Put the images in ```input``` and the COLMAP info in a subdirectory ```distorted```:
457
+ ```
458
+ <location>
459
+ |---input
460
+ | |---<image 0>
461
+ | |---<image 1>
462
+ | |---...
463
+ |---distorted
464
+ |---database.db
465
+ |---sparse
466
+ |---0
467
+ |---...
468
+ ```
469
+ Then run
470
+ ```shell
471
+ python convert.py -s <location> --skip_matching [--resize] #If not resizing, ImageMagick is not needed
472
+ ```
473
+
474
+ <details>
475
+ <summary><span style="font-weight: bold;">Command Line Arguments for convert.py</span></summary>
476
+
477
+ #### --no_gpu
478
+ Flag to avoid using GPU in COLMAP.
479
+ #### --skip_matching
480
+ Flag to indicate that COLMAP info is available for images.
481
+ #### --source_path / -s
482
+ Location of the inputs.
483
+ #### --camera
484
+ Which camera model to use for the early matching steps, ```OPENCV``` by default.
485
+ #### --resize
486
+ Flag for creating resized versions of input images.
487
+ #### --colmap_executable
488
+ Path to the COLMAP executable (```.bat``` on Windows).
489
+ #### --magick_executable
490
+ Path to the ImageMagick executable.
491
+ </details>
492
+ <br>
493
+
494
+ ### Training speed acceleration
495
+
496
+ We integrated the drop-in replacements from [Taming-3dgs](https://humansensinglab.github.io/taming-3dgs/)<sup>1</sup> with [fused ssim](https://github.com/rahul-goel/fused-ssim/tree/main) into the original codebase to speed up training times. Once installed, the accelerated rasterizer delivers a **$\times$ 1.6 training time speedup** using `--optimizer_type default` and a **$\times$ 2.7 training time speedup** using `--optimizer_type sparse_adam`.
497
+
498
+ To get faster training times you must first install the accelerated rasterizer to your environment:
499
+
500
+ ```bash
501
+ pip uninstall diff-gaussian-rasterization -y
502
+ cd submodules/diff-gaussian-rasterization
503
+ rm -r build
504
+ git checkout 3dgs_accel
505
+ pip install .
506
+ ```
507
+
508
+ Then you can add the following parameter to use the sparse adam optimizer when running `train.py`:
509
+
510
+ ```bash
511
+ --optimizer_type sparse_adam
512
+ ```
513
+
514
+ *Note that this custom rasterizer has a different behaviour than the original version, for more details on training times please see [stats for training times](results.md/#training-times-comparisons)*.
515
+
516
+ *1. Mallick and Goel, et al. ‘Taming 3DGS: High-Quality Radiance Fields with Limited Resources’. SIGGRAPH Asia 2024 Conference Papers, 2024, https://doi.org/10.1145/3680528.3687694, [github](https://github.com/humansensinglab/taming-3dgs)*
517
+
518
+
519
+ ### Depth regularization
520
+
521
+ To have better reconstructed scenes we use depth maps as priors during optimization with each input images. It works best on untextured parts ex: roads and can remove floaters. Several papers have used similar ideas to improve various aspects of 3DGS; (e.g. [DepthRegularizedGS](https://robot0321.github.io/DepthRegGS/index.html), [SparseGS](https://formycat.github.io/SparseGS-Real-Time-360-Sparse-View-Synthesis-using-Gaussian-Splatting/), [DNGaussian](https://fictionarry.github.io/DNGaussian/)). The depth regularization we integrated is that used in our [Hierarchical 3DGS](https://repo-sam.inria.fr/fungraph/hierarchical-3d-gaussians/) paper, but applied to the original 3DGS; for some scenes (e.g., the DeepBlending scenes) it improves quality significantly; for others it either makes a small difference or can even be worse. For example results showing the potential benefit and statistics on quality please see here: [Stats for depth regularization](results.md).
522
+
523
+ When training on a synthetic dataset, depth maps can be produced and they do not require further processing to be used in our method.
524
+
525
+ For real world datasets depth maps should be generated for each input images, to generate them please do the following:
526
+ 1. Clone [Depth Anything v2](https://github.com/DepthAnything/Depth-Anything-V2?tab=readme-ov-file#usage):
527
+ ```
528
+ git clone https://github.com/DepthAnything/Depth-Anything-V2.git
529
+ ```
530
+ 2. Download weights from [Depth-Anything-V2-Large](https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth?download=true) and place it under `Depth-Anything-V2/checkpoints/`
531
+ 3. Generate depth maps:
532
+ ```
533
+ python Depth-Anything-V2/run.py --encoder vitl --pred-only --grayscale --img-path <path to input images> --outdir <output path>
534
+ ```
535
+ 5. Generate a `depth_params.json` file using:
536
+ ```
537
+ python utils/make_depth_scale.py --base_dir <path to colmap> --depths_dir <path to generated depths>
538
+ ```
539
+
540
+ A new parameter should be set when training if you want to use depth regularization `-d <path to depth maps>`.
541
+
542
+ ### Exposure compensation
543
+ To compensate for exposure changes in the different input images we optimize an affine transformation for each image just as in [Hierarchical 3dgs](https://repo-sam.inria.fr/fungraph/hierarchical-3d-gaussians/).
544
+
545
+ This can greatly improve reconstruction results for "in the wild" captures, e.g., with a smartphone when the exposure setting of the camera is not fixed. For example results showing the potential benefit and statistics on quality please see here: [Stats for exposure compensation](results.md).
546
+
547
+ Add the following parameters to enable it:
548
+ ```
549
+ --exposure_lr_init 0.001 --exposure_lr_final 0.0001 --exposure_lr_delay_steps 5000 --exposure_lr_delay_mult 0.001 --train_test_exp
550
+ ```
551
+ Again, other excellent papers have used similar ideas e.g. [NeRF-W](https://nerf-w.github.io/), [URF](https://urban-radiance-fields.github.io/).
552
+
553
+ ### Anti-aliasing
554
+ We added the EWA Filter from [Mip Splatting](https://niujinshuchong.github.io/mip-splatting/) in our codebase to remove aliasing. It is disabled by default but you can enable it by adding `--antialiasing` when training on a scene using `train.py` or rendering using `render.py`. Antialiasing can be toggled in the SIBR viewer, it is disabled by default but you should enable it when viewing a scene trained using `--antialiasing`.
555
+ ![aa](/assets/aa_onoff.gif)
556
+ *this scene was trained using `--antialiasing`*.
557
+
558
+ ### SIBR: Top view
559
+ > `Views > Top view`
560
+
561
+ The `Top view` renders the SfM point cloud in another view with the corresponding input cameras and the `Point view` user camera. This allows visualization of how far the viewer is from the input cameras for example.
562
+
563
+ It is a 3D view so the user can navigate through it just as in the `Point view` (modes available: FPS, trackball, orbit).
564
+ <!-- _gif showing the top view, showing it is realtime_ -->
565
+ <!-- ![topViewOpen_1.gif](../assets/topViewOpen_1_1709560483017_0.gif) -->
566
+ ![top view open](assets/top_view_open.gif)
567
+
568
+ Options are available to customize this view, meshes can be disabled/enabled and their scales can be modified.
569
+ <!-- _gif showing different options_ -->
570
+ <!-- ![topViewOptions.gif](../assets/topViewOptions_1709560615266_0.gif) -->
571
+ ![top view options](assets/top_view_options.gif)
572
+ A useful additional functionality is to move to the position of an input image, and progressively fade out to the SfM point view in that position (e.g., to verify camera alignment). Views from input cameras can be displayed in the `Top view` (*note that `--images-path` must be set in the command line*). One can snap the `Top view` camera to the closest input camera from the user camera in the `Point view` by clicking `Top view settings > Cameras > Snap to closest`.
573
+ <!-- _gif showing for a snapped camera the ground truth image with alpha_ -->
574
+ <!-- ![topViewImageAlpha.gif](../assets/topViewImageAlpha_1709560852268_0.gif) -->
575
+ ![top view image alpha](assets/top_view_image_alpha.gif)
576
+
577
+ ### OpenXR support
578
+
579
+ OpenXR is supported in the branch `gaussian_code_release_openxr`
580
+ Within that branch, you can find documentation for VR support [here](https://gitlab.inria.fr/sibr/sibr_core/-/tree/gaussian_code_release_openxr?ref_type=heads).
581
+
582
+
583
+ ## FAQ
584
+ - *Where do I get data sets, e.g., those referenced in ```full_eval.py```?* The MipNeRF360 data set is provided by the authors of the original paper on the project site. Note that two of the data sets cannot be openly shared and require you to consult the authors directly. For Tanks&Temples and Deep Blending, please use the download links provided at the top of the page. Alternatively, you may access the cloned data (status: August 2023!) from [HuggingFace](https://huggingface.co/camenduru/gaussian-splatting)
585
+
586
+
587
+ - *How can I use this for a much larger dataset, like a city district?* The current method was not designed for these, but given enough memory, it should work out. However, the approach can struggle in multi-scale detail scenes (extreme close-ups, mixed with far-away shots). This is usually the case in, e.g., driving data sets (cars close up, buildings far away). For such scenes, you can lower the ```--position_lr_init```, ```--position_lr_final``` and ```--scaling_lr``` (x0.3, x0.1, ...). The more extensive the scene, the lower these values should be. Below, we use default learning rates (left) and ```--position_lr_init 0.000016 --scaling_lr 0.001"``` (right).
588
+
589
+ | ![Default learning rate result](assets/worse.png "title-1") <!-- --> | <!-- --> ![Reduced learning rate result](assets/better.png "title-2") |
590
+ | --- | --- |
591
+
592
+ - *I'm on Windows and I can't manage to build the submodules, what do I do?* Consider following the steps in the excellent video tutorial [here](https://www.youtube.com/watch?v=UXtuigy_wYc), hopefully they should help. The order in which the steps are done is important! Alternatively, consider using the linked Colab template.
593
+
594
+ - *It still doesn't work. It says something about ```cl.exe```. What do I do?* User Henry Pearce found a workaround. You can you try adding the visual studio path to your environment variables (your version number might differ);
595
+ ```C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64```
596
+ Then make sure you start a new conda prompt and cd to your repo location and try this;
597
+ ```
598
+ conda activate gaussian_splatting
599
+ cd <dir_to_repo>/gaussian-splatting
600
+ pip install submodules\diff-gaussian-rasterization
601
+ pip install submodules\simple-knn
602
+ ```
603
+
604
+ - *I'm on macOS/Puppy Linux/Greenhat and I can't manage to build, what do I do?* Sorry, we can't provide support for platforms outside of the ones we list in this README. Consider using the linked Colab template.
605
+
606
+ - *I don't have 24 GB of VRAM for training, what do I do?* The VRAM consumption is determined by the number of points that are being optimized, which increases over time. If you only want to train to 7k iterations, you will need significantly less. To do the full training routine and avoid running out of memory, you can increase the ```--densify_grad_threshold```, ```--densification_interval``` or reduce the value of ```--densify_until_iter```. Note however that this will affect the quality of the result. Also try setting ```--test_iterations``` to ```-1``` to avoid memory spikes during testing. If ```--densify_grad_threshold``` is very high, no densification should occur and training should complete if the scene itself loads successfully.
607
+
608
+ - *24 GB of VRAM for reference quality training is still a lot! Can't we do it with less?* Yes, most likely. By our calculations it should be possible with **way** less memory (~8GB). If we can find the time we will try to achieve this. If some PyTorch veteran out there wants to tackle this, we look forward to your pull request!
609
+
610
+
611
+ - *How can I use the differentiable Gaussian rasterizer for my own project?* Easy, it is included in this repo as a submodule ```diff-gaussian-rasterization```. Feel free to check out and install the package. It's not really documented, but using it from the Python side is very straightforward (cf. ```gaussian_renderer/__init__.py```).
612
+
613
+ - *Wait, but ```<insert feature>``` isn't optimized and could be much better?* There are several parts we didn't even have time to think about improving (yet). The performance you get with this prototype is probably a rather slow baseline for what is physically possible.
614
+
615
+ - *Something is broken, how did this happen?* We tried hard to provide a solid and comprehensible basis to make use of the paper's method. We have refactored the code quite a bit, but we have limited capacity to test all possible usage scenarios. Thus, if part of the website, the code or the performance is lacking, please create an issue. If we find the time, we will do our best to address it.
submodule/gaussian-splatting/SIBR_viewers/CMakeLists.txt ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+ CMAKE_MINIMUM_REQUIRED(VERSION 3.22)
11
+
12
+ set (CMAKE_SYSTEM_VERSION 10.0.15063.0 CACHE INTERNAL "Cmake system version" FORCE)
13
+ PROJECT(sibr_projects)
14
+
15
+ set(REQUIRED_VERSION "3.22.0")
16
+ set(CHECKED_VERSION "3.27.0")
17
+
18
+ if (CMAKE_VERSION VERSION_LESS REQUIRED_VERSION)
19
+ message(WARNING "Deprecated version of cmake. Please update to at least ${REQUIRED_VERSION} (${CHECKED_VERSION} recommended).")
20
+ elseif (CMAKE_VERSION VERSION_GREATER CHECKED_VERSION)
21
+ message(WARNING "Untested version of cmake. If you checked everything is working properly, please update ${CHECKED_VERSION} in the main CmakeLists.txt with the version you tested.")
22
+ endif()
23
+
24
+ ## Include cmake stuff (functions/macros) : Modules files
25
+ if(WIN32)
26
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/windows)
27
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/windows/Modules)
28
+ else()
29
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux)
30
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux/Modules)
31
+ endif()
32
+ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
33
+
34
+ ## To maintain cmake versions compatibilities
35
+ include(cmake_policies)
36
+ setPolicies()
37
+
38
+ include(git_describe)
39
+ git_describe(GIT_BRANCH SIBR_CORE_BRANCH GIT_COMMIT_HASH SIBR_CORE_COMMIT_HASH GIT_TAG SIBR_CORE_TAG GIT_VERSION SIBR_CORE_VERSION)
40
+
41
+ message(STATUS "SIBR version :\n BRANCH ${SIBR_CORE_BRANCH}\n COMMIT_HASH ${SIBR_CORE_COMMIT_HASH}\n TAG ${SIBR_CORE_TAG}\n VERSION ${SIBR_CORE_VERSION}")
42
+
43
+ if(NOT WIN32)
44
+ set(CMAKE_CXX_STANDARD 17)
45
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
46
+ endif()
47
+
48
+
49
+ if (WIN32)
50
+ ## Allow C++11 + other flags
51
+ include(CheckCXXCompilerFlag)
52
+ get_filename_component(currentBuildTool ${CMAKE_BUILD_TOOL} NAME_WE) # tool that can launch the native build system. returned value may be the full path
53
+ if(${currentBuildTool} MATCHES "(msdev|devenv|nmake|MSBuild)")
54
+
55
+ add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/W3;/DNOMINMAX;/MP;-D_USE_MATH_DEFINES>")
56
+ #add_definitions(/W3 /DNOMINMAX /MP -D_USE_MATH_DEFINES)# /D_ITERATOR_DEBUG_LEVEL=1 because you need all external DLl to compile with this flag too
57
+ set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING "" FORCE)
58
+ set(CMAKE_CXX_STANDARD 14)
59
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
60
+ set(CMAKE_CXX_EXTENSIONS OFF)
61
+ elseif(${currentBuildTool} MATCHES "(make|gmake)")
62
+ add_definitions("-Wall -Wno-unknown-pragmas -Wno-sign-compare -g -std=c++14 -D__forceinline=\"inline\ __attribute__((always_inline))\"")
63
+ # CHECK_CXX_COMPILER_FLAG("-std=gnu++11" COMPILER_SUPPORTS_CXX11)
64
+ # CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" COMPILER_SUPPORTS_CXX0X)
65
+ # if(COMPILER_SUPPORTS_CXX11)
66
+ # add_definitions(-std=gnu++11)
67
+ # elseif(COMPILER_SUPPORTS_CXX0X)
68
+ # add_definitions(-std=gnu++0x)
69
+ # else()
70
+ # message(SEND_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.")
71
+ # endif()
72
+ elseif(APPLE) ## \todo TODO: do a better test and send error on unsupported c++14 compiler
73
+ add_definitions(-std=c++14 -stdlib=libc++)
74
+ endif()
75
+ else()
76
+ ## Allow C++11 + other flags
77
+ include(CheckCXXCompilerFlag)
78
+ get_filename_component(currentBuildTool ${CMAKE_BUILD_TOOL} NAME_WE) # tool that can launch the native build system. returned value may be the full path
79
+ if(${currentBuildTool} MATCHES "(msdev|devenv|nmake|MSBuild)")
80
+
81
+ add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/W3;/DNOMINMAX;/MP;-D_USE_MATH_DEFINES>")
82
+ #add_definitions(/W3 /DNOMINMAX /MP -D_USE_MATH_DEFINES)# /D_ITERATOR_DEBUG_LEVEL=1 because you need all external DLl to compile with this flag too
83
+ set(CMAKE_CONFIGURATION_TYPES "RelWithDebInfo;Release;Debug" CACHE STRING "" FORCE)
84
+ set(CMAKE_CXX_STANDARD 14)
85
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
86
+ set(CMAKE_CXX_EXTENSIONS OFF)
87
+ elseif(${currentBuildTool} MATCHES "(make|gmake|ninja)")
88
+ add_definitions("-fpermissive -fPIC -Wall -Wno-unknown-pragmas -Wno-sign-compare -g -std=c++17 -D__forceinline=\"inline\ __attribute__((always_inline))\"")
89
+ elseif(APPLE) ## \todo TODO: do a better test and send error on unsupported c++14 compiler
90
+ add_definitions(-std=c++17 -stdlib=libc++)
91
+ endif()
92
+ endif()
93
+
94
+ set(INSTALL_STANDALONE ON)
95
+
96
+ ## Set default build output binaries (used also in sub CMakeLists.txt) :
97
+ set(BIN_BUILT_DIR "bin")
98
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
99
+ set(ARCHI_BUILT_DIR "x64")
100
+ set(LIB_BUILT_DIR "lib64")
101
+ else()
102
+ set(ARCHI_BUILT_DIR "x86")
103
+ set(LIB_BUILT_DIR "lib")
104
+ endif()
105
+
106
+ option(SEPARATE_CONFIGURATIONS "Clearer separation between configurations" OFF)
107
+ SET(CMAKE_INSTALL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/install)
108
+ SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_ROOT})
109
+
110
+ if(DEFINED CMAKE_BUILD_TYPE) ## for mono config type (make/nmake/ninja based)
111
+ if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
112
+ set(CMAKE_DEBUG_POSTFIX "_d")
113
+ elseif(${CMAKE_BUILD_TYPE} MATCHES "RelWithDebInfo")
114
+ set(CMAKE_RELWITHDEBINFO_POSTFIX "_rwdi")
115
+ elseif(${CMAKE_BUILD_TYPE} MATCHES "MinSizeRel")
116
+ set(CMAKE_MINSIZEREL_POSTFIX "_msr")
117
+ elseif(${CMAKE_BUILD_TYPE} MATCHES "Release")
118
+ set(CMAKE_RELEASE_POSTFIX "")
119
+ endif()
120
+
121
+ if(SEPARATE_CONFIGURATIONS)
122
+ SET(CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE} ${CMAKE_INSTALL_ROOT}/${CMAKE_BUILD_TYPE})
123
+ else()
124
+ SET(CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE} ${CMAKE_INSTALL_ROOT})
125
+ endif()
126
+
127
+ MESSAGE(STATUS "Install path set to ${CMAKE_INSTALL_PREFIX}.")
128
+ SET(CMAKE_OUTPUT_LIB_${CMAKE_BUILD_TYPE} ${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/lib)
129
+ SET(CMAKE_OUTPUT_BIN_${CMAKE_BUILD_TYPE} ${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/bin)
130
+
131
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE} ${CMAKE_OUTPUT_LIB_${CMAKE_BUILD_TYPE}})
132
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE} ${CMAKE_OUTPUT_LIB_${CMAKE_BUILD_TYPE}})
133
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE} ${CMAKE_OUTPUT_BIN_${CMAKE_BUILD_TYPE}})
134
+ set(CMAKE_PDB_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE} ${CMAKE_OUTPUT_BIN_${CMAKE_BUILD_TYPE}})
135
+ endif()
136
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
137
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
138
+ if(${CONFIG_TYPES} MATCHES "Debug")
139
+ set(CMAKE_DEBUG_POSTFIX "_d")
140
+ elseif(${CONFIG_TYPES} MATCHES "RelWithDebInfo")
141
+ set(CMAKE_RELWITHDEBINFO_POSTFIX "_rwdi")
142
+ elseif(${CONFIG_TYPES} MATCHES "MinSizeRel")
143
+ set(CMAKE_MINSIZEREL_POSTFIX "_msr")
144
+ elseif(${CMAKE_BUILD_TYPE} MATCHES "Release")
145
+ set(CMAKE_RELEASE_POSTFIX "")
146
+ endif()
147
+
148
+ if(SEPARATE_CONFIGURATIONS)
149
+ SET(CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC} ${CMAKE_INSTALL_ROOT}/${CONFIG_TYPES})
150
+ else()
151
+ SET(CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC} ${CMAKE_INSTALL_ROOT})
152
+ endif()
153
+
154
+ MESSAGE(STATUS "Install path for ${CONFIG_TYPES} set to ${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}.")
155
+ SET(CMAKE_OUTPUT_LIB_${CONFIG_TYPES_UC} ${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/lib)
156
+ SET(CMAKE_OUTPUT_BIN_${CONFIG_TYPES_UC} ${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/bin)
157
+
158
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC} ${CMAKE_OUTPUT_LIB_${CONFIG_TYPES_UC}})
159
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC} ${CMAKE_OUTPUT_LIB_${CONFIG_TYPES_UC}})
160
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC} ${CMAKE_OUTPUT_BIN_${CONFIG_TYPES_UC}})
161
+ set(CMAKE_PDB_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC} ${CMAKE_OUTPUT_BIN_${CONFIG_TYPES_UC}})
162
+ endforeach()
163
+
164
+
165
+ # Settings for RPATH
166
+ if (NOT WIN32)
167
+ # Default config of Fedora at INRIA has no LD_LIBRARY_PATH (for security reasons I guess)
168
+ # So at least I had "./" in RPATH and found link paths
169
+ #set(CMAKE_SKIP_RPATH TRUE)
170
+ #SET(CMAKE_SKIP_BUILD_RPATH FALSE)
171
+ SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
172
+
173
+ SET(CMAKE_INSTALL_RPATH "$ORIGIN")
174
+ #SET(CMAKE_INSTALL_RPATH "./")
175
+ #SET(CMAKE_INSTALL_RPATH "./:/usr/lib64/:/usr/lib/:/usr/local/lib64/:/usr/local/lib/") # This one causes be a problem -> a "default" version of libGL (swrast) is located in /usr/lib64 and was selected instead of nvidia one (in /usr/lib64/nividia)
176
+
177
+ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
178
+ endif()
179
+
180
+
181
+ set(SIBR_PROGRAMARGS "" CACHE STRING "Default program arguments used in Visual Studio target properties")
182
+ if ("${SIBR_PROGRAMARGS}" STREQUAL "")
183
+ if (DEFINED ENV{SIBR_PROGRAMARGS})
184
+ set(SIBR_PROGRAMARGS "$ENV{SIBR_PROGRAMARGS}" CACHE STRING "Default program arguments used in Visual Studio target properties" FORCE)
185
+ message( STATUS "Using program options found in environment variable 'SIBR_PROGRAMARGS' => '${SIBR_PROGRAMARGS}'")
186
+ else()
187
+ message(
188
+ "Note you can provide default program options for Visual Studio target properties by either setting"
189
+ " a value for the cmake cached variable 'SIBR_PROGRAMARGS' or by setting a new environment "
190
+ "variable 'SIBR_PROGRAMARGS'")
191
+ endif()
192
+ endif()
193
+
194
+ add_custom_target(PREBUILD ALL)
195
+
196
+ ## Include all projects
197
+ set(SIBR_PROJECTS_SAMPLES_SUBPAGE_REF "")
198
+ set(SIBR_PROJECTS_OURS_SUBPAGE_REF "")
199
+ set(SIBR_PROJECTS_TOOLBOX_SUBPAGE_REF "")
200
+ set(SIBR_PROJECTS_OTHERS_SUBPAGE_REF "")
201
+ set(SIBR_PROJECTS_SAMPLES_REF_REF "")
202
+ set(SIBR_PROJECTS_OURS_REF_REF "")
203
+ set(SIBR_PROJECTS_TOOLBOX_REF_REF "")
204
+ set(SIBR_PROJECTS_OTHERS_REF_REF "")
205
+ set(DOXY_APP_SPECIFIC_IMG_PATH "")
206
+ set(DOXY_DOC_EXCLUDE_PATTERNS_DIRS "")
207
+ ADD_SUBDIRECTORY(src)
208
+
209
+
210
+ ## handle documentation
211
+ if (WIN32)
212
+ ADD_SUBDIRECTORY(docs)
213
+ endif()
submodule/gaussian-splatting/SIBR_viewers/LICENSE.md ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SIBR License
2
+ ============
3
+
4
+ The sibr system is licensed under the Apache 2.0 license, except for some projects in specific branches (in src/projects) that have separate licenses in those directories.
5
+
6
+ Please verify the LICENSE.md file for those directories.
7
+
8
+ --------------
9
+
10
+
11
+
12
+ Apache License
13
+ Version 2.0, January 2004
14
+ http://www.apache.org/licenses/
15
+
16
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
17
+
18
+ 1. Definitions.
19
+
20
+ "License" shall mean the terms and conditions for use, reproduction,
21
+ and distribution as defined by Sections 1 through 9 of this document.
22
+
23
+ "Licensor" shall mean the copyright owner or entity authorized by
24
+ the copyright owner that is granting the License.
25
+
26
+ "Legal Entity" shall mean the union of the acting entity and all
27
+ other entities that control, are controlled by, or are under common
28
+ control with that entity. For the purposes of this definition,
29
+ "control" means (i) the power, direct or indirect, to cause the
30
+ direction or management of such entity, whether by contract or
31
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
32
+ outstanding shares, or (iii) beneficial ownership of such entity.
33
+
34
+ "You" (or "Your") shall mean an individual or Legal Entity
35
+ exercising permissions granted by this License.
36
+
37
+ "Source" form shall mean the preferred form for making modifications,
38
+ including but not limited to software source code, documentation
39
+ source, and configuration files.
40
+
41
+ "Object" form shall mean any form resulting from mechanical
42
+ transformation or translation of a Source form, including but
43
+ not limited to compiled object code, generated documentation,
44
+ and conversions to other media types.
45
+
46
+ "Work" shall mean the work of authorship, whether in Source or
47
+ Object form, made available under the License, as indicated by a
48
+ copyright notice that is included in or attached to the work
49
+ (an example is provided in the Appendix below).
50
+
51
+ "Derivative Works" shall mean any work, whether in Source or Object
52
+ form, that is based on (or derived from) the Work and for which the
53
+ editorial revisions, annotations, elaborations, or other modifications
54
+ represent, as a whole, an original work of authorship. For the purposes
55
+ of this License, Derivative Works shall not include works that remain
56
+ separable from, or merely link (or bind by name) to the interfaces of,
57
+ the Work and Derivative Works thereof.
58
+
59
+ "Contribution" shall mean any work of authorship, including
60
+ the original version of the Work and any modifications or additions
61
+ to that Work or Derivative Works thereof, that is intentionally
62
+ submitted to Licensor for inclusion in the Work by the copyright owner
63
+ or by an individual or Legal Entity authorized to submit on behalf of
64
+ the copyright owner. For the purposes of this definition, "submitted"
65
+ means any form of electronic, verbal, or written communication sent
66
+ to the Licensor or its representatives, including but not limited to
67
+ communication on electronic mailing lists, source code control systems,
68
+ and issue tracking systems that are managed by, or on behalf of, the
69
+ Licensor for the purpose of discussing and improving the Work, but
70
+ excluding communication that is conspicuously marked or otherwise
71
+ designated in writing by the copyright owner as "Not a Contribution."
72
+
73
+ "Contributor" shall mean Licensor and any individual or Legal Entity
74
+ on behalf of whom a Contribution has been received by Licensor and
75
+ subsequently incorporated within the Work.
76
+
77
+ 2. Grant of Copyright License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ copyright license to reproduce, prepare Derivative Works of,
81
+ publicly display, publicly perform, sublicense, and distribute the
82
+ Work and such Derivative Works in Source or Object form.
83
+
84
+ 3. Grant of Patent License. Subject to the terms and conditions of
85
+ this License, each Contributor hereby grants to You a perpetual,
86
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
87
+ (except as stated in this section) patent license to make, have made,
88
+ use, offer to sell, sell, import, and otherwise transfer the Work,
89
+ where such license applies only to those patent claims licensable
90
+ by such Contributor that are necessarily infringed by their
91
+ Contribution(s) alone or by combination of their Contribution(s)
92
+ with the Work to which such Contribution(s) was submitted. If You
93
+ institute patent litigation against any entity (including a
94
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
95
+ or a Contribution incorporated within the Work constitutes direct
96
+ or contributory patent infringement, then any patent licenses
97
+ granted to You under this License for that Work shall terminate
98
+ as of the date such litigation is filed.
99
+
100
+ 4. Redistribution. You may reproduce and distribute copies of the
101
+ Work or Derivative Works thereof in any medium, with or without
102
+ modifications, and in Source or Object form, provided that You
103
+ meet the following conditions:
104
+
105
+ (a) You must give any other recipients of the Work or
106
+ Derivative Works a copy of this License; and
107
+
108
+ (b) You must cause any modified files to carry prominent notices
109
+ stating that You changed the files; and
110
+
111
+ (c) You must retain, in the Source form of any Derivative Works
112
+ that You distribute, all copyright, patent, trademark, and
113
+ attribution notices from the Source form of the Work,
114
+ excluding those notices that do not pertain to any part of
115
+ the Derivative Works; and
116
+
117
+ (d) If the Work includes a "NOTICE" text file as part of its
118
+ distribution, then any Derivative Works that You distribute must
119
+ include a readable copy of the attribution notices contained
120
+ within such NOTICE file, excluding those notices that do not
121
+ pertain to any part of the Derivative Works, in at least one
122
+ of the following places: within a NOTICE text file distributed
123
+ as part of the Derivative Works; within the Source form or
124
+ documentation, if provided along with the Derivative Works; or,
125
+ within a display generated by the Derivative Works, if and
126
+ wherever such third-party notices normally appear. The contents
127
+ of the NOTICE file are for informational purposes only and
128
+ do not modify the License. You may add Your own attribution
129
+ notices within Derivative Works that You distribute, alongside
130
+ or as an addendum to the NOTICE text from the Work, provided
131
+ that such additional attribution notices cannot be construed
132
+ as modifying the License.
133
+
134
+ You may add Your own copyright statement to Your modifications and
135
+ may provide additional or different license terms and conditions
136
+ for use, reproduction, or distribution of Your modifications, or
137
+ for any such Derivative Works as a whole, provided Your use,
138
+ reproduction, and distribution of the Work otherwise complies with
139
+ the conditions stated in this License.
140
+
141
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
142
+ any Contribution intentionally submitted for inclusion in the Work
143
+ by You to the Licensor shall be under the terms and conditions of
144
+ this License, without any additional terms or conditions.
145
+ Notwithstanding the above, nothing herein shall supersede or modify
146
+ the terms of any separate license agreement you may have executed
147
+ with Licensor regarding such Contributions.
148
+
149
+ 6. Trademarks. This License does not grant permission to use the trade
150
+ names, trademarks, service marks, or product names of the Licensor,
151
+ except as required for reasonable and customary use in describing the
152
+ origin of the Work and reproducing the content of the NOTICE file.
153
+
154
+ 7. Disclaimer of Warranty. Unless required by applicable law or
155
+ agreed to in writing, Licensor provides the Work (and each
156
+ Contributor provides its Contributions) on an "AS IS" BASIS,
157
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
158
+ implied, including, without limitation, any warranties or conditions
159
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
160
+ PARTICULAR PURPOSE. You are solely responsible for determining the
161
+ appropriateness of using or redistributing the Work and assume any
162
+ risks associated with Your exercise of permissions under this License.
163
+
164
+ 8. Limitation of Liability. In no event and under no legal theory,
165
+ whether in tort (including negligence), contract, or otherwise,
166
+ unless required by applicable law (such as deliberate and grossly
167
+ negligent acts) or agreed to in writing, shall any Contributor be
168
+ liable to You for damages, including any direct, indirect, special,
169
+ incidental, or consequential damages of any character arising as a
170
+ result of this License or out of the use or inability to use the
171
+ Work (including but not limited to damages for loss of goodwill,
172
+ work stoppage, computer failure or malfunction, or any and all
173
+ other commercial damages or losses), even if such Contributor
174
+ has been advised of the possibility of such damages.
175
+
176
+ 9. Accepting Warranty or Additional Liability. While redistributing
177
+ the Work or Derivative Works thereof, You may choose to offer,
178
+ and charge a fee for, acceptance of support, warranty, indemnity,
179
+ or other liability obligations and/or rights consistent with this
180
+ License. However, in accepting such obligations, You may act only
181
+ on Your own behalf and on Your sole responsibility, not on behalf
182
+ of any other Contributor, and only if You agree to indemnify,
183
+ defend, and hold each Contributor harmless for any liability
184
+ incurred by, or claims asserted against, such Contributor by reason
185
+ of your accepting any such warranty or additional liability.
186
+
187
+ END OF TERMS AND CONDITIONS
188
+
189
+
190
+ Copyright 2024 Inria / Universite Cote d'Azur
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+
204
+
submodule/gaussian-splatting/SIBR_viewers/README.md ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SIBR Core
2
+
3
+ **SIBR** is a System for Image-Based Rendering.
4
+ It is built around the *sibr-core* in this repo and several *Projects* implementing published research papers.
5
+ For more complete documentation, see here: [SIBR Documentation](https://sibr.gitlabpages.inria.fr)
6
+
7
+ This **SIBR core** repository provides :
8
+ - a basic Image-Based Renderer
9
+ - a per-pixel implementation of Unstructured Lumigraph (ULR)
10
+ - several dataset tools & pipelines do process input images
11
+
12
+ Details on how to run in the documentation and in the section below.
13
+ If you use this code in a publication, please cite the system as follows:
14
+
15
+ ```
16
+ @misc{sibr2020,
17
+ author = "Bonopera, Sebastien and Esnault, Jerome and Prakash, Siddhant and Rodriguez, Simon and Thonat, Theo and Benadel, Mehdi and Chaurasia, Gaurav and Philip, Julien and Drettakis, George",
18
+ title = "sibr: A System for Image Based Rendering",
19
+ year = "2020",
20
+ url = "https://gitlab.inria.fr/sibr/sibr_core"
21
+ }
22
+ ```
23
+
24
+ ## Setup
25
+
26
+ **Note**: The current release is for *Windows 10* only. We are planning a Linux release soon.
27
+
28
+ #### Binary distribution
29
+
30
+ The easiest way to use SIBR is to download the binary distribution. All steps described below, including all preprocessing for your datasets will work using this code.
31
+
32
+ Download the distribution from the page: https://sibr.gitlabpages.inria.fr/download.html (Core, 57Mb); unzip the file and rename the directory "install".
33
+
34
+ #### Install requirements
35
+
36
+ - [**Visual Studio 2019**](https://visualstudio.microsoft.com/fr/downloads/)
37
+ - [**Cmake 3.16+**](https://cmake.org/download)
38
+ - [**7zip**](https://www.7-zip.org)
39
+ - [**Python 3.8+**](https://www.python.org/downloads/) for shaders installation scripts and dataset preprocess scripts
40
+ - [**Doxygen 1.8.17+**](https://www.doxygen.nl/download.html#srcbin) for documentation
41
+ - [**CUDA 10.1+**](https://developer.nvidia.com/cuda-downloads) and [**CUDnn**](https://developer.nvidia.com/cudnn) if projects requires it
42
+
43
+ Make sure Python, CUDA and Doxygen are in the PATH
44
+
45
+ If you have Chocolatey, you can grab most of these with this command:
46
+
47
+ ```sh
48
+ choco install cmake 7zip python3 doxygen.install cuda
49
+
50
+ ## Visual Studio is available on Chocolatey,
51
+ ## though we do advise to set it from Visual Studio Installer and to choose your licensing accordingly
52
+ choco install visualstudio2019community
53
+ ```
54
+
55
+ #### Generation of the solution
56
+
57
+ - Checkout this repository's master branch:
58
+
59
+ ```sh
60
+ ## through HTTPS
61
+ git clone https://gitlab.inria.fr/sibr/sibr_core.git -b master
62
+ ## through SSH
63
+ git clone git@gitlab.inria.fr:sibr/sibr_core.git -b master
64
+ ```
65
+ - Run Cmake-gui once, select the repo root as a source directory, `build/` as the build directory. Configure, select the Visual Studio C++ Win64 compiler
66
+ - Select the projects you want to generate among the BUILD elements in the list (you can group Cmake flags by categories to access those faster)
67
+ - Generate
68
+
69
+ #### Compilation
70
+
71
+ - Open the generated Visual Studio solution (`build/sibr_projects.sln`)
72
+ - Build the `ALL_BUILD` target, and then the `INSTALL` target
73
+ - The compiled executables will be put in `install/bin`
74
+ - TODO: are the DLLs properly installed?
75
+
76
+ #### Compilation of the documentation
77
+
78
+ - Open the generated Visual Studio solution (`build/sibr_projects.sln`)
79
+ - Build the `DOCUMENTATION` target
80
+ - Run `install/docs/index.html` in a browser
81
+
82
+
83
+ ## Scripts
84
+
85
+ Some scripts will require you to install `PIL`, and `convert` from `ImageMagick`.
86
+
87
+ ```sh
88
+ ## To install pillow
89
+ python -m pip install pillow
90
+
91
+ ## If you have Chocolatey, you can install imagemagick from this command
92
+ choco install imagemagick
93
+ ```
94
+
95
+ ## Troubleshooting
96
+
97
+ #### Bugs and Issues
98
+
99
+ We will track bugs and issues through the Issues interface on gitlab. Inria gitlab does not allow creation of external accounts, so if you have an issue/bug please email <code>sibr@inria.fr</code> and we will either create a guest account or create the issue on our side.
100
+
101
+ #### Cmake complaining about the version
102
+
103
+ if you are the first to use a very recent Cmake version, you will have to update `CHECKED_VERSION` in the root `CmakeLists.txt`.
104
+
105
+ #### Weird OpenCV error
106
+
107
+ you probably selected the 32-bits compiler in Cmake-gui.
108
+
109
+ #### `Cmd.exe failed with error 009` or similar
110
+
111
+ make sure Python is installed and in the path.
112
+
113
+ #### `BUILD_ALL` or `INSTALL` fail because of a project you don't really need
114
+
115
+ build and install each project separately by selecting the proper targets.
116
+
117
+ #### Error in CUDA headers under Visual Studio 2019
118
+
119
+ make sure CUDA >= 10.1 (first version to support VS2019) is installed.
120
+
121
+ ## To run an example
122
+
123
+ For more details, please see the documentation: http://sibr.gitlabpages.inria.fr
124
+
125
+ Download a dataset from: https://repo-sam.inria.fr/fungraph/sibr-datasets/
126
+
127
+ e.g., the *sibr-museum-front* dataset in the *DATASETS_PATH* directory.
128
+
129
+ ```
130
+ wget https://repo-sam.inria.fr/fungraph/sibr-datasets/museum_front27_ulr.zip
131
+ ```
132
+
133
+ Once you have built the system or downloaded the binaries (see above), go to *install/bin* and you can run:
134
+ ```
135
+ sibr_ulrv2_app.exe --path DATASETS_PATH/sibr-museum-front
136
+ ```
137
+
138
+ You will have an interactive viewer and you can navigate freely in the captured scene.
139
+ Our default interactive viewer has a main view running the algorithm and a top view to visualize the position of the calibrated cameras. By default you are in WASD mode, and can toggle to trackball using the "y" key. Please see the page [Interface](https://sibr.gitlabpages.inria.fr/docs/nightly/howto_sibr_useful_objects.html) for more details on the interface.
140
+
141
+ Please see the documentation on how to create a dataset from your own scene, and the various other IBR algorithms available.
142
+
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/MSVCsetUserCommand.cmake ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(__MSVCsetUserCommand_cmake_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__MSVCsetUserCommand_cmake_INCLUDED__ ON)
15
+ endif()
16
+
17
+ ## Allow to configure the Debugger settings of visual studio
18
+ ## Note: Using this command under linux doesn't affect anything
19
+ ## On run Debug Windows local : visual will try to load a specific COMMAND with ARGS in the provided WORKING_DIR
20
+ ##
21
+ ## usage:
22
+ ## MSVCsetUserCommand( <targetName>
23
+ ## [COMMAND <myCustomAppToLaunch> | [ PATH <myCustomDirWhereIsDefaultTargetFileNameToLaunch> [FILE <myCustomExecFileToLaunch>] ] ]
24
+ ## ARGS <associatedArguments>
25
+ ## WORKING_DIR <whereStartTheProgram>
26
+ ## )
27
+ ##
28
+ ## Warning 1 : All arugments () must be passed under quotes
29
+ ## Warning 2 : WORKING_DIR path arg have to finish with remain slah '/'
30
+ ## Warning 3 : use COMMAND for external app OR PATH (optionaly with FILE) option(s) to set your built/installed/moved target
31
+ ##
32
+ ## Example 1:
33
+ ## include(MSVCsetUserCommand)
34
+ ## MSVCsetUserCommand( UnityRenderingPlugin
35
+ ## COMMAND "C:/Program Files (x86)/Unity/Editor/Unity.exe"
36
+ ## ARGS "-force-opengl -projectPath \"${CMAKE_HOME_DIRECTORY}/UnityPlugins/RenderingPluginExample/UnityProject\""
37
+ ## WORKING_DIR "${CMAKE_HOME_DIRECTORY}/UnityPlugins/RenderingPluginExample/UnityProject"
38
+ ## VERBOSE
39
+ ## )
40
+ ##
41
+ ## Example 2:
42
+ ## include(MSVCsetUserCommand)
43
+ ## MSVCsetUserCommand( ibrApp
44
+ ## PATH "C:/Program Files (x86)/workspace/IBR/install"
45
+ ## FILE "ibrApp${CMAKE_EXECUTABLE_SUFFIX}" ## this option line is optional since the target name didn't change between build and install step
46
+ ## ARGS "-path \"${CMAKE_HOME_DIRECTORY}/dataset\""
47
+ ## WORKING_DIR "${CMAKE_HOME_DIRECTORY}"
48
+ ## VERBOSE
49
+ ## )
50
+ ##
51
+ function(MSVCsetUserCommand targetName)
52
+ cmake_parse_arguments(MSVCsuc "VERBOSE" "PATH;FILE;COMMAND;ARGS;WORKING_DIR" "" ${ARGN} )
53
+
54
+ ## If no arguments are given, do not create an unecessary .vcxproj.user file
55
+ set(MSVCsuc_DEFAULT OFF)
56
+
57
+ if(MSVCsuc_PATH AND MSVCsuc_DEFAULT)
58
+ set(MSVCsuc_DEFAULT OFF)
59
+ endif()
60
+
61
+ if(MSVCsuc_FILE AND MSVCsuc_DEFAULT)
62
+ set(MSVCsuc_DEFAULT OFF)
63
+ endif()
64
+
65
+ if(NOT MSVCsuc_COMMAND)
66
+ if(MSVCsuc_PATH AND MSVCsuc_FILE)
67
+ set(MSVCsuc_COMMAND "${MSVCsuc_PATH}\\${MSVCsuc_FILE}")
68
+ elseif(MSVCsuc_PATH)
69
+ set(MSVCsuc_COMMAND "${MSVCsuc_PATH}\\$(TargetFileName)")
70
+ else()
71
+ set(MSVCsuc_COMMAND "$(TargetPath)") ## => $(TargetDir)\$(TargetName)$(TargetExt)
72
+ endif()
73
+ elseif(MSVCsuc_DEFAULT)
74
+ set(MSVCsuc_DEFAULT OFF)
75
+ endif()
76
+
77
+ # NOTE: there was a typo here. there is an else if written after else statement
78
+ # changing the order of the else if statement
79
+ if(MSVCsuc_WORKING_DIR)
80
+ file(TO_NATIVE_PATH ${MSVCsuc_WORKING_DIR} MSVCsuc_WORKING_DIR)
81
+ elseif(MSVCsuc_DEFAULT)
82
+ set(MSVCsuc_DEFAULT OFF)
83
+ else()
84
+ set(MSVCsuc_WORKING_DIR "$(ProjectDir)")
85
+ endif()
86
+
87
+ if(NOT MSVCsuc_ARGS)
88
+ set(MSVCsuc_ARGS "")
89
+ elseif(MSVCsuc_DEFAULT)
90
+ set(MSVCsuc_DEFAULT OFF)
91
+ endif()
92
+
93
+ if(MSVC10 OR (MSVC AND MSVC_VERSION GREATER 1600)) # 2010 or newer
94
+
95
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
96
+ set(PLATEFORM_BITS x64)
97
+ else()
98
+ set(PLATEFORM_BITS Win32)
99
+ endif()
100
+
101
+ if(NOT MSVCsuc_DEFAULT AND PLATEFORM_BITS)
102
+
103
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${targetName}.vcxproj.user"
104
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>
105
+ <Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
106
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|${PLATEFORM_BITS}'\">
107
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
108
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
109
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
110
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
111
+ </PropertyGroup>
112
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|${PLATEFORM_BITS}'\">
113
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
114
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
115
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
116
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
117
+ </PropertyGroup>
118
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='MinSizeRel|${PLATEFORM_BITS}'\">
119
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
120
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
121
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
122
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
123
+ </PropertyGroup>
124
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='RelWithDebInfo|${PLATEFORM_BITS}'\">
125
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
126
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
127
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
128
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
129
+ </PropertyGroup>
130
+ </Project>"
131
+ )
132
+ if(MSVCsuc_VERBOSE)
133
+ message(STATUS "[MSVCsetUserCommand] Write ${CMAKE_CURRENT_BINARY_DIR}/${targetName}.vcxproj.user file")
134
+ message(STATUS " to execute ${MSVCsuc_COMMAND} ${MSVCsuc_ARGS}")
135
+ message(STATUS " from derectory ${MSVCsuc_WORKING_DIR}")
136
+ message(STATUS " on visual studio run debugger button")
137
+ endif()
138
+
139
+ else()
140
+ message(WARNING "PLATEFORM_BITS is undefined...")
141
+ endif()
142
+
143
+ else()
144
+ if(MSVCsuc_VERBOSE)
145
+ message(WARNING "MSVCsetUserCommand is disable because too old MSVC is used (need MSVC10 2010 or newer)")
146
+ endif()
147
+ endif()
148
+
149
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindASSIMP.cmake ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## Try to find the ASSIMP library
12
+ ## Once done this will define
13
+ ##
14
+ ## ASSIMP_FOUND - system has ASSIMP
15
+ ## ASSIMP_INCLUDE_DIR - The ASSIMP include directory
16
+ ## ASSIMP_LIBRARIES - The libraries needed to use ASSIMP
17
+ ## ASSIMP_CMD - the full path of ASSIMP executable
18
+ ## ASSIMP_DYNAMIC_LIB - the Assimp dynamic lib (available only on windows as .dll file for the moment)
19
+ ##
20
+ ## Edited for using a bugfixed version of Assimp
21
+
22
+ if(NOT ASSIMP_DIR)
23
+ set(ASSIMP_DIR "$ENV{ASSIMP_DIR}" CACHE PATH "ASSIMP root directory")
24
+ message("NO ASSIMP DIR " ASSIMP_DIR )
25
+ file(TO_CMAKE_PATH "/data/graphdeco/share/usr/local" ASSIMP_DIR)
26
+ set(ASSIMP_DIR "/data/graphdeco/share/usr/local" )
27
+ message("SETTING ASSIMP DIR " ASSIMP_DIR )
28
+ endif()
29
+ if(ASSIMP_DIR)
30
+ file(TO_CMAKE_PATH ${ASSIMP_DIR} ASSIMP_DIR)
31
+ file(TO_CMAKE_PATH "/data/graphdeco/share/usr/local" ASSIMP_DIR)
32
+ message("ASSIMP DIR " ASSIMP_DIR )
33
+ endif()
34
+
35
+
36
+ ## set the LIB POSTFIX to find in a right directory according to what kind of compiler we use (32/64bits)
37
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
38
+ set(ASSIMP_SEARCH_LIB "lib64")
39
+ set(ASSIMP_SEARCH_BIN "bin64")
40
+ set(ASSIMP_SEARCH_LIB_PATHSUFFIXE "x64")
41
+ else()
42
+ set(ASSIMP_SEARCH_LIB "lib32")
43
+ set(ASSIMP_SEARCH_BIN "bin32")
44
+ set(ASSIMP_SEARCH_LIB_PATHSUFFIXE "x86")
45
+ endif()
46
+
47
+ set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
48
+
49
+
50
+ FIND_PATH(ASSIMP_INCLUDE_DIR
51
+ NAMES assimp/config.h
52
+ PATHS
53
+ ${ASSIMP_DIR}
54
+ ## linux
55
+ /usr
56
+ /usr/include
57
+ /usr/local
58
+ /opt/local
59
+ ## windows
60
+ "$ENV{PROGRAMFILES}/Assimp"
61
+ "$ENV{${PROGRAMFILESx86}}/Assimp"
62
+ "$ENV{ProgramW6432}/Assimp"
63
+ PATH_SUFFIXES include
64
+ )
65
+
66
+
67
+ FIND_LIBRARY(ASSIMP_LIBRARY
68
+ NAMES assimp-vc140-mt assimp
69
+ PATHS
70
+ ${ASSIMP_DIR}/${ASSIMP_SEARCH_LIB}
71
+ ${ASSIMP_DIR}/lib
72
+ ${ASSIMP_DIR}/lib64
73
+ ## linux
74
+ /usr/${ASSIMP_SEARCH_LIB}
75
+ /usr/local/${ASSIMP_SEARCH_LIB}
76
+ /opt/local/${ASSIMP_SEARCH_LIB}
77
+ /usr/lib
78
+ /usr/lib64
79
+ /usr/local/lib
80
+ /opt/local/lib
81
+ ## windows
82
+ "$ENV{PROGRAMFILES}/Assimp/${ASSIMP_SEARCH_LIB}"
83
+ "$ENV{${PROGRAMFILESx86}}/Assimp/${ASSIMP_SEARCH_LIB}"
84
+ "$ENV{ProgramW6432}/Assimp/${ASSIMP_SEARCH_LIB}"
85
+ "$ENV{PROGRAMFILES}/Assimp/lib"
86
+ "$ENV{${PROGRAMFILESx86}}/Assimp/lib"
87
+ "$ENV{ProgramW6432}/Assimp/lib"
88
+ PATH_SUFFIXES ${ASSIMP_SEARCH_LIB_PATHSUFFIXE}
89
+ )
90
+ set(ASSIMP_LIBRARIES ${ASSIMP_LIBRARY})
91
+
92
+
93
+ if(ASSIMP_LIBRARY)
94
+ get_filename_component(ASSIMP_LIBRARY_DIR ${ASSIMP_LIBRARY} PATH)
95
+ if(WIN32)
96
+ file(GLOB ASSIMP_DYNAMIC_LIB "${ASSIMP_LIBRARY_DIR}/assimp*.dll")
97
+ if(NOT ASSIMP_DYNAMIC_LIB)
98
+ message("ASSIMP_DYNAMIC_LIB is missing... at ${ASSIMP_LIBRARY_DIR}")
99
+ endif()
100
+ endif()
101
+ set(ASSIMP_DYNAMIC_LIB ${ASSIMP_DYNAMIC_LIB} CACHE PATH "Windows dll location")
102
+ endif()
103
+
104
+ MARK_AS_ADVANCED(ASSIMP_DYNAMIC_LIB ASSIMP_INCLUDE_DIR ASSIMP_LIBRARIES)
105
+
106
+ INCLUDE(FindPackageHandleStandardArgs)
107
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASSIMP
108
+ REQUIRED_VARS ASSIMP_INCLUDE_DIR ASSIMP_LIBRARIES
109
+ FAIL_MESSAGE "ASSIMP wasn't found correctly. Set ASSIMP_DIR to the root SDK installation directory."
110
+ )
111
+
112
+ if(NOT ASSIMP_FOUND)
113
+ set(ASSIMP_DIR "" CACHE STRING "Path to ASSIMP install directory")
114
+ endif()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindEGL.cmake ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #.rst:
2
+ # FindEGL
3
+ # -------
4
+ #
5
+ # Try to find EGL.
6
+ #
7
+ # This will define the following variables:
8
+ #
9
+ # ``EGL_FOUND``
10
+ # True if (the requested version of) EGL is available
11
+ # ``EGL_VERSION``
12
+ # The version of EGL; note that this is the API version defined in the
13
+ # headers, rather than the version of the implementation (eg: Mesa)
14
+ # ``EGL_LIBRARIES``
15
+ # This can be passed to target_link_libraries() instead of the ``EGL::EGL``
16
+ # target
17
+ # ``EGL_INCLUDE_DIRS``
18
+ # This should be passed to target_include_directories() if the target is not
19
+ # used for linking
20
+ # ``EGL_DEFINITIONS``
21
+ # This should be passed to target_compile_options() if the target is not
22
+ # used for linking
23
+ #
24
+ # If ``EGL_FOUND`` is TRUE, it will also define the following imported target:
25
+ #
26
+ # ``EGL::EGL``
27
+ # The EGL library
28
+ #
29
+ # In general we recommend using the imported target, as it is easier to use.
30
+ # Bear in mind, however, that if the target is in the link interface of an
31
+ # exported library, it must be made available by the package config file.
32
+ #
33
+ # Since pre-1.0.0.
34
+
35
+ #=============================================================================
36
+ # Copyright 2014 Alex Merry <alex.merry@kde.org>
37
+ # Copyright 2014 Martin Gräßlin <mgraesslin@kde.org>
38
+ #
39
+ # Redistribution and use in source and binary forms, with or without
40
+ # modification, are permitted provided that the following conditions
41
+ # are met:
42
+ #
43
+ # 1. Redistributions of source code must retain the copyright
44
+ # notice, this list of conditions and the following disclaimer.
45
+ # 2. Redistributions in binary form must reproduce the copyright
46
+ # notice, this list of conditions and the following disclaimer in the
47
+ # documentation and/or other materials provided with the distribution.
48
+ # 3. The name of the author may not be used to endorse or promote products
49
+ # derived from this software without specific prior written permission.
50
+ #
51
+ # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
52
+ # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
53
+ # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
54
+ # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
55
+ # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
56
+ # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57
+ # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58
+ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59
+ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
60
+ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
61
+ #=============================================================================
62
+
63
+ include(CheckCXXSourceCompiles)
64
+ include(CMakePushCheckState)
65
+
66
+ # Use pkg-config to get the directories and then use these values
67
+ # in the FIND_PATH() and FIND_LIBRARY() calls
68
+ find_package(PkgConfig)
69
+ pkg_check_modules(PKG_EGL QUIET egl)
70
+
71
+ set(EGL_DEFINITIONS ${PKG_EGL_CFLAGS_OTHER})
72
+
73
+ find_path(EGL_INCLUDE_DIR
74
+ NAMES
75
+ EGL/egl.h
76
+ HINTS
77
+ ${PKG_EGL_INCLUDE_DIRS}
78
+ )
79
+ find_library(EGL_LIBRARY
80
+ NAMES
81
+ EGL
82
+ HINTS
83
+ ${PKG_EGL_LIBRARY_DIRS}
84
+ )
85
+
86
+ # NB: We do *not* use the version information from pkg-config, as that
87
+ # is the implementation version (eg: the Mesa version)
88
+ if(EGL_INCLUDE_DIR)
89
+ # egl.h has defines of the form EGL_VERSION_x_y for each supported
90
+ # version; so the header for EGL 1.1 will define EGL_VERSION_1_0 and
91
+ # EGL_VERSION_1_1. Finding the highest supported version involves
92
+ # finding all these defines and selecting the highest numbered.
93
+ file(READ "${EGL_INCLUDE_DIR}/EGL/egl.h" _EGL_header_contents)
94
+ string(REGEX MATCHALL
95
+ "[ \t]EGL_VERSION_[0-9_]+"
96
+ _EGL_version_lines
97
+ "${_EGL_header_contents}"
98
+ )
99
+ unset(_EGL_header_contents)
100
+ foreach(_EGL_version_line ${_EGL_version_lines})
101
+ string(REGEX REPLACE
102
+ "[ \t]EGL_VERSION_([0-9_]+)"
103
+ "\\1"
104
+ _version_candidate
105
+ "${_EGL_version_line}"
106
+ )
107
+ string(REPLACE "_" "." _version_candidate "${_version_candidate}")
108
+ if(NOT DEFINED EGL_VERSION OR EGL_VERSION VERSION_LESS _version_candidate)
109
+ set(EGL_VERSION "${_version_candidate}")
110
+ endif()
111
+ endforeach()
112
+ unset(_EGL_version_lines)
113
+ endif()
114
+
115
+ cmake_push_check_state(RESET)
116
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}")
117
+ list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}")
118
+
119
+ check_cxx_source_compiles("
120
+ #include <EGL/egl.h>
121
+
122
+ int main(int argc, char *argv[]) {
123
+ EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;
124
+ eglDestroyContext(dpy, ctx);
125
+ }" HAVE_EGL)
126
+
127
+ cmake_pop_check_state()
128
+
129
+ include(FindPackageHandleStandardArgs)
130
+ find_package_handle_standard_args(EGL
131
+ FOUND_VAR
132
+ EGL_FOUND
133
+ REQUIRED_VARS
134
+ EGL_LIBRARY
135
+ EGL_INCLUDE_DIR
136
+ HAVE_EGL
137
+ VERSION_VAR
138
+ EGL_VERSION
139
+ )
140
+
141
+ if(EGL_FOUND AND NOT TARGET EGL::EGL)
142
+ add_library(EGL::EGL UNKNOWN IMPORTED)
143
+ set_target_properties(EGL::EGL PROPERTIES
144
+ IMPORTED_LOCATION "${EGL_LIBRARY}"
145
+ INTERFACE_COMPILE_OPTIONS "${EGL_DEFINITIONS}"
146
+ INTERFACE_INCLUDE_DIRECTORIES "${EGL_INCLUDE_DIR}"
147
+ )
148
+ endif()
149
+
150
+ mark_as_advanced(EGL_LIBRARY EGL_INCLUDE_DIR HAVE_EGL)
151
+
152
+ # compatibility variables
153
+ set(EGL_LIBRARIES ${EGL_LIBRARY})
154
+ set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR})
155
+ set(EGL_VERSION_STRING ${EGL_VERSION})
156
+
157
+ include(FeatureSummary)
158
+ set_package_properties(EGL PROPERTIES
159
+ URL "https://www.khronos.org/egl/"
160
+ DESCRIPTION "A platform-agnostic mechanism for creating rendering surfaces for use with other graphics libraries, such as OpenGL|ES and OpenVG."
161
+ )
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindEmbree.cmake ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+ ## Important Note:
11
+ ## This is not an official Find*cmake. It has been written for searching through
12
+ ## a custom path (EMBREE_DIR) before checking elsewhere.
13
+ ##
14
+ ## FindEMBREE.cmake
15
+ ## Find EMBREE's includes and library
16
+ ##
17
+ ## This module defines :
18
+ ## [in] EMBREE_DIR, The base directory to search for EMBREE (as cmake var or env var)
19
+ ## [out] EMBREE_INCLUDE_DIR where to find EMBREE.h
20
+ ## [out] EMBREE_LIBRARIES, EMBREE_LIBRARY, libraries to link against to use EMBREE
21
+ ## [out] EMBREE_FOUND, If false, do not try to use EMBREE.
22
+ ##
23
+
24
+
25
+ if(NOT EMBREE_DIR)
26
+ set(EMBREE_DIR "$ENV{EMBREE_DIR}" CACHE PATH "EMBREE root directory")
27
+ endif()
28
+ if(EMBREE_DIR)
29
+ file(TO_CMAKE_PATH ${EMBREE_DIR} EMBREE_DIR)
30
+ endif()
31
+
32
+
33
+ ## set the LIB POSTFIX to find in a right directory according to what kind of compiler we use (32/64bits)
34
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
35
+ set(EMBREE_SEARCH_LIB "lib64")
36
+ set(EMBREE_SEARCH_BIN "bin64")
37
+ set(EMBREE_SEARCH_LIB_PATHSUFFIXE "x64")
38
+ else()
39
+ set(EMBREE_SEARCH_LIB "lib32")
40
+ set(EMBREE_SEARCH_BIN "bin32")
41
+ set(EMBREE_SEARCH_LIB_PATHSUFFIXE "x86")
42
+ endif()
43
+
44
+ set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
45
+
46
+ FIND_PATH(EMBREE_INCLUDE_DIR
47
+ NAMES embree3/rtcore_geometry.h
48
+ PATHS
49
+ ${EMBREE_DIR}
50
+ ## linux
51
+ /usr
52
+ /usr/local
53
+ /opt/local
54
+ ## windows
55
+ "$ENV{PROGRAMFILES}/EMBREE"
56
+ "$ENV{${PROGRAMFILESx86}}/EMBREE"
57
+ "$ENV{ProgramW6432}/EMBREE"
58
+ PATH_SUFFIXES include
59
+ )
60
+
61
+ FIND_LIBRARY(EMBREE_LIBRARY
62
+ NAMES embree3
63
+ PATHS
64
+ ${EMBREE_DIR}/${EMBREE_SEARCH_LIB}
65
+ ${EMBREE_DIR}/lib
66
+ ## linux
67
+ /usr/${EMBREE_SEARCH_LIB}
68
+ /usr/local/${EMBREE_SEARCH_LIB}
69
+ /opt/local/${EMBREE_SEARCH_LIB}
70
+ /usr/lib
71
+ /usr/local/lib
72
+ /opt/local/lib
73
+ ## windows
74
+ "$ENV{PROGRAMFILES}/EMBREE/${EMBREE_SEARCH_LIB}"
75
+ "$ENV{${PROGRAMFILESx86}}/EMBREE/${EMBREE_SEARCH_LIB}"
76
+ "$ENV{ProgramW6432}/EMBREE/${EMBREE_SEARCH_LIB}"
77
+ "$ENV{PROGRAMFILES}/EMBREE/lib"
78
+ "$ENV{${PROGRAMFILESx86}}/EMBREE/lib"
79
+ "$ENV{ProgramW6432}/EMBREE/lib"
80
+ PATH_SUFFIXES ${EMBREE_SEARCH_LIB_PATHSUFFIXE}
81
+ )
82
+ set(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
83
+
84
+ MARK_AS_ADVANCED(EMBREE_INCLUDE_DIR EMBREE_LIBRARIES)
85
+
86
+ INCLUDE(FindPackageHandleStandardArgs)
87
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE
88
+ REQUIRED_VARS EMBREE_INCLUDE_DIR EMBREE_LIBRARIES
89
+ FAIL_MESSAGE "EMBREE wasn't found correctly. Set EMBREE_DIR to the root SDK installation directory."
90
+ )
91
+
92
+ if(NOT EMBREE_FOUND)
93
+ set(EMBREE_DIR "" CACHE STRING "Path to EMBREE install directory")
94
+ endif()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindFFMPEG.cmake ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## Try to find the FFMPEG library
12
+ ## Once done this will define
13
+ ##
14
+ ## FFMPEG_FOUND - system has FFmpeg
15
+ ## FFMPEG_INCLUDE_DIR - The FFmpeg include directory
16
+ ## FFMPEG_LIBRARIES - The libraries needed to use FFmpeg
17
+ ## FFMPEG_DYNAMIC_LIBS - DLLs for windows
18
+
19
+
20
+ if(NOT FFMPEG_DIR)
21
+ set(FFMPEG_DIR "$ENV{FFMPEG_DIR}" CACHE PATH "FFMPEG_DIR root directory")
22
+ endif()
23
+
24
+ if(FFMPEG_DIR)
25
+ file(TO_CMAKE_PATH ${FFMPEG_DIR} FFMPEG_DIR)
26
+ endif()
27
+
28
+ MACRO(FFMPEG_FIND varname shortname headername)
29
+
30
+ # Path to include dirs
31
+ FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS
32
+ NAMES "lib${shortname}/${headername}"
33
+ PATHS
34
+ "${FFMPEG_DIR}/include" # modify this to adapt according to OS/compiler
35
+ "/usr/include"
36
+ "/usr/include/ffmpeg"
37
+ )
38
+
39
+ #Add libraries
40
+ IF(${FFMPEG_${varname}_INCLUDE_DIRS} STREQUAL "FFMPEG_${varname}_INCLUDE_DIR-NOTFOUND")
41
+ MESSAGE(STATUS "Can't find includes for ${shortname}...")
42
+ ELSE()
43
+ FIND_LIBRARY(FFMPEG_${varname}_LIBRARIES
44
+ NAMES ${shortname}
45
+ PATHS
46
+ ${FFMPEG_DIR}/lib
47
+ "/usr/lib"
48
+ "/usr/lib64"
49
+ "/usr/local/lib"
50
+ "/usr/local/lib64"
51
+ )
52
+
53
+ # set libraries and other variables
54
+ SET(FFMPEG_${varname}_FOUND 1)
55
+ SET(FFMPEG_${varname}_INCLUDE_DIRS ${FFMPEG_${varname}_INCLUDE_DIR})
56
+ SET(FFMPEG_${varname}_LIBS ${FFMPEG_${varname}_LIBRARIES})
57
+ ENDIF()
58
+ ENDMACRO(FFMPEG_FIND)
59
+
60
+ #Calls to ffmpeg_find to get librarires ------------------------------
61
+ FFMPEG_FIND(LIBAVFORMAT avformat avformat.h)
62
+ FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h)
63
+ FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h)
64
+ FFMPEG_FIND(LIBAVUTIL avutil avutil.h)
65
+ FFMPEG_FIND(LIBSWSCALE swscale swscale.h)
66
+
67
+ # check if libs are found and set FFMPEG related variables
68
+ #SET(FFMPEG_FOUND "NO")
69
+ IF(FFMPEG_LIBAVFORMAT_FOUND
70
+ AND FFMPEG_LIBAVDEVICE_FOUND
71
+ AND FFMPEG_LIBAVCODEC_FOUND
72
+ AND FFMPEG_LIBAVUTIL_FOUND
73
+ AND FFMPEG_LIBSWSCALE_FOUND)
74
+
75
+ # All ffmpeg libs are here
76
+ SET(FFMPEG_FOUND "YES")
77
+ SET(FFMPEG_INCLUDE_DIR ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
78
+ SET(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBAVFORMAT_LIBRARY_DIRS})
79
+ SET(FFMPEG_LIBRARIES
80
+ ${FFMPEG_LIBAVFORMAT_LIBS}
81
+ ${FFMPEG_LIBAVDEVICE_LIBS}
82
+ ${FFMPEG_LIBAVCODEC_LIBS}
83
+ ${FFMPEG_LIBAVUTIL_LIBS}
84
+ ${FFMPEG_LIBSWSCALE_LIBS} )
85
+
86
+ # add dynamic libraries
87
+ if(WIN32)
88
+ file(GLOB FFMPEG_DYNAMIC_LIBS "${FFMPEG_DIR}/bin/*.dll")
89
+ if(NOT FFMPEG_DYNAMIC_LIBS)
90
+ message("FFMPEG_DYNAMIC_LIBS is missing...")
91
+ endif()
92
+ set(FFMPEG_DYNAMIC_LIBS ${FFMPEG_DYNAMIC_LIBS} CACHE PATH "Windows dll location")
93
+ endif()
94
+
95
+ mark_as_advanced(FFMPEG_INCLUDE_DIR FFMPEG_LIBRARY_DIRS FFMPEG_LIBRARIES FFMPEG_DYNAMIC_LIBS)
96
+ ELSE ()
97
+ MESSAGE(STATUS "Could not find FFMPEG")
98
+ ENDIF()
99
+
100
+
101
+ INCLUDE(FindPackageHandleStandardArgs)
102
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFMPEG
103
+ REQUIRED_VARS FFMPEG_INCLUDE_DIR FFMPEG_LIBRARIES
104
+ FAIL_MESSAGE "FFmpeg wasn't found correctly. Set FFMPEG_DIR to the root SDK installation directory."
105
+ )
106
+
107
+ if(NOT FFMPEG_FOUND)
108
+ set(FFMPEG_DIR "" CACHE STRING "Path to FFmpeg install directory")
109
+ endif()
110
+
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Modules/FindGLFW.cmake ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##=============================================================================
2
+ ##
3
+ ## Copyright (c) Kitware, Inc.
4
+ ## All rights reserved.
5
+ ## See LICENSE.txt for details.
6
+ ##
7
+ ## This software is distributed WITHOUT ANY WARRANTY; without even
8
+ ## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9
+ ## PURPOSE. See the above copyright notice for more information.
10
+ ##
11
+ ## Copyright 2016 Sandia Corporation.
12
+ ## Copyright 2016 UT-Battelle, LLC.
13
+ ## Copyright 2016 Los Alamos National Security.
14
+ ##
15
+ ## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
16
+ ## the U.S. Government retains certain rights in this software.
17
+ ## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
18
+ ## Laboratory (LANL), the U.S. Government retains certain rights in
19
+ ## this software.
20
+ ##
21
+ ##=============================================================================
22
+ # Try to find EGL library and include dir.
23
+ # Once done this will define
24
+ #
25
+ # GLFW_FOUND
26
+ # GLFW_INCLUDE_DIR
27
+ # GLFW_LIBRARY
28
+ #
29
+
30
+ include(FindPackageHandleStandardArgs)
31
+
32
+ if (WIN32)
33
+ find_path( GLFW_INCLUDE_DIR
34
+ NAMES
35
+ GLFW/glfw3.h
36
+ PATHS
37
+ ${PROJECT_SOURCE_DIR}/shared_external/glfw/include
38
+ ${PROJECT_SOURCE_DIR}/../shared_external/glfw/include
39
+ ${GLFW_LOCATION}/include
40
+ $ENV{GLFW_LOCATION}/include
41
+ $ENV{PROGRAMFILES}/GLFW/include
42
+ ${GLFW_LOCATION}
43
+ $ENV{GLFW_LOCATION}
44
+ DOC "The directory where GLFW/glfw3.h resides" )
45
+ if(ARCH STREQUAL "x86")
46
+ find_library( GLFW_LIBRARY
47
+ NAMES
48
+ glfw3
49
+ PATHS
50
+ ${GLFW_LOCATION}/lib
51
+ $ENV{GLFW_LOCATION}/lib
52
+ $ENV{PROGRAMFILES}/GLFW/lib
53
+ DOC "The GLFW library")
54
+ else()
55
+ find_library( GLFW_LIBRARY
56
+ NAMES
57
+ glfw3
58
+ PATHS
59
+ ${GLFW_LOCATION}/lib
60
+ $ENV{GLFW_LOCATION}/lib
61
+ $ENV{PROGRAMFILES}/GLFW/lib
62
+ DOC "The GLFW library")
63
+ endif()
64
+ endif ()
65
+
66
+ if (${CMAKE_HOST_UNIX})
67
+ message("GFLW LOCATION " $ENV{GLFW_LOCATION} )
68
+ find_path( GLFW_INCLUDE_DIR
69
+ NAMES
70
+ GLFW/glfw3.h
71
+ PATHS
72
+ # ${GLFW_LOCATION}/include
73
+ $ENV{GLFW_LOCATION}/include
74
+ # /usr/include
75
+ # /usr/local/include
76
+ # /sw/include
77
+ # /opt/local/include
78
+ # NO_DEFAULT_PATH
79
+ DOC "The directory where GLFW/glfw3.h resides"
80
+ )
81
+ find_library( GLFW_LIBRARY
82
+ NAMES
83
+ glfw3 glfw
84
+ PATHS
85
+ # ${GLFW_LOCATION}/lib
86
+ $ENV{GLFW_LOCATION}/lib
87
+ $ENV{GLFW_LOCATION}/lib64
88
+ # /usr/lib64
89
+ # /usr/lib
90
+ # /usr/local/lib64
91
+ # /usr/local/lib
92
+ # /sw/lib
93
+ # /opt/local/lib
94
+ # /usr/lib/x86_64-linux-gnu
95
+ # NO_DEFAULT_PATH
96
+ DOC "The GLFW library")
97
+
98
+ set( GLFW_INCLUDE_DIR $ENV{GLFW_LOCATION}/include )
99
+ set( GLFW_LIBRARY $ENV{GLFW_LOCATION}/lib64/libglfw3.a )
100
+ message("*************==========> FindGLFW .cmake " ${GLFW_INCLUDE_DIR} " LIB " ${GLFW_LIBRARY} )
101
+ endif ()
102
+
103
+ find_package_handle_standard_args(GLFW DEFAULT_MSG
104
+ GLFW_INCLUDE_DIR
105
+ GLFW_LIBRARY
106
+ )
107
+
108
+ mark_as_advanced( GLFW_FOUND )
109
+
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/Win3rdParty.cmake ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## This file should be include and use only on WIN32 OS and once
12
+ ## It allow to auto check/download and use a preconfigured 3rdParty binaries for cmake usage
13
+ ## It use the downloadAndExtractZipFile cmake module to work.
14
+ ##
15
+ if(__Win3rdParty_cmake_INCLUDED__)
16
+ return()
17
+ else()
18
+ set(__Win3rdParty_cmake_INCLUDED__ ON)
19
+ endif()
20
+
21
+
22
+ ##
23
+ ## To be sure to reset an empty cached variable but keep any other kind of variables
24
+ ##
25
+ ## Usage:
26
+ ## check_cached_var(<var> <resetedCachedValue> <cacheType> <cacheDoc> [FORCE])
27
+ ##
28
+ ## <var> is the cached cmake variable you need to reset
29
+ ## <resetedCachedValue> is the new default value of the reseted cached cmake variable
30
+ ## <cacheType> is the kind of GUI cache input can be : FILEPATH; PATH; STRING or BOOL
31
+ ## <cacheDoc> is the associated GUI cache input documentation display in the GUI
32
+ ## FORCE option could be use to reset a cached variable even if it is not empty.
33
+ ##
34
+ macro(check_cached_var var resetedCachedValue cacheType cacheDoc)
35
+ # message(STATUS "inside check_cached_var macro. argn=${ARGN}")
36
+ cmake_parse_arguments(ccv "FORCE" "" "" ${ARGN})
37
+
38
+ if(ccv_FORCE)
39
+ set(FORCE FORCE)
40
+ else()
41
+ set(FORCE )
42
+ endif()
43
+
44
+ if(NOT ${var} OR ccv_FORCE)
45
+ unset(${var} CACHE)
46
+ # message(STATUS "setting new cache value. var ${var} = ${resetedCachedValue}")
47
+ set(${var} "${resetedCachedValue}" CACHE ${cacheType} "${cacheDoc}" ${FORCE})
48
+ endif()
49
+ endmacro()
50
+
51
+
52
+ ##
53
+ ## Win3rdParty function allow to specify a directory which contain all necessary windows dependenties.
54
+ ## By uploading 3rdParty directory (which contain dependencies, *.lib, *.dll... for a specific version of compiler) onto Gforge file tab,
55
+ ## you get back an URL of download you can give to this function with a directory name. So you can provide multiple 3rdParty version of same dependencies (MSVC11, MSVC12...).
56
+ ## By providing a prefix to this function, you allow to use different kind of 3rdParty which can be handled by CMAKE OPTIONS depending on what your framework need for example.
57
+ ##
58
+ ## Usage 1:
59
+ ## Win3rdParty(<prefix> MSVC<XX> <DirName> <URL>
60
+ ## [MSVC<XX> <DirName> <URL>] [...]
61
+ ## [VCID] [DEFAULT_USE] [VERBOSE] )
62
+ ##
63
+ ## * <prefix> allow to identify which 3rdParty you process (prefix name)
64
+ ## * MSVC<XX> flag could be MSVC11 or MSVC12 (any element of the MSVC_VERSIONS_LIST) and refer to a 3rdParty compiler with :
65
+ ## * <DirName> which will be the local pathName of the downloaded 3rdParty : relative to CMAKE_BINARY_DIR
66
+ ## * <URL> which is the link location of the 3rdParty zip
67
+ ## * VCID flag will make available a cache variable ${prefix}_WIN3RDPARTY_VCID
68
+ ## * DEFAULT_USE flag [ON|OFF] may be used to set default value of cmake cached variable : <prefix>_WIN3RDPARTY_USE [default to ON]
69
+ ##
70
+ ## WARNING:
71
+ ## This function define CACHE variables you can use after :
72
+ ## * ${prefix}_WIN3RDPARTY_USE : allow to check/downloaded win3rdParty dir (it will force the cached variables for this dependency folder generally <prefix>_DIR>)
73
+ ## * ${prefix}_WIN3RDPARTY_DIR : where is your local win3rdParty dir (the PATH)
74
+ ## * ${prefix}_WIN3RDPARTY_VCID : [if VCID flag is used] the MSVC id (commonly used to prefix/suffix library name, see boost or CGAL)
75
+ ##
76
+ ## If you want to add a win3rdParty version, please:
77
+ ## 1- build dependencies on your local side with the compiler you want
78
+ ## 2- build your own zip with your built dependencies
79
+ ## 3- upload it (onto the forge where the project is stored) and copy the link location in order to use it for this function
80
+ ## 4- if you just introduced a new MSVC version, add it to the MSVC_VERSIONS_LIST bellow
81
+ ##
82
+ ## In a second pass, you can also use this function to set necessary cmake cached variables in order to let cmake find packages of these 3rdParty.
83
+ ##
84
+ ## Usage 2:
85
+ ## win3rdParty(<prefix> [VERBOSE] MULTI_SET|SET
86
+ ## CHECK_CACHED_VAR <cmakeVar> <cmakeCacheType> [LIST] <cmakeValue> [DOC <stringToolTips>]
87
+ ## [ CHECK_CACHED_VAR <cmakeVar> <cmakeCacheType> [LIST] <cmakeValue> [DOC <stringToolTips>] ] [...]
88
+ ##
89
+ ## * MULTI_SET or SET flags are used to tell cmake that all next arguments will use repeated flags with differents entries (SET mean we will provide only one set of arguments, without repetition)
90
+ ## * CHECK_CACHED_VAR are the repeated flag which contain differents entries
91
+ ## * <cmakeVar> is the cmake variable you want to be cached for the project
92
+ ## * <cmakeCacheType> is the kind of cmake variable (couble be: FILEPATH; PATH; STRING or BOOL) => see check_cached_var.
93
+ ## * LIST optional flag could be used with CHECK_CACHED_VAR when <cmakeCacheType> = STRING. It allow to handle multiple STRINGS value list.
94
+ ## * <cmakeValue> is the value of the variable (if FILEPATH, PATH or STRING: use quotes, if BOOL : use ON/OFF)
95
+ ## * DOC optional flag is used to have a tooltips info about this new cmake variable entry into the GUI (use quotes).
96
+ ##
97
+ ## Full example 1 :
98
+ ## win3rdParty(COMMON MSVC11 "win3rdParty-MSVC11" "https://path.to/an.archive.7z"
99
+ ## SET CHECK_CACHED_VAR SuiteSparse_DIR PATH "SuiteSparse-4.2.1" DOC "default empty doc"
100
+ ## )
101
+ ##
102
+ ## WARNING:
103
+ ## For the 2nd usage (with MULTI_SET), if you planned to set some CACHED_VAR using/composed by ${prefix}_WIN3RDPARTY_* just set in this macro (usage 1),
104
+ ## then (due to the not yet existing var) you will need to call this function 2 times :
105
+ ## One for the 1st usage (downloading of the current compiler 3rdParty).
106
+ ## One for the MLUTI_SET flag which will use existsing ${prefix}_WIN3RDPARTY_* cached var.
107
+ ##
108
+ ## Full example 2 :
109
+ ## win3rdParty(COMMON MSVC11 "win3rdParty-MSVC11" "https://path.to/an.archive.7z")
110
+ ## win3rdParty(COMMON MULTI_SET
111
+ ## CHECK_CACHED_VAR CGAL_INCLUDE_DIR PATH "CGAL-4.3/include" DOC "default empty doc"
112
+ ## CHECK_CACHED_VAR CGAL_LIBRARIES STRING LIST "debug;CGAL-4.3/lib${LIB_POSTFIX}/CGAL-${WIN3RDPARTY_COMMON_VCID}-mt-gd-4.3.lib;optimized;CGAL-4.3/lib${LIB_POSTFIX}/CGAL-${WIN3RDPARTY_COMMON_VCID}-mt-4.3.lib"
113
+ ##
114
+ ##
115
+ ## WARNING: This function use internaly :
116
+ ## * downloadAndExtractZipFile.cmake
117
+ ## * parse_arguments_multi.cmake
118
+ ## * check_cached_var macro
119
+ ##
120
+ function(win3rdParty prefix )
121
+
122
+ # ARGV: list of all arguments given to the macro/function
123
+ # ARGN: list of remaining arguments
124
+
125
+ if(NOT WIN32)
126
+ return()
127
+ endif()
128
+
129
+ ## set the handled version of MSVC
130
+ ## if you plan to add a win3rdParty dir to download with a new MSVC version: build the win3rdParty dir and add the MSCV entry here.
131
+ set(MSVC_VERSIONS_LIST "MSVC17;MSVC11;MSVC12;MSVC14")
132
+
133
+ #include(CMakeParseArguments) # CMakeParseArguments is obsolete since cmake 3.5
134
+ # cmake_parse_arguments (<prefix> <options> <one_value_keywords> <multi_value_keywords> args)
135
+ # <options> : options (flags) pass to the macro
136
+ # <one_value_keywords> : options that neeed a value
137
+ # <multi_value_keywords> : options that neeed more than one value
138
+ cmake_parse_arguments(w3p "VCID" "VERBOSE;TIMEOUT;DEFAULT_USE" "${MSVC_VERSIONS_LIST};MULTI_SET;SET" ${ARGN})
139
+
140
+ # message(STATUS "value of w3p_VCID = ${w3p_VCID}")
141
+ # message(STATUS "value of w3p_VERBOSE = ${w3p_VERBOSE}")
142
+ # message(STATUS "value of w3p_TIMEOUT = ${w3p_TIMEOUT}")
143
+ # message(STATUS "value of w3p_DEFAULT_USE = ${w3p_DEFAULT_USE}")
144
+
145
+ # foreach (loop_var ${MSVC_VERSIONS_LIST})
146
+ # message(STATUS "value of w3p_${loop_var} = ${w3p_${loop_var}}")
147
+ # endforeach(loop_var)
148
+
149
+ # message(STATUS "value of w3p_MULTI_SET = ${w3p_MULTI_SET}")
150
+ # message(STATUS "value of w3p_SET = ${w3p_SET}")
151
+
152
+ # message("values for MSVC = ${w3p_MSVC14}")
153
+
154
+ if(NOT w3p_TIMEOUT)
155
+ set(w3p_TIMEOUT 300)
156
+ endif()
157
+
158
+ if(NOT DEFINED w3p_DEFAULT_USE)
159
+ set(w3p_DEFAULT_USE ON)
160
+ endif()
161
+
162
+
163
+ ## 1st use (check/update|download) :
164
+ set(${prefix}_WIN3RDPARTY_USE ${w3p_DEFAULT_USE} CACHE BOOL "Use required 3rdParty binaries from ${prefix}_WIN3RDPARTY_DIR or download it if not exist")
165
+
166
+
167
+ ## We want to test if each version of MSVC was filled by the function (see associated parameters)
168
+ ## As CMake is running only for one version of MSVC, if that MSVC version was filled, we get back associated parameters,
169
+ ## otherwise we can't use the downloadAndExtractZipFile with win3rdParty.
170
+ set(enableWin3rdParty OFF)
171
+
172
+ foreach(MSVC_VER ${MSVC_VERSIONS_LIST})
173
+ if(${MSVC_VER} AND w3p_${MSVC_VER} OR ${MSVC_TOOLSET_VERSION} EQUAL 143 AND ${MSVC_VER} STREQUAL "MSVC17")
174
+ list(LENGTH w3p_${MSVC_VER} count)
175
+ if("${count}" LESS "2")
176
+ #message(WARNING "You are using ${MSVC_VER} with ${prefix}_WIN3RDPARTY_USE=${${prefix}_WIN3RDPARTY_USE}, but win3rdParty function isn't filled for ${MSVC_VER}!")
177
+ else()
178
+ list(GET w3p_${MSVC_VER} 0 Win3rdPartyName)
179
+ list(GET w3p_${MSVC_VER} 1 Win3rdPartyUrl)
180
+ if(w3p_VCID)
181
+ ## try to get the VcId of MSVC. See also MSVC_VERSION cmake var in the doc.
182
+ string(REGEX REPLACE "MS([A-Za-z_0-9-]+)" "\\1" vcId ${MSVC_VER})
183
+ string(TOLOWER ${vcId} vcId)
184
+ set(${prefix}_WIN3RDPARTY_VCID "${vcId}0" CACHE STRING "the MSVC id (commonly used to prefix/suffix library name, see boost or CGAL)")
185
+ mark_as_advanced(${prefix}_WIN3RDPARTY_VCID)
186
+ endif()
187
+ set(enableWin3rdParty ON)
188
+ set(suffixCompilerID ${MSVC_VER})
189
+ break()
190
+ endif()
191
+ endif()
192
+ endforeach()
193
+ ## If previous step succeed to get MSVC dirname and URL of the current MSVC version, use it to auto download/update the win3rdParty dir
194
+ if(enableWin3rdParty AND ${prefix}_WIN3RDPARTY_USE)
195
+
196
+ if(IS_ABSOLUTE "${Win3rdPartyName}")
197
+ else()
198
+ set(Win3rdPartyName "${CMAKE_BINARY_DIR}/${Win3rdPartyName}")
199
+ endif()
200
+
201
+ if(NOT EXISTS "${Win3rdPartyName}")
202
+ file(MAKE_DIRECTORY ${Win3rdPartyName})
203
+ endif()
204
+
205
+ include(downloadAndExtractZipFile)
206
+ downloadAndExtractZipFile( "${Win3rdPartyUrl}" ## URL link location
207
+ "Win3rdParty-${prefix}-${suffixCompilerID}.7z" ## where download it: relative path, so default to CMAKE_BINARY_DIR
208
+ "${Win3rdPartyName}" ## where extract it : fullPath (default relative to CMAKE_BINARY_DIR)
209
+ CHECK_DIRTY_URL "${Win3rdPartyName}/Win3rdPartyUrl" ## last downloaded url file : fullPath (default relative to CMAKE_BINARY_DIR)
210
+ TIMEOUT ${w3p_TIMEOUT}
211
+ VERBOSE ${w3p_VERBOSE}
212
+ )
213
+ file(GLOB checkDl "${Win3rdPartyName}/*")
214
+ list(LENGTH checkDl checkDlCount)
215
+ if("${checkDlCount}" GREATER "1")
216
+ else()
217
+ message("The downloadAndExtractZipFile didn't work...?")
218
+ set(enableWin3rdParty OFF)
219
+ endif()
220
+ endif()
221
+
222
+ ## Try to auto set ${prefix}_WIN3RDPARTY_DIR or let user set it manually
223
+ set(${prefix}_WIN3RDPARTY_DIR "" CACHE PATH "windows ${Win3rdPartyName} dir to ${prefix} dependencies of the project")
224
+
225
+ if(NOT ${prefix}_WIN3RDPARTY_DIR AND ${prefix}_WIN3RDPARTY_USE)
226
+ if(EXISTS "${Win3rdPartyName}")
227
+ unset(${prefix}_WIN3RDPARTY_DIR CACHE)
228
+ set(${prefix}_WIN3RDPARTY_DIR "${Win3rdPartyName}" CACHE PATH "dir to ${prefix} dependencies of the project")
229
+ endif()
230
+ endif()
231
+
232
+ if(EXISTS ${${prefix}_WIN3RDPARTY_DIR})
233
+ message(STATUS "Found a 3rdParty ${prefix} dir : ${${prefix}_WIN3RDPARTY_DIR}.")
234
+ set(enableWin3rdParty ON)
235
+ elseif(${prefix}_WIN3RDPARTY_USE)
236
+ message(WARNING "${prefix}_WIN3RDPARTY_USE=${${prefix}_WIN3RDPARTY_USE} but ${prefix}_WIN3RDPARTY_DIR=${${prefix}_WIN3RDPARTY_DIR}.")
237
+ set(enableWin3rdParty OFF)
238
+ endif()
239
+
240
+ ## Final check
241
+ if(NOT enableWin3rdParty)
242
+ message("Disable ${prefix}_WIN3RDPARTY_USE (cmake cached var will be not set), due to a win3rdParty problem.")
243
+ message("You still can set ${prefix}_WIN3RDPARTY_DIR to an already downloaded Win3rdParty directory location.")
244
+ set(${prefix}_WIN3RDPARTY_USE OFF CACHE BOOL "Use required 3rdParty binaries from ${prefix}_WIN3RDPARTY_DIR or download it if not exist" FORCE)
245
+ endif()
246
+
247
+ ## 2nd use : handle multi values args to set cached cmake variables in order to ease the next find_package call
248
+ if(${prefix}_WIN3RDPARTY_USE AND ${prefix}_WIN3RDPARTY_DIR)
249
+ if(w3p_VERBOSE)
250
+ message(STATUS "Try to set cmake cached variables for ${prefix} required libraries directly from : ${${prefix}_WIN3RDPARTY_DIR}.")
251
+ endif()
252
+
253
+ include(parse_arguments_multi)
254
+ # message (STATUS "before defining an override of parse_arguments_multi_function")
255
+ function(parse_arguments_multi_function ) ## overloaded function to handle all CHECK_CACHED_VAR values list (see: parse_arguments_multi)
256
+ # message(STATUS "inside overloaded parse_arguments_multi_function defined in Win3rdParty.cmake")
257
+ # message(STATUS ${ARGN})
258
+ ## we know the function take 3 args : var cacheType resetedCachedValue (see check_cached_var)
259
+ cmake_parse_arguments(pamf "" "DOC" "LIST" ${ARGN})
260
+
261
+ ## var and cacheType are mandatory (with the resetedCachedValue)
262
+ set(var ${ARGV0})
263
+ set(cacheType ${ARGV1})
264
+ # message(STATUS "var=${var} and cacheType=${cacheType} list=${pamf_LIST}")
265
+ if(pamf_DOC)
266
+ set(cacheDoc ${pamf_DOC})
267
+ else()
268
+ set(cacheDoc "")
269
+ endif()
270
+ if(pamf_LIST)
271
+ set(value ${pamf_LIST})
272
+ else()
273
+ # message("USING ARGV2 with value ${ARGV2}")
274
+ set(value ${ARGV2})
275
+ endif()
276
+ # message("inside override function in Win3rdparty.cmake value+ ${value}")
277
+ if("${cacheType}" MATCHES "PATH" AND EXISTS "${${prefix}_WIN3RDPARTY_DIR}/${value}")
278
+ # message("math with path")
279
+ set(resetedCachedValue "${${prefix}_WIN3RDPARTY_DIR}/${value}") ## path relative to ${prefix}_WIN3RDPARTY_DIR
280
+ elseif ("${cacheType}" MATCHES "PATH" AND EXISTS "${${prefix}_WIN3RDPARTY_DIR}")
281
+ set(resetedCachedValue "${${prefix}_WIN3RDPARTY_DIR}") ## path relative to ${prefix}_WIN3RDPARTY_DIR
282
+ elseif("${cacheType}" MATCHES "STRING")
283
+ foreach(var IN LISTS value)
284
+ if(EXISTS "${${prefix}_WIN3RDPARTY_DIR}/${var}")
285
+ list(APPEND resetedCachedValue "${${prefix}_WIN3RDPARTY_DIR}/${var}") ## string item of the string list is a path => make relative to ${prefix}_WIN3RDPARTY_DIR
286
+ else()
287
+ list(APPEND resetedCachedValue ${var}) ## string item of the string list is not an existing path => simply use the item
288
+ endif()
289
+ endforeach()
290
+ else()
291
+ set(resetedCachedValue "${value}") ## could be a BOOL or a STRING
292
+ endif()
293
+
294
+ ## call our macro to reset cmake cache variable if empty
295
+ check_cached_var(${var} "${resetedCachedValue}" ${cacheType} "${cacheDoc}" FORCE)
296
+
297
+ endfunction()
298
+ # message (STATUS "after defining an override of parse_arguments_multi_function")
299
+
300
+ if(w3p_MULTI_SET)
301
+ parse_arguments_multi(CHECK_CACHED_VAR w3p_MULTI_SET ${w3p_MULTI_SET}) ## internaly will call our overloaded parse_arguments_multi_function
302
+ elseif(w3p_SET)
303
+ # message("calling set version of parse_arguments_multi with w3p_set = ${w3p_SET}")
304
+ parse_arguments_multi(CHECK_CACHED_VAR w3p_SET ${w3p_SET})
305
+ endif()
306
+
307
+ endif()
308
+
309
+ endfunction()
310
+
311
+ ## cmake variables introspection to globally activate/deactivate ${prefix}_WIN3RDPARTY_USE
312
+ ## This "one shot" call (only one for the next cmake configure) will automatically then reset the global variable WIN3RDPARTY_USE to UserDefined (do nothing).
313
+ ## use (call it) before and after the call of all your win3rdParty functions
314
+ function(Win3rdPartyGlobalCacheAction )
315
+ set(WIN3RDPARTY_USE "UserDefined" CACHE STRING "Choose how to handle all cmake cached *_WIN3RDPARTY_USE for the next configure.\nCould be:\nUserDefined [default]\nActivateAll\nDesactivateAll" )
316
+ set_property(CACHE WIN3RDPARTY_USE PROPERTY STRINGS "UserDefined;ActivateAll;DesactivateAll" )
317
+ if(${WIN3RDPARTY_USE} MATCHES "UserDefined")
318
+ else()
319
+ if(${WIN3RDPARTY_USE} MATCHES "ActivateAll")
320
+ set(win3rdPvalue ON)
321
+ elseif(${WIN3RDPARTY_USE} MATCHES "DesactivateAll")
322
+ set(win3rdPvalue OFF)
323
+ endif()
324
+ get_cmake_property(_variableNames CACHE_VARIABLES)
325
+ foreach (_variableName ${_variableNames})
326
+ string(REGEX MATCH "[A-Za-z_0-9-]+_WIN3RDPARTY_USE" win3rdpartyUseCacheVar ${_variableName})
327
+ if(win3rdpartyUseCacheVar)
328
+ string(REGEX REPLACE "([A-Za-z_0-9-]+_WIN3RDPARTY_USE)" "\\1" win3rdpartyUseCacheVar ${_variableName})
329
+ set(${win3rdpartyUseCacheVar} ${win3rdPvalue} CACHE BOOL "Use required 3rdParty binaries from ${prefix}_WIN3RDPARTY_DIR or download it if not exist" FORCE)
330
+ message(STATUS "${win3rdpartyUseCacheVar} cached variable set to ${win3rdPvalue}.")
331
+ endif()
332
+ endforeach()
333
+ set(WIN3RDPARTY_USE "UserDefined" CACHE STRING "Choose how to handle all cmake cached *_WIN3RDPARTY_USE for the next configure.\nCould be:\nUserDefined [default]\nActivateAll\nDesactivateAll" FORCE)
334
+ message(STATUS "reset WIN3RDPARTY_USE to UserDefined.")
335
+ endif()
336
+ mark_as_advanced(WIN3RDPARTY_USE)
337
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/cmake_policies.cmake ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(__set_policies_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__set_policies_INCLUDED__ ON)
15
+ endif()
16
+
17
+ macro(setPolicies)
18
+ # No more policies to enforce
19
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/dependencies.cmake ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## Included once for all sub project.
12
+ ## It contain the whole cmake instructions to find necessary common dependencies.
13
+ ## 3rdParty (provided by sibr_addlibrary win3rdParty or from external packages) are then available in cmake sub projects.
14
+ ##
15
+ ## Do not include this file more than once but you can modify it to fit to your own project.
16
+ ## So please, read it carefully because you can use on of these dependencies for your project or appen new one.
17
+ ##
18
+ ## As it is included after camke options, you can use conditional if(<CMAKE_PROJ_OPT>)/endif() to encapsulate your 3rdParty.
19
+ ##
20
+
21
+ ## win3rdParty function allowing to auto check/download/update binaries dependencies for current windows compiler
22
+ ## Please open this file in order to get more documentation and usage examples.
23
+ include(Win3rdParty)
24
+
25
+ include(sibr_library)
26
+
27
+ Win3rdPartyGlobalCacheAction()
28
+
29
+ find_package(OpenGL REQUIRED)
30
+
31
+ set(OpenGL_GL_PREFERENCE "GLVND")
32
+
33
+ ############
34
+ ## Find GLEW
35
+ ############
36
+ ##for headless rendering
37
+ find_package(EGL QUIET)
38
+
39
+ if(EGL_FOUND)
40
+ add_definitions(-DGLEW_EGL)
41
+ message("Activating EGL support for headless GLFW/GLEW")
42
+ else()
43
+ message("EGL not found : EGL support for headless GLFW/GLEW is disabled")
44
+ endif()
45
+
46
+ if (MSVC11 OR MSVC12)
47
+ set(glew_multiset_arguments
48
+ CHECK_CACHED_VAR GLEW_INCLUDE_DIR PATH "glew-1.10.0/include" DOC "default empty doc"
49
+ CHECK_CACHED_VAR GLEW_LIBRARIES STRING LIST "debug;glew-1.10.0/${LIB_BUILT_DIR}/glew32d.lib;optimized;glew-1.10.0/${LIB_BUILT_DIR}/glew32.lib" DOC "default empty doc"
50
+ )
51
+ elseif (MSVC14 OR MSVC17)
52
+ set(glew_multiset_arguments
53
+ CHECK_CACHED_VAR GLEW_INCLUDE_DIR PATH "glew-2.0.0/include" DOC "default empty doc"
54
+ CHECK_CACHED_VAR GLEW_SHARED_LIBRARY_RELEASE PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32.lib"
55
+ CHECK_CACHED_VAR GLEW_STATIC_LIBRARY_RELEASE PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32s.lib"
56
+ CHECK_CACHED_VAR GLEW_SHARED_LIBRARY_DEBUG PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32d.lib"
57
+ CHECK_CACHED_VAR GLEW_STATIC_LIBRARY_DEBUG PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32sd.lib"
58
+ )
59
+ else ()
60
+ message("There is no provided GLEW library for your compiler, relying on find_package to find it")
61
+ endif()
62
+ sibr_addlibrary(NAME GLEW #VERBOSE ON
63
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/glew-1.10.0.7z"
64
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/glew-1.10.0.7z"
65
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/glew-2.0.0.7z" # using recompiled version of glew
66
+ MULTI_SET ${glew_multiset_arguments}
67
+ )
68
+ set(GLEW_VERBOSE ON)
69
+ FIND_PACKAGE(GLEW REQUIRED)
70
+ IF(GLEW_FOUND)
71
+ INCLUDE_DIRECTORIES(${GLEW_INCLUDE_DIR})
72
+ ELSE(GLEW_FOUND)
73
+ MESSAGE("GLEW not found. Set GLEW_DIR to base directory of GLEW.")
74
+ ENDIF(GLEW_FOUND)
75
+
76
+
77
+ ##############
78
+ ## Find ASSIMP
79
+ ##############
80
+ if (MSVC11 OR MSVC12)
81
+ set(assimp_set_arguments
82
+ CHECK_CACHED_VAR ASSIMP_DIR PATH "Assimp_3.1_fix"
83
+ )
84
+ elseif (MSVC14 OR MSVC17)
85
+ set(assimp_set_arguments
86
+ CHECK_CACHED_VAR ASSIMP_DIR PATH "Assimp-4.1.0"
87
+ )
88
+ else ()
89
+ message("There is no provided ASSIMP library for your compiler, relying on find_package to find it")
90
+ endif()
91
+
92
+ sibr_addlibrary(NAME ASSIMP #VERBOSE ON
93
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/Assimp_3.1_fix.7z"
94
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/Assimp_3.1_fix.7z"
95
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/Assimp-4.1.0.7z"
96
+ MULTI_SET
97
+ ${assimp_set_arguments}
98
+ )
99
+
100
+ find_package(ASSIMP REQUIRED)
101
+ include_directories(${ASSIMP_INCLUDE_DIR})
102
+
103
+ ################
104
+ ## Find FFMPEG
105
+ ################
106
+ sibr_addlibrary(NAME FFMPEG
107
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/ffmpeg.zip"
108
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/ffmpeg.zip"
109
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/ffmpeg-4.0.2-win64-win3rdParty.7z"
110
+ SET CHECK_CACHED_VAR FFMPEG_DIR PATH ${FFMPEG_WIN3RDPARTY_DIR}
111
+ )
112
+ find_package(FFMPEG)
113
+ include_directories(${FFMPEG_INCLUDE_DIR})
114
+ ## COMMENT OUT ALL FFMPEG FOR CLUSTER
115
+
116
+ ###################
117
+ ## Find embree3
118
+ ###################
119
+ sibr_addlibrary(
120
+ NAME embree3
121
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/embree2.7.0.x64.windows.7z"
122
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/embree-3.6.1.x64.vc14.windows.7z" # TODO SV: provide a valid version if required
123
+ )
124
+
125
+ # CLUSTER
126
+ #find_package(embree 3.0 REQUIRED PATHS "/data/graphdeco/share/embree/usr/local/lib64/cmake/" )
127
+ find_package(embree 3.0 )
128
+
129
+ ###################
130
+ ## Find eigen3
131
+ ###################
132
+ sibr_addlibrary(
133
+ NAME eigen3
134
+ #MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/eigen-eigen-dc6cfdf9bcec.7z"
135
+ #MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/eigen-eigen-dc6cfdf9bcec.7z" # TODO SV: provide a valid version if required
136
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/eigen3.7z"
137
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/eigen3.7z"
138
+ SET CHECK_CACHED_VAR eigen3_DIR PATH "eigen/share/eigen3/cmake"
139
+ )
140
+ include_directories(/usr/include/eigen3)
141
+ add_definitions(-DEIGEN_INITIALIZE_MATRICES_BY_ZERO)
142
+
143
+ #############
144
+ ## Find Boost
145
+ #############
146
+ set(Boost_REQUIRED_COMPONENTS "system;chrono;filesystem;date_time" CACHE INTERNAL "Boost Required Components")
147
+
148
+ if (WIN32)
149
+ # boost multiset arguments
150
+ if (MSVC11 OR MSVC12)
151
+ set(boost_multiset_arguments
152
+ CHECK_CACHED_VAR BOOST_ROOT PATH "boost_1_55_0"
153
+ CHECK_CACHED_VAR BOOST_INCLUDEDIR PATH "boost_1_55_0"
154
+ CHECK_CACHED_VAR BOOST_LIBRARYDIR PATH "boost_1_55_0/${LIB_BUILT_DIR}"
155
+ #CHECK_CACHED_VAR Boost_COMPILER STRING "-${Boost_WIN3RDPARTY_VCID}" DOC "vcid (eg: -vc110 for MSVC11)"
156
+ CHECK_CACHED_VAR Boost_COMPILER STRING "-vc110" DOC "vcid (eg: -vc110 for MSVC11)" # NOTE: if it doesnt work, uncomment this option and set the right value for VisualC id
157
+ )
158
+ elseif (MSVC14 OR MSVC17)
159
+ set(boost_multiset_arguments
160
+ CHECK_CACHED_VAR BOOST_ROOT PATH "boost-1.71"
161
+ CHECK_CACHED_VAR BOOST_INCLUDEDIR PATH "boost-1.71"
162
+ CHECK_CACHED_VAR BOOST_LIBRARYDIR PATH "boost-1.71/${LIB_BUILT_DIR}"
163
+ CHECK_CACHED_VAR Boost_COMPILER STRING "-vc141" DOC "vcid (eg: -vc110 for MSVC11)" # NOTE: if it doesnt work, uncomment this option and set the right value for VisualC id
164
+ )
165
+
166
+ option(BOOST_MINIMAL_VERSION "Only get minimal Boost dependencies" ON)
167
+
168
+ if(${BOOST_MINIMAL_VERSION})
169
+ set(BOOST_MSVC14_ZIP "boost-1.71-ibr-minimal.7z")
170
+ else()
171
+ set(BOOST_MSVC14_ZIP "boost-1.71.7z")
172
+ endif()
173
+ else ()
174
+ message("There is no provided Boost library for your compiler, relying on find_package to find it")
175
+ endif()
176
+
177
+ sibr_addlibrary(NAME Boost VCID TIMEOUT 600 #VERBOSE ON
178
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/boost_1_55_0.7z"
179
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/boost_1_55_0.7z"
180
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/${BOOST_MSVC14_ZIP}" # boost compatible with msvc14
181
+ MULTI_SET ${boost_multiset_arguments}
182
+ CHECK_CACHED_VAR Boost_NO_SYSTEM_PATHS BOOL ON DOC "Set to ON to disable searching in locations not specified by these boost cached hint variables"
183
+ CHECK_CACHED_VAR Boost_NO_BOOST_CMAKE BOOL ON DOC "Set to ON to disable the search for boost-cmake (package cmake config file if boost was built with cmake)"
184
+ )
185
+ if(NOT Boost_COMPILER AND Boost_WIN3RDPARTY_USE)
186
+ message(WARNING "Boost_COMPILER is not set and it's needed.")
187
+ endif()
188
+ endif()
189
+
190
+ find_package(Boost 1.65.0 REQUIRED COMPONENTS ${Boost_REQUIRED_COMPONENTS})
191
+ # for CLUSTER
192
+ ##find_package(Boost 1.58.0 REQUIRED COMPONENTS ${Boost_REQUIRED_COMPONENTS})
193
+
194
+
195
+ if(WIN32)
196
+ add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/EHsc>")
197
+ #add_definitions(/EHsc)
198
+ endif()
199
+
200
+ if(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
201
+ add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
202
+ endif()
203
+
204
+ #if(WIN32)
205
+ add_definitions(-DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB)
206
+ #endif()
207
+
208
+ include_directories(${BOOST_INCLUDEDIR} ${Boost_INCLUDE_DIRS})
209
+ link_directories(${BOOST_LIBRARYDIR} ${Boost_LIBRARY_DIRS})
210
+
211
+
212
+ ##############
213
+ ## Find OpenMP
214
+ ##############
215
+ find_package(OpenMP)
216
+
217
+ ##############
218
+ ## Find OpenCV
219
+ ##############
220
+ if (WIN32)
221
+ if (${MSVC_TOOLSET_VERSION} EQUAL 143)
222
+ MESSAGE("SPECIAL OPENCV HANDLING")
223
+ set(opencv_set_arguments
224
+ CHECK_CACHED_VAR OpenCV_DIR PATH "install" ## see OpenCVConfig.cmake
225
+ )
226
+ elseif (MSVC11 OR MSVC12)
227
+ set(opencv_set_arguments
228
+ CHECK_CACHED_VAR OpenCV_DIR PATH "opencv/build" ## see OpenCVConfig.cmake
229
+ )
230
+ elseif (MSVC14)
231
+ set(opencv_set_arguments
232
+ CHECK_CACHED_VAR OpenCV_DIR PATH "opencv-4.5.0/build" ## see OpenCVConfig.cmake
233
+ )
234
+ else ()
235
+ message("There is no provided OpenCV library for your compiler, relying on find_package to find it")
236
+ endif()
237
+ else()
238
+ message("There is no provided OpenCV library for your compiler, relying on find_package to find it")
239
+ endif()
240
+
241
+ sibr_addlibrary(NAME OpenCV #VERBOSE ON
242
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv.7z"
243
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv.7z"
244
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv-4.5.0.7z" # opencv compatible with msvc14 and with contribs
245
+ MSVC17 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv4-8.7z"
246
+ SET ${opencv_set_arguments}
247
+ )
248
+ find_package(OpenCV 4.5 REQUIRED) ## Use directly the OpenCVConfig.cmake provided
249
+ ## FOR CLUSTER
250
+ ###find_package(OpenCV 4.5 REQUIRED PATHS "/data/graphdeco/share/opencv/usr/local/lib64/cmake/opencv4/" ) ## Use directly the OpenCVConfig.cmake provided
251
+
252
+ ##https://stackoverflow.com/questions/24262081/cmake-relwithdebinfo-links-to-debug-libs
253
+ set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
254
+
255
+ add_definitions(-DOPENCV_TRAITS_ENABLE_DEPRECATED)
256
+
257
+ if(OpenCV_INCLUDE_DIRS)
258
+ foreach(inc ${OpenCV_INCLUDE_DIRS})
259
+ if(NOT EXISTS ${inc})
260
+ set(OpenCV_INCLUDE_DIR "" CACHE PATH "additional custom include DIR (in case of trouble to find it (fedora 17 opencv package))")
261
+ endif()
262
+ endforeach()
263
+ if(OpenCV_INCLUDE_DIR)
264
+ list(APPEND OpenCV_INCLUDE_DIRS ${OpenCV_INCLUDE_DIR})
265
+ include_directories(${OpenCV_INCLUDE_DIRS})
266
+ endif()
267
+ endif()
268
+
269
+ ###################
270
+ ## Find GLFW
271
+ ###################
272
+ sibr_addlibrary(
273
+ NAME glfw3
274
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/glfw-3.2.1.7z"
275
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/glfw-3.2.1.7z" # TODO SV: provide a valid version if required
276
+ SET CHECK_CACHED_VAR glfw3_DIR PATH "glfw-3.2.1"
277
+ )
278
+
279
+ ### FOR CLUSTER COMMENT OUT lines above, uncomment lines below
280
+ ##find_package(GLFW REQUIRED 3.3 )
281
+ ##message("***********=============> GLFW IS " ${GLFW_LIBRARY})
282
+ ##message("***********=============> GLFW IS " ${GLFW_LIBRARIES})
283
+
284
+ find_package(glfw3 REQUIRED)
285
+
286
+ sibr_gitlibrary(TARGET imgui
287
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/imgui.git"
288
+ GIT_TAG "741fb3ab6c7e1f7cef23ad0501a06b7c2b354944"
289
+ )
290
+
291
+ ## FOR CLUSTER COMMENT OUT nativefiledialog
292
+ sibr_gitlibrary(TARGET nativefiledialog
293
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/nativefiledialog.git"
294
+ GIT_TAG "ae2fab73cf44bebdc08d997e307c8df30bb9acec"
295
+ )
296
+
297
+
298
+ sibr_gitlibrary(TARGET mrf
299
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/mrf.git"
300
+ GIT_TAG "30c3c9494a00b6346d72a9e37761824c6f2b7207"
301
+ )
302
+
303
+ sibr_gitlibrary(TARGET nanoflann
304
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/nanoflann.git"
305
+ GIT_TAG "7a20a9ac0a1d34850fc3a9e398fc4a7618e8a69a"
306
+ )
307
+
308
+ sibr_gitlibrary(TARGET picojson
309
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/picojson.git"
310
+ GIT_TAG "7cf8feee93c8383dddbcb6b64cf40b04e007c49f"
311
+ )
312
+
313
+ sibr_gitlibrary(TARGET rapidxml
314
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/rapidxml.git"
315
+ GIT_TAG "069e87f5ec5ce1745253bd64d89644d6b894e516"
316
+ )
317
+
318
+ sibr_gitlibrary(TARGET xatlas
319
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/xatlas.git"
320
+ GIT_TAG "0fbe06a5368da13fcdc3ee48d4bdb2919ed2a249"
321
+ INCLUDE_DIRS "source/xatlas"
322
+ )
323
+
324
+ Win3rdPartyGlobalCacheAction()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/downloadAndExtractZipFile.cmake ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## downloadAndExtractZipFile cmake function
12
+ ## Provide a way to download zip file from public internet ZIP_URL host
13
+ ## and to extract it in a specific EXCTRATED_ZIP_PATH destination.
14
+ ## This function use 7-Zip external tool to maximize the compatibles formats.
15
+ ## This will be not download again if the EXCTRATED_ZIP_PATH already exist and DL_FORCE is set to OFF.
16
+ ## This will try to unzip file if already exist in the ZIP_DL_PATH.
17
+ ##
18
+ ## If EXCTRATED_ZIP_PATH and/or ZIP_DL_PATH are not full path,
19
+ ## it will be interpreted relative to CMAKE_BINARY_DIR
20
+ ##
21
+ ## Usage example :
22
+ ## include(downloadAndExtractZipFile)
23
+ ## downloadAndExtractZipFile(
24
+ ## http://www.cs.cornell.edu/~snavely/bundler/distr/bundler-v0.4-source.zip
25
+ ## ${CMAKE_BINARY_DIR}/Bundler/bundler-v0.4-source.zip
26
+ ## ${CMAKE_BINARY_DIR}/Bundler
27
+ ## [DL_FORCE ON|OFF]
28
+ ## [TIMEOUT]
29
+ ## [CHECK_DIRTY_URL]
30
+ ## )
31
+ ##
32
+ ## option DL_FORCE will redownload the zip file [deafult to OFF]
33
+ ## option TIMEOUT will end the unzip process after this period of time [default to 600s]
34
+ ## option CHECK_DIRTY_URL will write into the given file the downloaded URL and then,
35
+ ## next time, if the URL was updated, it detect it with this file
36
+ ## and will download the last version. This prevent to alway set manually DL_FORCE to ON...
37
+ ##
38
+ if(__downloadAndExtractZipFile_cmake_INCLUDED__)
39
+ return()
40
+ else()
41
+ set(__downloadAndExtractZipFile_cmake_INCLUDED__ ON)
42
+ endif()
43
+
44
+ function(downloadAndExtractZipFile ZIP_URL ZIP_DL_PATH EXCTRATED_ZIP_PATH)
45
+
46
+ # message(STATUS "zipUrl=${ZIP_URL} zipDlPath=${ZIP_DL_PATH} extractedZipPath=${EXCTRATED_ZIP_PATH}")
47
+ cmake_parse_arguments(dwnlezf "" "VERBOSE;DL_FORCE;TIMEOUT;CHECK_DIRTY_URL" "" ${ARGN})
48
+
49
+ set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
50
+
51
+ ## Check entries mandatory args
52
+ if(IS_ABSOLUTE "${ZIP_DL_PATH}")
53
+ else()
54
+ set(ZIP_DL_PATH "${CMAKE_BINARY_DIR}/${ZIP_DL_PATH}")
55
+ endif()
56
+ if(IS_ABSOLUTE "${EXCTRATED_ZIP_PATH}")
57
+ else()
58
+ set(EXCTRATED_ZIP_PATH "${CMAKE_BINARY_DIR}/${EXCTRATED_ZIP_PATH}")
59
+ endif()
60
+ if(NOT EXISTS "${EXCTRATED_ZIP_PATH}")
61
+ file(MAKE_DIRECTORY ${EXCTRATED_ZIP_PATH})
62
+ endif()
63
+
64
+ # SB: Once, one of downloaded zip was corrupted by an error message coming from the server.
65
+ if(EXISTS "${ZIP_DL_PATH}")
66
+ # So I check for removing such corrupted files
67
+ message("Removing previous ${ZIP_DL_PATH} (might be corrupted)")
68
+ file(REMOVE "${ZIP_DL_PATH}")
69
+ if(EXISTS "${dwnlezf_CHECK_DIRTY_URL}")
70
+ # and remove the previous (corrupted) made 'Win3rdPartyUrl' file
71
+ file(REMOVE "${dwnlezf_CHECK_DIRTY_URL}")
72
+ endif()
73
+ endif()
74
+
75
+ ## Check entries optional args
76
+ macro(readDirtyUrl )
77
+ if(dwnlezf_CHECK_DIRTY_URL)
78
+ if(IS_ABSOLUTE "${dwnlezf_CHECK_DIRTY_URL}")
79
+ else()
80
+ set(dwnlezf_CHECK_DIRTY_URL "${CMAKE_BINARY_DIR}/${dwnlezf_CHECK_DIRTY_URL}")
81
+ endif()
82
+ get_filename_component(unzipDir ${EXCTRATED_ZIP_PATH} NAME)
83
+ get_filename_component(unzipPath ${EXCTRATED_ZIP_PATH} PATH)
84
+ message(STATUS "Checking ${unzipDir} [from ${unzipPath}]...")
85
+ if(EXISTS "${dwnlezf_CHECK_DIRTY_URL}")
86
+ get_filename_component(CHECK_DIRTY_URL_FILENAME ${dwnlezf_CHECK_DIRTY_URL} NAME)
87
+ file(STRINGS "${dwnlezf_CHECK_DIRTY_URL}" contents)
88
+ list(GET contents 0 downloadURL)
89
+ list(REMOVE_AT contents 0)
90
+ if("${downloadURL}" MATCHES "${ZIP_URL}")
91
+ if(dwnlezf_VERBOSE)
92
+ message(STATUS "Your downloaded version (URL) seems to be up to date. Let me check if nothing is missing... (see ${dwnlezf_CHECK_DIRTY_URL}).")
93
+ endif()
94
+ file(GLOB PATHNAME_PATTERN_LIST "${EXCTRATED_ZIP_PATH}/*") ## is there something inside the downloaded destination ?
95
+ unset(NAME_PATTERN_LIST)
96
+ foreach(realPathPattern ${PATHNAME_PATTERN_LIST})
97
+ get_filename_component(itemName ${realPathPattern} NAME)
98
+ list(APPEND NAME_PATTERN_LIST ${itemName})
99
+ endforeach()
100
+ if(NAME_PATTERN_LIST)
101
+ foreach(item ${contents})
102
+ list(FIND NAME_PATTERN_LIST ${item} id)
103
+ if(${id} MATCHES "-1")
104
+ message(STATUS "${item} is missing, your downloaded version content changed, need to redownload it.")
105
+ set(ZIP_DL_FORCE ON)
106
+ break()
107
+ else()
108
+ list(REMOVE_AT NAME_PATTERN_LIST ${id})
109
+ set(ZIP_DL_FORCE OFF)
110
+ endif()
111
+ endforeach()
112
+ if(NOT ZIP_DL_FORCE AND NAME_PATTERN_LIST)
113
+ message("Yours seems to be up to date (regarding to ${CHECK_DIRTY_URL_FILENAME})!\nBut there are additional files/folders into your downloaded destination (feel free to clean it if you want).")
114
+ foreach(item ${NAME_PATTERN_LIST})
115
+ if(item)
116
+ message("${item}")
117
+ endif()
118
+ endforeach()
119
+ endif()
120
+ endif()
121
+ else()
122
+ set(ZIP_DL_FORCE ON)
123
+ message(STATUS "Your downloaded version is dirty (too old).")
124
+ endif()
125
+ else()
126
+ file(GLOB PATHNAME_PATTERN_LIST "${EXCTRATED_ZIP_PATH}/*") ## is there something inside the downloaded destination ?
127
+ if(NOT PATHNAME_PATTERN_LIST)
128
+ message("We found nothing into ${EXCTRATED_ZIP_PATH}, we will try to download it for you now.")
129
+ endif()
130
+ set(ZIP_DL_FORCE ON)
131
+ endif()
132
+ endif()
133
+ endmacro()
134
+ readDirtyUrl()
135
+ if(NOT ZIP_DL_FORCE)
136
+ return() ## do not need to further (as we are up to date, just exit the function
137
+ endif()
138
+
139
+ macro(writeDirtyUrl )
140
+ if(dwnlezf_CHECK_DIRTY_URL)
141
+ file(WRITE "${dwnlezf_CHECK_DIRTY_URL}" "${ZIP_URL}\n")
142
+ file(GLOB PATHNAME_PATTERN_LIST "${EXCTRATED_ZIP_PATH}/*") ## is there something inside the downloaded destination ?
143
+ unset(NAME_PATTERN_LIST)
144
+ foreach(realPathPattern ${PATHNAME_PATTERN_LIST})
145
+ get_filename_component(itemName ${realPathPattern} NAME)
146
+ list(APPEND NAME_PATTERN_LIST ${itemName})
147
+ endforeach()
148
+ if(NAME_PATTERN_LIST)
149
+ foreach(item ${NAME_PATTERN_LIST})
150
+ file(APPEND "${dwnlezf_CHECK_DIRTY_URL}" "${item}\n")
151
+ endforeach()
152
+ endif()
153
+ endif()
154
+ endmacro()
155
+
156
+ if(dwnlezf_DL_FORCE)
157
+ set(ZIP_DL_FORCE ON)
158
+ endif()
159
+
160
+ if(NOT dwnlezf_TIMEOUT)
161
+ set(dwnlezf_TIMEOUT 600)
162
+ endif()
163
+ math(EXPR dwnlezf_TIMEOUT_MIN "${dwnlezf_TIMEOUT}/60")
164
+
165
+ macro(unzip whichZipFile)
166
+ if(NOT SEVEN_ZIP_CMD)
167
+ find_program(SEVEN_ZIP_CMD NAMES 7z 7za p7zip DOC "7-zip executable" PATHS "$ENV{PROGRAMFILES}/7-Zip" "$ENV{${PROGRAMFILESx86}}/7-Zip" "$ENV{ProgramW6432}/7-Zip")
168
+ endif()
169
+ if(SEVEN_ZIP_CMD)
170
+ if(dwnlezf_VERBOSE)
171
+ message(STATUS "UNZIP: please, WAIT UNTIL ${SEVEN_ZIP_CMD} finished...\n(no more than ${dwnlezf_TIMEOUT_MIN} min)")
172
+ else()
173
+ message(STATUS "UNZIP...wait...")
174
+ endif()
175
+ execute_process( COMMAND ${SEVEN_ZIP_CMD} x ${whichZipFile} -y
176
+ WORKING_DIRECTORY ${EXCTRATED_ZIP_PATH} TIMEOUT ${dwnlezf_TIMEOUT}
177
+ RESULT_VARIABLE resVar OUTPUT_VARIABLE outVar ERROR_VARIABLE errVar
178
+ )
179
+ if(${resVar} MATCHES "0")
180
+ if(dwnlezf_VERBOSE)
181
+ message(STATUS "SUCESS to unzip in ${EXCTRATED_ZIP_PATH}. Now we can remove the downloaded zip file.")
182
+ endif()
183
+ execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${whichZipFile})
184
+ mark_as_advanced(SEVEN_ZIP_CMD)
185
+ else()
186
+ message(WARNING "something wrong in ${EXCTRATED_ZIP_PATH}\n with \"${SEVEN_ZIP_CMD} x ${whichZipFile} -y\", redo or try to unzip by yourself...")
187
+ message("unzip: resVar=${resVar}")
188
+ message("unzip: outVar=${outVar}")
189
+ message("unzip: errVar=${errVar}")
190
+ message("unzip: failed or canceled or timeout")
191
+ endif()
192
+ else()
193
+ message(WARNING "You need 7zip (http://www.7-zip.org/download.html) to unzip the downloaded dir.")
194
+ set(SEVEN_ZIP_CMD "" CACHE FILEPATH "7-zip executable")
195
+ mark_as_advanced(CLEAR SEVEN_ZIP_CMD)
196
+ endif()
197
+ endmacro()
198
+
199
+ if(dwnlezf_VERBOSE)
200
+ message(STATUS "Trying to look ${ZIP_DL_PATH} if a zip file exist...")
201
+ endif()
202
+ if(EXISTS "${ZIP_DL_PATH}")
203
+
204
+ ## already downloaded, so just unzip it
205
+ unzip(${ZIP_DL_PATH})
206
+ writeDirtyUrl()
207
+
208
+ elseif(ZIP_DL_FORCE)
209
+
210
+ ## the download part (+ unzip)
211
+ message(STATUS "Let me try to download package for you : ${ZIP_URL}")
212
+ if(dwnlezf_VERBOSE)
213
+ message(STATUS "Downloading...\n SRC=${ZIP_URL}\n DEST=${ZIP_DL_PATH}.tmp\n INACTIVITY_TIMEOUT=180s")
214
+ endif()
215
+ file(DOWNLOAD ${ZIP_URL} ${ZIP_DL_PATH}.tmp INACTIVITY_TIMEOUT 360 STATUS status SHOW_PROGRESS)
216
+
217
+ list(GET status 0 numResult)
218
+ if(${numResult} MATCHES "0")
219
+
220
+ if(dwnlezf_VERBOSE)
221
+ message(STATUS "Download succeed, so let me rename the tmp file to unzip it")
222
+ endif()
223
+ execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${ZIP_DL_PATH}.tmp ${ZIP_DL_PATH})
224
+ unzip(${ZIP_DL_PATH})
225
+ writeDirtyUrl()
226
+
227
+ else()
228
+
229
+ list(GET status 1 errMsg)
230
+ message(WARNING "DOWNLOAD ${ZIP_URL} to ${ZIP_DL_PATH} failed\n:${errMsg}")
231
+ message(WARNING "OK, you need to download the ${ZIP_URL} manually and put it into ${ZIP_DL_PATH}")
232
+ message("Take a look at the project website page to check available URL.")
233
+
234
+ endif()
235
+
236
+ endif()
237
+
238
+ ## clean up the tmp downloaded file
239
+ if(EXISTS "${ZIP_DL_PATH}.tmp")
240
+ execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${ZIP_DL_PATH}.tmp)
241
+ endif()
242
+
243
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/git_describe.cmake ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(__git_describe_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__git_describe_INCLUDED__ ON)
15
+ endif()
16
+
17
+ find_package(Git)
18
+ if(Git_FOUND)
19
+ message(STATUS "Git found: ${GIT_EXECUTABLE}")
20
+ else()
21
+ message(FATAL_ERROR "Git not found. Aborting")
22
+ endif()
23
+
24
+ macro(git_describe)
25
+ cmake_parse_arguments(GIT_DESCRIBE "" "GIT_URL;GIT_BRANCH;GIT_COMMIT_HASH;GIT_TAG;GIT_VERSION;PATH" "" ${ARGN})
26
+
27
+ if(NOT GIT_DESCRIBE_PATH)
28
+ set(GIT_DESCRIBE_PATH ${CMAKE_SOURCE_DIR})
29
+ endif()
30
+
31
+ if(GIT_DESCRIBE_GIT_URL)
32
+ # Get the current remote
33
+ execute_process(
34
+ COMMAND git remote
35
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
36
+ OUTPUT_VARIABLE GIT_DESCRIBE_GIT_REMOTE
37
+ OUTPUT_STRIP_TRAILING_WHITESPACE
38
+ ERROR_QUIET
39
+ )
40
+
41
+ # Get the current remote
42
+ execute_process(
43
+ COMMAND git remote get-url ${GIT_DESCRIBE_GIT_REMOTE}
44
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
45
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_URL}
46
+ OUTPUT_STRIP_TRAILING_WHITESPACE
47
+ ERROR_QUIET
48
+ )
49
+ endif()
50
+
51
+ if(GIT_DESCRIBE_GIT_BRANCH)
52
+ # Get the current working branch
53
+ execute_process(
54
+ COMMAND git rev-parse --abbrev-ref HEAD
55
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
56
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_BRANCH}
57
+ OUTPUT_STRIP_TRAILING_WHITESPACE
58
+ ERROR_QUIET
59
+ )
60
+ endif()
61
+
62
+ if(GIT_DESCRIBE_GIT_COMMIT_HASH)
63
+ # Get the latest abbreviated commit hash of the working branch
64
+ execute_process(
65
+ COMMAND git rev-parse HEAD
66
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
67
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_COMMIT_HASH}
68
+ OUTPUT_STRIP_TRAILING_WHITESPACE
69
+ ERROR_QUIET
70
+ )
71
+ endif()
72
+
73
+ if(GIT_DESCRIBE_GIT_TAG)
74
+ # Get the tag
75
+ execute_process(
76
+ COMMAND git describe --tags --exact-match
77
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
78
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_TAG}
79
+ OUTPUT_STRIP_TRAILING_WHITESPACE
80
+ ERROR_QUIET
81
+ )
82
+ endif()
83
+
84
+ if(GIT_DESCRIBE_GIT_VERSION)
85
+ # Get the version from git describe
86
+ execute_process(
87
+ COMMAND git describe
88
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
89
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_VERSION}
90
+ OUTPUT_STRIP_TRAILING_WHITESPACE
91
+ ERROR_QUIET
92
+ )
93
+
94
+ if(${GIT_DESCRIBE_GIT_VERSION} STREQUAL "")
95
+ execute_process(
96
+ COMMAND git rev-parse --abbrev-ref HEAD
97
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
98
+ OUTPUT_VARIABLE GIT_DESCRIBE_GIT_VERSION_BRANCH
99
+ OUTPUT_STRIP_TRAILING_WHITESPACE
100
+ ERROR_QUIET
101
+ )
102
+ execute_process(
103
+ COMMAND git log -1 --format=%h
104
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
105
+ OUTPUT_VARIABLE GIT_DESCRIBE_GIT_VERSION_COMMIT
106
+ OUTPUT_STRIP_TRAILING_WHITESPACE
107
+ ERROR_QUIET
108
+ )
109
+
110
+ set(${GIT_DESCRIBE_GIT_VERSION} "${GIT_DESCRIBE_GIT_VERSION_BRANCH}-${GIT_DESCRIBE_GIT_VERSION_COMMIT}")
111
+ endif()
112
+ endif()
113
+
114
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/include_once.cmake ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ macro(include_once file)
12
+ get_filename_component(INCLUDE_ONCE_FILEPATH ${file} REALPATH)
13
+ string(REGEX REPLACE "(\\.|\\/+|\\:|\\\\+)" "_" INCLUDE_ONCE_FILEPATH ${INCLUDE_ONCE_FILEPATH})
14
+ get_property(INCLUDED_${INCLUDE_ONCE_FILEPATH}_LOCAL GLOBAL PROPERTY INCLUDED_${INCLUDE_ONCE_FILEPATH})
15
+ if (INCLUDED_${INCLUDE_ONCE_FILEPATH}_LOCAL)
16
+ return()
17
+ else()
18
+ set_property(GLOBAL PROPERTY INCLUDED_${INCLUDE_ONCE_FILEPATH} true)
19
+
20
+ include(${file})
21
+ endif()
22
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/install_runtime.cmake ADDED
@@ -0,0 +1,887 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## This file is mainly used to allow runtime installation
12
+ ## There are some utilities cmake functions to ease the generic deployement (abstract common usage of cmake)...
13
+ ##
14
+ ## You cannot run your programm automaticaly from your CNAKE_BINARY_DIR when you build
15
+ ## as it will miss all dependencies and ressources files...
16
+ ## You have to run install target in order to test your programm.
17
+ ##
18
+ ## The only one function/macros you may use inside your sub-CMakeLists.txt (sub-project) is :
19
+ ## ******************
20
+ ## ibr_install_target macro => see documentation at the end of this file
21
+ ## ******************
22
+ ## It use these utilities cmake functions to abstract the installation in an uniform way for all sub-projects.
23
+ ##
24
+ if(__install_runtime_cmake_INCLUDED__)
25
+ return()
26
+ else()
27
+ set(__install_runtime_cmake_INCLUDED__ ON)
28
+ endif()
29
+
30
+
31
+ ##
32
+ ## Allow to write a resource config file which contain additional ressource paths
33
+ ## (used by IBR_Common Resource system to load shaders and potentialy images, plugins and so on)
34
+ ##
35
+ ## ADD option list all the paths to add in the file (relative paths are interpreted relative to working dir of the executable)
36
+ ## INSTALL option to specify where we want to install this file
37
+ ##
38
+ ## Example usage:
39
+ ## resourceFile(ADD "shaders" "${PROJECT_NAME}_rsc" INSTALL bin)
40
+ ##
41
+ macro(resourceFile)
42
+ cmake_parse_arguments(rsc "" "INSTALL;FILE_PATH;CONFIG_TYPE" "ADD" ${ARGN}) ## both args are directory path
43
+
44
+ if(rsc_ADD)
45
+ unset(IBR_RSC_FILE_CONTENT_LIST)
46
+ if(EXISTS "${rsc_FILE_PATH}")
47
+ file(READ "${rsc_FILE_PATH}" IBR_RSC_FILE_CONTENT)
48
+ string(REGEX REPLACE "\n" ";" IBR_RSC_FILE_CONTENT_LIST "${IBR_RSC_FILE_CONTENT}")
49
+ endif()
50
+ list(APPEND IBR_RSC_FILE_CONTENT_LIST "${rsc_ADD}")
51
+ list(REMOVE_DUPLICATES IBR_RSC_FILE_CONTENT_LIST)
52
+ file(WRITE "${rsc_FILE_PATH}" "")
53
+ foreach(rscDir ${IBR_RSC_FILE_CONTENT_LIST})
54
+ file(APPEND "${rsc_FILE_PATH}" "${rscDir}\n")
55
+ endforeach()
56
+ unset(rsc_ADD)
57
+ endif()
58
+
59
+ if(rsc_INSTALL)
60
+ install(FILES ${rsc_FILE_PATH} CONFIGURATIONS ${rsc_CONFIG_TYPE} DESTINATION ${rsc_INSTALL})
61
+ unset(rsc_INSTALL)
62
+ endif()
63
+ endmacro()
64
+
65
+
66
+ ##
67
+ ## Install *.pdb generated file for the current cmake project
68
+ ## assuming the output target name is the cmake project name.
69
+ ## This macro is useful for crossplateform multi config mode.
70
+ ##
71
+ ## Usage Example:
72
+ ##
73
+ ## if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
74
+ ## installPDB(${PROJECT_NAME} ${CMAKE_BUILD_TYPE} RUNTIME_DEST bin ARCHIVE_DEST lib LIBRARY_DEST lib)
75
+ ## endif()
76
+ ## foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
77
+ ## installPDB(${PROJECT_NAME} ${CONFIG_TYPES} RUNTIME_DEST bin ARCHIVE_DEST lib LIBRARY_DEST lib)
78
+ ## endforeach()
79
+ ##
80
+ macro(installPDB targetName configType)
81
+ cmake_parse_arguments(instpdb "" "COMPONENT" "ARCHIVE_DEST;LIBRARY_DEST;RUNTIME_DEST" ${ARGN}) ## both args are directory path
82
+
83
+ if(NOT MSVC)
84
+ return()
85
+ endif()
86
+
87
+ ## Check if DESTINATION are provided according to the TYPE of the given target (see install command doc to see correspodances)
88
+ get_target_property(type ${targetName} TYPE)
89
+ if(${type} MATCHES "EXECUTABLE" AND instpdb_RUNTIME_DEST)
90
+ set(pdb_DESTINATION ${instpdb_RUNTIME_DEST})
91
+ elseif(${type} MATCHES "STATIC_LIBRARY" AND instpdb_ARCHIVE_DEST)
92
+ set(pdb_DESTINATION ${instpdb_ARCHIVE_DEST})
93
+ elseif(${type} MATCHES "MODULE_LIBRARY" AND instpdb_LIBRARY_DEST)
94
+ set(pdb_DESTINATION ${instpdb_LIBRARY_DEST})
95
+ elseif(${type} MATCHES "SHARED_LIBRARY")
96
+ if(WIN32 AND instpdb_RUNTIME_DEST)
97
+ set(pdb_DESTINATION ${instpdb_RUNTIME_DEST})
98
+ else()
99
+ set(pdb_DESTINATION ${instpdb_LIBRARY_DEST})
100
+ endif()
101
+ endif()
102
+
103
+ if(NOT pdb_DESTINATION)
104
+ set(pdb_DESTINATION bin) ## default destination of the pdb file
105
+ endif()
106
+
107
+ if(NOT instpdb_COMPONENT)
108
+ set(instpdb_COMPONENT )
109
+ else()
110
+ set(instpdb_COMPONENT COMPONENT ${instpdb_COMPONENT})
111
+ endif()
112
+
113
+ string(TOUPPER ${configType} CONFIG_TYPES_UC)
114
+ get_target_property(PDB_PATH ${targetName} PDB_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC})
115
+
116
+ get_target_property(confModePostfix ${targetName} ${CONFIG_TYPES_UC}_POSTFIX)
117
+ if(NOT confModePostfix)
118
+ set(confModePostfix "")
119
+ endif()
120
+ set_target_properties(${targetName} PROPERTIES PDB_NAME_${CONFIG_TYPES_UC} ${targetName}${confModePostfix})
121
+ get_target_property(PDB_NAME ${targetName} PDB_NAME_${CONFIG_TYPES_UC})# if not set, this is empty
122
+
123
+ if(EXISTS "${PDB_PATH}/${PDB_NAME}.pdb")
124
+ install(FILES "${PDB_PATH}/${PDB_NAME}.pdb" CONFIGURATIONS ${configType} DESTINATION ${pdb_DESTINATION} ${instpdb_COMPONENT} OPTIONAL)
125
+ endif()
126
+ endmacro()
127
+
128
+
129
+ ##
130
+ ## Add additional target to install a project independently and based on its component
131
+ ## configMode is used to prevent default Release installation (we want also to install in other build/config type)
132
+ ##
133
+ macro(installTargetProject targetOfProject targetOfInstallProject)
134
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
135
+ set(configMode ${CMAKE_BUILD_TYPE})
136
+ elseif(MSVC)
137
+ ## $(Configuration) will be one of the following : Debug, Release, MinSizeRel, RelWithDebInfo
138
+ set(configMode $(Configuration))
139
+ endif()
140
+ if(configMode)
141
+ get_target_property(srcFiles ${targetOfProject} SOURCES)
142
+ add_custom_target( ${targetOfInstallProject} #ALL
143
+ ${CMAKE_COMMAND} -DBUILD_TYPE=${configMode} -DCOMPONENT=${targetOfInstallProject} -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
144
+ DEPENDS ${srcFiles}
145
+ COMMENT "run the installation only for ${targetOfProject}" VERBATIM
146
+ )
147
+ add_dependencies(${targetOfInstallProject} ${targetOfProject})
148
+
149
+ get_target_property(INSTALL_BUILD_FOLDER ${targetOfProject} FOLDER)
150
+ set_target_properties(${targetOfInstallProject} PROPERTIES FOLDER ${INSTALL_BUILD_FOLDER})
151
+ endif()
152
+ endmacro()
153
+
154
+ # Collect all currently added targets in all subdirectories
155
+ #
156
+ # Parameters:
157
+ # - _result the list containing all found targets
158
+ # - _dir root directory to start looking from
159
+ function(get_all_targets _result _dir)
160
+ get_property(_subdirs DIRECTORY "${_dir}" PROPERTY SUBDIRECTORIES)
161
+ foreach(_subdir IN LISTS _subdirs)
162
+ get_all_targets(${_result} "${_subdir}")
163
+ endforeach()
164
+
165
+ get_directory_property(_sub_targets DIRECTORY "${_dir}" BUILDSYSTEM_TARGETS)
166
+ set(${_result} ${${_result}} ${_sub_targets} PARENT_SCOPE)
167
+ endfunction()
168
+
169
+ ##
170
+ ## Add targets for building and installing subdirectories
171
+ macro(subdirectory_target target directory build_folder)
172
+ add_custom_target(${target}
173
+ COMMENT "run build for all projects in this directory" VERBATIM
174
+ )
175
+ get_all_targets(ALL_TARGETS ${directory})
176
+ add_dependencies(${target} ${ALL_TARGETS})
177
+ add_custom_target(${target}_install
178
+ ${CMAKE_COMMAND} -DBUILD_TYPE=$<CONFIG> -DCOMPONENT=${target}_install -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
179
+ COMMENT "run install for all projects in this directory" VERBATIM
180
+ )
181
+ add_dependencies(${target}_install ${target})
182
+
183
+ set_target_properties(${target} PROPERTIES FOLDER ${build_folder})
184
+ set_target_properties(${target}_install PROPERTIES FOLDER ${build_folder})
185
+ endmacro()
186
+
187
+
188
+ ## CMAKE install all required dependencies for an application (included system OS files like msvc*.dll for example)
189
+ ##
190
+ ## install_runtime(<installedFilePathTargetAppToResolve>
191
+ ## [TARGET name]
192
+ ## [PLUGINS name [nameN ...] [PLUGIN_PATH_NAME currentPathName [FROM_REL_PATH matchDirFromCurrentPathName] [PLUGIN_PATH_DEST installDir] ]
193
+ ## [PLUGINS ...]
194
+ ## [DIRS path [pathN ...] ]
195
+ ## [TARGET_LIBRARIES filePath [filePathN ...] ]
196
+ ## [TARGET_PACKAGES packageName [packageNameN ...] ]
197
+ ## [COMPONENT installComponentName]
198
+ ## [PLAUSIBLES_POSTFIX Debug_postfix [MinSizeRel_postfix relWithDebInfo_postfix ...] ]
199
+ ## [VERBOSE]
200
+ ## )
201
+ ##
202
+ ## installedFilePathTargetAppToResolve : the final installed targetApp absolute full file path name you want to resolve
203
+ ##
204
+ ## TARGET : The target app we want to install. If given, it's used to look for link libraries paths (best choice to use, strongly advised to use it)
205
+ ##
206
+ ## PLUGINS : Some application built use/load some plugins which can't be detect inside its binary,
207
+ ## so, here you can specify which plugins the application use/load in order to install them
208
+ ## and resolve also there dependencies.
209
+ ## With PLUGINS multi FLAGS :
210
+ ## PLUGIN_PATH_NAME : The current plugin full file path we want to install
211
+ ## FROM_REL_PATH : [optional: default only the file is kept] From which matching dir of the plugin path we want to install (keep the directories structure)
212
+ ## PLUGIN_PATH_DEST : [optional: default relative to executable directory] Where (full path to the install directory) we will install the plugin file (or file path)
213
+ ##
214
+ ## DIRS : A list of directories to looking for dependencies
215
+ ## TARGET_LIBRARIES : DEPRECATED (use TARGET flag instead) : The cmake content variables used for the target_link_libraries(<targetApp> ...)
216
+ ## TARGET_PACKAGES : DEPRECATED (use TARGET flag instead) : The cmake package names used for the findPackage(...) for your targetApp
217
+ ## ADVICE: This flag add entries in cache (like: <packageName>_DIR), it could be useful to fill these variable!
218
+ ## COMPONENT : (default to runtime) Is the component name associated to the installation
219
+ ## It is used when you want to install separatly some part of your projets (see install cmake doc)
220
+ ## VERBOSE : For debug or to get more informations in the output console
221
+ ##
222
+ ## Usage:
223
+ ## install_runtime(${CMAKE_INSTALL_PREFIX}/${EXECUTABLE_NAME}${CMAKE_EXECUTABLE_SUFFIX}
224
+ ## VERBOSE
225
+ ## TARGET ${PROJECT_NAME}
226
+ ## PLAUSIBLES_POSTFIX _d
227
+ ## PLUGINS
228
+ ## PLUGIN_PATH_NAME ${PLUGIN_PATH_NAME}${CMAKE_SHARED_MODULE_SUFFIX} ## will be installed (default exec path if no PLUGINS_DEST) and then will be resolved
229
+ ## FROM_REL_PATH plugins ## optional, used especially for keeping qt plugins tree structure
230
+ ## PLUGIN_PATH_DEST ${CMAKE_INSTALL_PREFIX}/plugins ## (or relative path 'plugins' will be interpreted relative to installed executable)
231
+ ## DIRS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}
232
+ ## TARGET_LIBRARIES ${OPENGL_LIBRARIES} ## DEPRECATED (use TARGET flag instead)
233
+ ## ${GLEW_LIBRARIES}
234
+ ## ${GLUT_LIBRARIES}
235
+ ## ${Boost_LIBRARIES}
236
+ ## ${SuiteSparse_LIBRARIES}
237
+ ## ${CGAL_LIBRARIES}
238
+ ## TARGET_PACKAGES OPENGL ## DEPRECATED (use TARGET flag instead)
239
+ ## GLEW
240
+ ## GLUT
241
+ ## CGAL
242
+ ## Boost
243
+ ## SuiteSparse
244
+ ## )
245
+ ##
246
+ ## For plugins part, it use our internal parse_arguments_multi.cmake
247
+ ##
248
+ function(install_runtime installedFilePathTargetAppToResolve)
249
+ set(optionsArgs "VERBOSE")
250
+ set(oneValueArgs "COMPONENT;INSTALL_FOLDER;CONFIG_TYPE")
251
+ set(multiValueArgs "DIRS;PLUGINS;TARGET_LIBRARIES;TARGET_PACKAGES;TARGET;PLAUSIBLES_POSTFIX")
252
+ cmake_parse_arguments(inst_run "${optionsArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
253
+
254
+ if(IS_ABSOLUTE ${installedFilePathTargetAppToResolve})
255
+ else()
256
+ set(installedFilePathTargetAppToResolve ${inst_run_INSTALL_FOLDER}/${installedFilePathTargetAppToResolve})
257
+ endif()
258
+
259
+ get_filename_component(EXEC_NAME ${installedFilePathTargetAppToResolve} NAME_WE)
260
+ get_filename_component(EXEC_PATH ${installedFilePathTargetAppToResolve} PATH)
261
+
262
+ if(NOT inst_run_COMPONENT)
263
+ set(inst_run_COMPONENT runtime)
264
+ endif()
265
+
266
+
267
+ ## Try to append as more possible as possible paths to find dependencies (deprecated since we can use target_properties to get back paths)
268
+ set(libPaths )
269
+ foreach(libraryFileName ${inst_run_TARGET_LIBRARIES})
270
+ if(IS_DIRECTORY "${libraryFileName}")
271
+ list(APPEND libPaths "${libraryFileName}")
272
+ else()
273
+ get_filename_component(libpath "${libraryFileName}" PATH)
274
+ if(EXISTS "${libpath}")
275
+ list(APPEND libPaths "${libpath}")
276
+ endif()
277
+ endif()
278
+ endforeach()
279
+
280
+ ## This macro is used internaly here to recursilvely get path of LINK_LIBRARIES of each non imported target
281
+ ## Typically if you have 2 internal dependencies between cmake targets, we want cmake to be able to get back path where are these dependencies
282
+ macro(recurseDepList target)
283
+ get_target_property(linkLibs ${target} LINK_LIBRARIES)
284
+ foreach(lib ${linkLibs})
285
+ string(FIND ${lib} ">" strId) ## cmake is using generator-expression?
286
+ if(TARGET ${lib})
287
+ ## Skipping interface libraries as they're system ones
288
+ get_target_property(type ${lib} TYPE)
289
+ get_target_property(imported ${lib} IMPORTED)
290
+ if(type STREQUAL "INTERFACE_LIBRARY")
291
+ get_target_property(imp_loc ${lib} INTERFACE_IMPORTED_LOCATION)
292
+ if(imp_loc)
293
+ get_filename_component(imp_loc ${imp_loc} PATH)
294
+ list(APPEND targetLibPath ${imp_loc})
295
+ endif()
296
+ get_target_property(loc ${lib} INTERFACE_LOCATION)
297
+ if(loc)
298
+ get_filename_component(loc ${loc} PATH)
299
+ list(APPEND targetLibPath ${loc})
300
+ endif()
301
+ ## it's not a path but a single target name
302
+ ## for build-target which are part of the current cmake configuration : nothing to do as cmake already know the output path
303
+ ## for imported target, we need to look for theire imported location
304
+ elseif(imported)
305
+ get_target_property(imp_loc ${lib} IMPORTED_LOCATION)
306
+ if(imp_loc)
307
+ get_filename_component(imp_loc ${imp_loc} PATH)
308
+ list(APPEND targetLibPath ${imp_loc})
309
+ endif()
310
+ get_target_property(loc ${lib} LOCATION)
311
+ if(loc)
312
+ get_filename_component(loc ${loc} PATH)
313
+ list(APPEND targetLibPath ${loc})
314
+ endif()
315
+ else()
316
+ recurseDepList(${lib})
317
+ endif()
318
+ elseif(NOT ${strId} MATCHES -1) ## mean cmake use generator-expression (CMAKE VERSION > 3.0)
319
+ string(REGEX MATCH ">:[@A-Za-z_:/.0-9-]+" targetLibPath ${lib})
320
+ string(REGEX REPLACE ">:([@A-Za-z_:/.0-9-]+)" "\\1" targetLibPath ${targetLibPath})
321
+ get_filename_component(targetLibPath ${targetLibPath} PATH)
322
+ elseif(EXISTS ${lib})
323
+ set(targetLibPath ${lib})
324
+ get_filename_component(targetLibPath ${targetLibPath} PATH)
325
+ else()
326
+ #message(STATUS "[install_runtime] skip link library : ${lib} , of target ${target}")
327
+ endif()
328
+ if(targetLibPath)
329
+ list(APPEND targetLinkLibsPathList ${targetLibPath})
330
+ endif()
331
+ endforeach()
332
+ if(targetLinkLibsPathList)
333
+ list(REMOVE_DUPLICATES targetLinkLibsPathList)
334
+ endif()
335
+ endmacro()
336
+ if(inst_run_TARGET)
337
+ recurseDepList(${inst_run_TARGET})
338
+ if(targetLinkLibsPathList)
339
+ list(APPEND libPaths ${targetLinkLibsPathList})
340
+ endif()
341
+ endif()
342
+
343
+ if(libPaths)
344
+ list(REMOVE_DUPLICATES libPaths)
345
+ foreach(libPath ${libPaths})
346
+ get_filename_component(path ${libPath} PATH)
347
+ list(APPEND libPaths ${path})
348
+ endforeach()
349
+ endif()
350
+
351
+
352
+ ## possible speciale dir(s) according to the build system and OS
353
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
354
+ set(BUILD_TYPES_FOR_DLL "x64")
355
+ if(WIN32)
356
+ list(APPEND BUILD_TYPES_FOR_DLL "Win64")
357
+ endif()
358
+ else()
359
+ set(BUILD_TYPES_FOR_DLL "x86")
360
+ if(WIN32)
361
+ list(APPEND BUILD_TYPES_FOR_DLL "Win32")
362
+ endif()
363
+ endif()
364
+
365
+
366
+ ## Try to append as more as possible paths to find dependencies (here, mainly for *.dll)
367
+ foreach(dir ${inst_run_DIRS} ${libPaths})
368
+ if(EXISTS "${dir}/bin")
369
+ list(APPEND inst_run_DIRS "${dir}/bin")
370
+ elseif(EXISTS "${dir}")
371
+ list(APPEND inst_run_DIRS "${dir}")
372
+ endif()
373
+ endforeach()
374
+ list(REMOVE_DUPLICATES inst_run_DIRS)
375
+ foreach(dir ${inst_run_DIRS})
376
+ if(EXISTS "${dir}")
377
+ list(APPEND argDirs ${dir})
378
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
379
+ if(EXISTS "${dir}/${BUILD_TYPE_FOR_DLL}")
380
+ list(APPEND argDirs "${dir}/${BUILD_TYPE_FOR_DLL}")
381
+ endif()
382
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
383
+ if(EXISTS "${dir}/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
384
+ list(APPEND argDirs "${dir}/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
385
+ endif()
386
+ endforeach()
387
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
388
+ if(EXISTS "${dir}/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
389
+ list(APPEND argDirs "${dir}/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
390
+ endif()
391
+ endif()
392
+ endforeach()
393
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
394
+ if(EXISTS "${dir}/${OUTPUTCONFIG}")
395
+ list(APPEND argDirs "${dir}/${OUTPUTCONFIG}")
396
+ endif()
397
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
398
+ if(EXISTS "${dir}/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
399
+ list(APPEND argDirs "${dir}/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
400
+ endif()
401
+ endforeach()
402
+ endforeach()
403
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
404
+ if(EXISTS "${dir}/${CMAKE_BUILD_TYPE}")
405
+ list(APPEND argDirs "${dir}/${CMAKE_BUILD_TYPE}")
406
+ endif()
407
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
408
+ if(EXISTS "${dir}/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
409
+ list(APPEND argDirs "${dir}/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
410
+ endif()
411
+ endforeach()
412
+ endif()
413
+ endif()
414
+ endforeach()
415
+ if(argDirs)
416
+ list(REMOVE_DUPLICATES argDirs)
417
+ endif()
418
+
419
+
420
+ ## Try to append as more possible paths to find dependencies (here, mainly for *.dll)
421
+ foreach(packageName ${inst_run_TARGET_PACKAGES})
422
+ if(EXISTS "${${packageName}_DIR}")
423
+ list(APPEND packageDirs ${${packageName}_DIR})
424
+ list(APPEND packageDirs ${${packageName}_DIR}/bin)
425
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
426
+ if(EXISTS "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}")
427
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}")
428
+ endif()
429
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
430
+ if(EXISTS "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
431
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
432
+ endif()
433
+ endforeach()
434
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
435
+ if(EXISTS "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
436
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
437
+ endif()
438
+ endif()
439
+ endforeach()
440
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
441
+ if(EXISTS "${${packageName}_DIR}/bin/${OUTPUTCONFIG}")
442
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${OUTPUTCONFIG}")
443
+ endif()
444
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
445
+ if(EXISTS "${${packageName}_DIR}/bin/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
446
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
447
+ endif()
448
+ endforeach()
449
+ endforeach()
450
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
451
+ if(EXISTS "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}")
452
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}")
453
+ endif()
454
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
455
+ if(EXISTS "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
456
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
457
+ endif()
458
+ endforeach()
459
+ endif()
460
+ else()
461
+ set(${packageName}_DIR "$ENV{${packageName}_DIR}" CACHE PATH "${packageName}_DIR root directory for looking for dirs containning *.dll")
462
+ endif()
463
+ endforeach()
464
+ if(packageDirs)
465
+ list(REMOVE_DUPLICATES packageDirs)
466
+ endif()
467
+
468
+
469
+ set(dirsToLookFor "${EXEC_PATH}")
470
+ if(packageDirs)
471
+ list(APPEND dirsToLookFor ${packageDirs})
472
+ endif()
473
+ if(argDirs)
474
+ list(APPEND dirsToLookFor ${argDirs})
475
+ endif()
476
+ get_property(used_LINK_DIRECTORIES DIRECTORY PROPERTY LINK_DIRECTORIES)
477
+ if (used_LINK_DIRECTORIES)
478
+ list(APPEND dirsToLookFor ${used_LINK_DIRECTORIES})
479
+ list(REMOVE_DUPLICATES dirsToLookFor)
480
+ endif()
481
+
482
+
483
+ ## handle plugins
484
+ set(pluginsList "")
485
+ include(parse_arguments_multi) ## this function will process recursively items of the sub-list [default print messages]
486
+ function(parse_arguments_multi_function results)
487
+ cmake_parse_arguments(pamf "VERBOSE" "PLUGIN_PATH_DEST;FROM_REL_PATH;EXEC_PATH;COMPONENT" "" ${ARGN}) ## EXEC_PATH and COMPONENT are for exclusive internal use
488
+ list(REMOVE_DUPLICATES pamf_UNPARSED_ARGUMENTS)
489
+ foreach(PLUGIN_PATH_NAME ${pamf_UNPARSED_ARGUMENTS})
490
+ if(EXISTS ${PLUGIN_PATH_NAME})
491
+ if(IS_DIRECTORY ${PLUGIN_PATH_NAME})
492
+ if(pamf_VERBOSE)
493
+ message(WARNING "${PLUGIN_PATH_NAME} IS_DIRECTORY, cannot installed a directory, please give a path filename")
494
+ endif()
495
+ else()
496
+ if(NOT pamf_PLUGIN_PATH_DEST)
497
+ set(PLUGIN_PATH_DEST ${pamf_EXEC_PATH}) ## the default dest value
498
+ else()
499
+ set(PLUGIN_PATH_DEST ${pamf_PLUGIN_PATH_DEST})
500
+ endif()
501
+
502
+ if(pamf_FROM_REL_PATH)
503
+ file(TO_CMAKE_PATH ${PLUGIN_PATH_NAME} PLUGIN_PATH_NAME)
504
+ get_filename_component(PLUGIN_PATH ${PLUGIN_PATH_NAME} PATH)
505
+ unset(PLUGIN_PATH_LIST)
506
+ unset(PLUGIN_PATH_LIST_COUNT)
507
+ unset(PLUGIN_REL_PATH_LIST)
508
+ unset(PLUGIN_REL_PATH)
509
+ string(REPLACE "/" ";" PLUGIN_PATH_LIST ${PLUGIN_PATH}) ## create a list of dir
510
+ list(FIND PLUGIN_PATH_LIST ${pamf_FROM_REL_PATH} id)
511
+ list(LENGTH PLUGIN_PATH_LIST PLUGIN_PATH_LIST_COUNT)
512
+ if(${id} GREATER 0)
513
+ math(EXPR id "${id}+1") ## matches relative path not include
514
+ math(EXPR PLUGIN_PATH_LIST_COUNT "${PLUGIN_PATH_LIST_COUNT}-1") ## the end of the list
515
+ foreach(i RANGE ${id} ${PLUGIN_PATH_LIST_COUNT})
516
+ list(GET PLUGIN_PATH_LIST ${i} out)
517
+ list(APPEND PLUGIN_REL_PATH_LIST ${out})
518
+ endforeach()
519
+ foreach(dir ${PLUGIN_REL_PATH_LIST})
520
+ set(PLUGIN_REL_PATH "${PLUGIN_REL_PATH}/${dir}")
521
+ endforeach()
522
+ endif()
523
+ set(PLUGIN_PATH_DEST ${PLUGIN_PATH_DEST}${PLUGIN_REL_PATH})
524
+ endif()
525
+
526
+ install(FILES ${PLUGIN_PATH_NAME} CONFIGURATIONS ${inst_run_CONFIG_TYPE} DESTINATION ${PLUGIN_PATH_DEST} COMPONENT ${pamf_COMPONENT})
527
+ get_filename_component(pluginName ${PLUGIN_PATH_NAME} NAME)
528
+ if(IS_ABSOLUTE ${PLUGIN_PATH_DEST})
529
+ else()
530
+ set(PLUGIN_PATH_DEST ${inst_run_INSTALL_FOLDER}/${PLUGIN_PATH_DEST})
531
+ endif()
532
+ list(APPEND pluginsList ${PLUGIN_PATH_DEST}/${pluginName})
533
+ endif()
534
+ else()
535
+ message(WARNING "You need to provide a valid PLUGIN_PATH_NAME")
536
+ set(pluginsList )
537
+ endif()
538
+ endforeach()
539
+ set(${results} ${pluginsList} PARENT_SCOPE)
540
+ endfunction()
541
+
542
+ if(inst_run_VERBOSE)
543
+ list(APPEND extra_flags_to_add VERBOSE)
544
+ endif()
545
+ list(APPEND extra_flags_to_add EXEC_PATH ${EXEC_PATH} COMPONENT ${inst_run_COMPONENT}) ## for internal use inside overloaded function
546
+ list(LENGTH inst_run_PLUGINS inst_run_PLUGINS_count)
547
+ if(${inst_run_PLUGINS_count} GREATER 0)
548
+ parse_arguments_multi(PLUGIN_PATH_NAME inst_run_PLUGINS ${inst_run_PLUGINS} ## see internal overload parse_arguments_multi_function for processing each sub-list
549
+ NEED_RESULTS ${inst_run_PLUGINS_count} ## this is used to check when we are in the first loop (in order to reset parse_arguments_multi_results)
550
+ EXTRAS_FLAGS ${extra_flags_to_add} ## this is used to allow catching additional internal flags of our overloaded function
551
+ )
552
+ endif()
553
+
554
+ #message(parse_arguments_multi_results = ${parse_arguments_multi_results})
555
+ list(APPEND pluginsList ${parse_arguments_multi_results})
556
+
557
+
558
+
559
+ ## Install rules for required system runtimes such as MSVCRxx.dll
560
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)
561
+ include(InstallRequiredSystemLibraries)
562
+ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
563
+ install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
564
+ CONFIGURATIONS ${inst_run_CONFIG_TYPE}
565
+ DESTINATION ${EXEC_PATH}
566
+ COMPONENT ${inst_run_COMPONENT}
567
+ )
568
+ endif()
569
+
570
+ ## print what we are doing to do
571
+ if(inst_run_VERBOSE)
572
+ message(STATUS "[install_runtime] On install target call, cmake will try to resolve dependencies for given app:\n ${installedFilePathTargetAppToResolve} (with plausible postfix: ${inst_run_PLAUSIBLES_POSTFIX})")
573
+ if(pluginsList)
574
+ message(STATUS " and also for plugins :")
575
+ foreach(plugin ${pluginsList})
576
+ message(STATUS " ${plugin}")
577
+ endforeach()
578
+ endif()
579
+ message(STATUS " Looking for dependencies into:")
580
+ foreach(dir ${dirsToLookFor})
581
+ message(STATUS " ${dir}")
582
+ endforeach()
583
+ endif()
584
+
585
+ ## Install rules for required dependencies libs/plugins for the target app
586
+ ## will resolve all installed target files with config modes postfixes
587
+ string(TOUPPER ${inst_run_CONFIG_TYPE} inst_run_CONFIG_TYPE_UC)
588
+ get_target_property(postfix ${inst_run_TARGET} "${inst_run_CONFIG_TYPE_UC}_POSTFIX")
589
+ install(CODE "set(target \"${inst_run_TARGET}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
590
+ install(CODE "set(inst_run_CONFIG_TYPE \"${inst_run_CONFIG_TYPE}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
591
+ install(CODE "set(inst_run_INSTALL_FOLDER \"${inst_run_INSTALL_FOLDER}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
592
+ install(CODE "set(app \"${EXEC_PATH}/${EXEC_NAME}${postfix}${CMAKE_EXECUTABLE_SUFFIX}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
593
+ install(CODE "set(dirsToLookFor \"${dirsToLookFor}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
594
+ install(CODE
595
+ [[
596
+ if("${CMAKE_INSTALL_CONFIG_NAME}" STREQUAL "${inst_run_CONFIG_TYPE}")
597
+ message(STATUS "Installing ${target} dependencies...")
598
+
599
+ file(GET_RUNTIME_DEPENDENCIES
600
+ EXECUTABLES ${app}
601
+ RESOLVED_DEPENDENCIES_VAR _r_deps
602
+ UNRESOLVED_DEPENDENCIES_VAR _u_deps
603
+ CONFLICTING_DEPENDENCIES_PREFIX _c_deps
604
+ DIRECTORIES ${dirsToLookFor}
605
+ PRE_EXCLUDE_REGEXES "api-ms-*"
606
+ POST_EXCLUDE_REGEXES ".*system32/.*\\.dll" ".*SysWOW64/.*\\.dll"
607
+ )
608
+
609
+ if(_u_deps)
610
+ message(WARNING "There were unresolved dependencies for executable ${EXEC_FILE}: \"${_u_deps}\"!")
611
+ endif()
612
+ if(_c_deps_FILENAMES)
613
+ message(WARNING "There were conflicting dependencies for executable ${EXEC_FILE}: \"${_c_deps_FILENAMES}\"!")
614
+ endif()
615
+
616
+ foreach(_file ${_r_deps})
617
+ file(INSTALL
618
+ DESTINATION "${inst_run_INSTALL_FOLDER}/bin"
619
+ TYPE SHARED_LIBRARY
620
+ FOLLOW_SYMLINK_CHAIN
621
+ FILES "${_file}"
622
+ )
623
+ endforeach()
624
+ endif()
625
+ ]]
626
+ COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE}
627
+ )
628
+
629
+ endfunction()
630
+
631
+ ## High level macro to install resources in the correct folder
632
+ ##
633
+ ## EXECUTABLE: [opt] option to copy files as programs
634
+ ## RELATIVE : [opt] copy files relatively to current folder
635
+ ## TYPE : [opt] type and folder where to store the files
636
+ ## FOLDER : [opt] subfolder to use
637
+ ## FILES : [opt] contains a list of resources files to copy to install folder
638
+ macro(ibr_install_rsc target)
639
+ cmake_parse_arguments(install_rsc_${target} "EXECUTABLE;RELATIVE" "TYPE;FOLDER" "FILES" ${ARGN})
640
+ set(rsc_target "${target}_${install_rsc_${target}_TYPE}")
641
+
642
+ if(install_rsc_${target}_FOLDER)
643
+ set(rsc_folder "${install_rsc_${target}_TYPE}/${install_rsc_${target}_FOLDER}")
644
+ else()
645
+ set(rsc_folder "${install_rsc_${target}_TYPE}")
646
+ endif()
647
+
648
+ add_custom_target(${rsc_target}
649
+ COMMENT "run the ${install_rsc_${target}_TYPE} installation only for ${target} (component ${rsc_target})"
650
+ VERBATIM)
651
+ foreach(scriptFile ${install_rsc_${target}_FILES})
652
+ if(install_rsc_${target}_RELATIVE)
653
+ file(RELATIVE_PATH relativeFilename ${CMAKE_CURRENT_SOURCE_DIR} ${scriptFile})
654
+ else()
655
+ get_filename_component(relativeFilename ${scriptFile} NAME)
656
+ endif()
657
+
658
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
659
+ add_custom_command(TARGET ${rsc_target} POST_BUILD
660
+ COMMAND ${CMAKE_COMMAND} -E
661
+ copy_if_different ${scriptFile} ${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/${rsc_folder}/${relativeFilename})
662
+ endif()
663
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
664
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
665
+ add_custom_command(TARGET ${rsc_target} POST_BUILD
666
+ COMMAND ${CMAKE_COMMAND} -E
667
+ copy_if_different ${scriptFile} ${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/${rsc_folder}/${relativeFilename})
668
+ endforeach()
669
+ endforeach()
670
+
671
+ get_target_property(INSTALL_RSC_BUILD_FOLDER ${target} FOLDER)
672
+ set_target_properties(${rsc_target} PROPERTIES FOLDER ${INSTALL_RSC_BUILD_FOLDER})
673
+
674
+ add_dependencies(${target} ${rsc_target})
675
+ add_dependencies(PREBUILD ${rsc_target})
676
+
677
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
678
+ resourceFile(ADD ${rsc_folder} CONFIG_TYPE ${CMAKE_BUILD_TYPE} FILE_PATH "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/ibr_resources.ini")
679
+
680
+ if(install_rsc_${target}_EXECUTABLE)
681
+ install(
682
+ PROGRAMS ${install_rsc_${target}_FILES}
683
+ CONFIGURATIONS ${CMAKE_BUILD_TYPE}
684
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/${rsc_folder}"
685
+ )
686
+ else()
687
+ install(
688
+ FILES ${install_rsc_${target}_FILES}
689
+ CONFIGURATIONS ${CMAKE_BUILD_TYPE}
690
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/${rsc_folder}"
691
+ )
692
+ endif()
693
+ endif()
694
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
695
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
696
+ resourceFile(ADD ${rsc_folder} CONFIG_TYPE ${CONFIG_TYPES} FILE_PATH "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/ibr_resources.ini")
697
+
698
+ if(install_rsc_${target}_EXECUTABLE)
699
+ install(
700
+ PROGRAMS ${install_rsc_${target}_FILES}
701
+ CONFIGURATIONS ${CONFIG_TYPES}
702
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/${rsc_folder}"
703
+ )
704
+ else()
705
+ install(
706
+ FILES ${install_rsc_${target}_FILES}
707
+ CONFIGURATIONS ${CONFIG_TYPES}
708
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/${rsc_folder}"
709
+ )
710
+ endif()
711
+ endforeach()
712
+ endmacro()
713
+
714
+
715
+ ## High level macro to install in an homogen way all our ibr targets (it use some functions inside this file)
716
+ ##
717
+ ## RSC_FILE_ADD : [opt] is used to auto write/append relative paths of target resources into a common file
718
+ ## INSTALL_PDB : [opt] is used to auto install PDB file (when using MSVC according to the target type)
719
+ ## STANDALONE : [opt] bool ON/OFF var to call install_runtime or not (for bundle resolution)
720
+ ## DIRS : [opt] used if STANDALONE set to ON, see install_runtime doc
721
+ ## PLUGINS: [opt] used if STANDALONE set to ON, see install_runtime doc
722
+ ## MSVC_CMD : [opt] used to specify an absolute filePathName application to launch with the MSVC IDE Debugger associated to this target (project file)
723
+ ## MSVC_ARGS : [opt] load the MSVC debugger with correct settings (app path, args, working dir)
724
+ ##
725
+ macro(ibr_install_target target)
726
+ cmake_parse_arguments(ibrInst${target} "VERBOSE;INSTALL_PDB" "COMPONENT;MSVC_ARGS;STANDALONE;RSC_FOLDER" "SHADERS;RESOURCES;SCRIPTS;DIRS;PLUGINS" ${ARGN})
727
+
728
+ if(ibrInst${target}_RSC_FOLDER)
729
+ set(rsc_folder "${ibrInst${target}_RSC_FOLDER}")
730
+ else()
731
+ set(rsc_folder "${target}")
732
+ endif()
733
+
734
+ if(ibrInst${target}_SHADERS)
735
+ ibr_install_rsc(${target} EXECUTABLE TYPE "shaders" FOLDER ${rsc_folder} FILES "${ibrInst${target}_SHADERS}")
736
+ endif()
737
+
738
+ if(ibrInst${target}_RESOURCES)
739
+ ibr_install_rsc(${target} TYPE "resources" FOLDER ${rsc_folder} FILES "${ibrInst${target}_RESOURCES}")
740
+ endif()
741
+
742
+ if(ibrInst${target}_SCRIPTS)
743
+ ibr_install_rsc(${target} EXECUTABLE TYPE "scripts" FOLDER ${rsc_folder} FILES "${ibrInst${target}_SCRIPTS}")
744
+ endif()
745
+
746
+ if(ibrInst${target}_COMPONENT)
747
+ set(installCompArg COMPONENT ${ibrInst${target}_COMPONENT})
748
+ ## Create a custom install target based on COMPONENT
749
+ installTargetProject(${target} ${ibrInst${target}_COMPONENT})
750
+ endif()
751
+
752
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
753
+ set_target_properties(${target} PROPERTIES ${CMAKE_BUILD_TYPE}_POSTFIX "${CMAKE_${CMAKE_BUILD_TYPE}_POSTFIX}")
754
+ get_target_property(CURRENT_TARGET_BUILD_TYPE_POSTFIX ${target} ${CMAKE_BUILD_TYPE}_POSTFIX)
755
+ endif()
756
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
757
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
758
+ set_target_properties(${target} PROPERTIES ${CONFIG_TYPES_UC}_POSTFIX "${CMAKE_${CONFIG_TYPES_UC}_POSTFIX}")
759
+ get_target_property(CURRENT_TARGET_BUILD_TYPE_POSTFIX ${target} ${CONFIG_TYPES_UC}_POSTFIX)
760
+ endforeach()
761
+
762
+ ## Specify default installation rules
763
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
764
+ install(TARGETS ${target}
765
+ CONFIGURATIONS ${CMAKE_BUILD_TYPE}
766
+ LIBRARY DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
767
+ ARCHIVE DESTINATION ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
768
+ RUNTIME DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
769
+ )
770
+ install(TARGETS ${target}
771
+ CONFIGURATIONS ${CMAKE_BUILD_TYPE}
772
+ LIBRARY DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
773
+ ARCHIVE DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
774
+ )
775
+ endif()
776
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
777
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
778
+ install(TARGETS ${target}
779
+ CONFIGURATIONS ${CONFIG_TYPES}
780
+ LIBRARY DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
781
+ ARCHIVE DESTINATION ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
782
+ RUNTIME DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
783
+ )
784
+ install(TARGETS ${target}
785
+ CONFIGURATIONS ${CONFIG_TYPES}
786
+ LIBRARY DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
787
+ ARCHIVE DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
788
+ )
789
+ endforeach()
790
+
791
+ if(ibrInst${target}_INSTALL_PDB)
792
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
793
+ installPDB(${target} ${CMAKE_BUILD_TYPE}
794
+ LIBRARY_DEST ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}}
795
+ ARCHIVE_DEST ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}}
796
+ RUNTIME_DEST ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}}
797
+ )
798
+ endif()
799
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
800
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
801
+ installPDB(${target} ${CONFIG_TYPES}
802
+ LIBRARY_DEST ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
803
+ ARCHIVE_DEST ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
804
+ RUNTIME_DEST ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
805
+ )
806
+ endforeach()
807
+ endif()
808
+
809
+ ## install dynamic necessary dependencies
810
+ if(ibrInst${target}_STANDALONE)
811
+ get_target_property(type ${target} TYPE)
812
+ if(${type} MATCHES "EXECUTABLE")
813
+
814
+ if(ibrInst${target}_VERBOSE)
815
+ set(VERBOSE VERBOSE)
816
+ else()
817
+ set(VERBOSE )
818
+ endif()
819
+
820
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
821
+ install_runtime(bin/${target}${CMAKE_EXECUTABLE_SUFFIX} ## default relative to CMAKE_INSTALL_PREFIX
822
+ INSTALL_FOLDER "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}"
823
+ CONFIG_TYPE ${CMAKE_BUILD_TYPE}
824
+ ${VERBOSE}
825
+ TARGET ${target}
826
+ ${installCompArg}
827
+ PLUGINS ## will be installed
828
+ ${ibrInst${target}_PLUGINS}
829
+ DIRS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}}
830
+ ${ibrInst${target}_DIRS}
831
+ )
832
+ endif()
833
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
834
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
835
+ install_runtime(bin/${target}${CMAKE_EXECUTABLE_SUFFIX} ## default relative to CMAKE_INSTALL_PREFIX
836
+ INSTALL_FOLDER "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}"
837
+ CONFIG_TYPE ${CONFIG_TYPES}
838
+ ${VERBOSE}
839
+ TARGET ${target}
840
+ ${installCompArg}
841
+ PLUGINS ## will be installed
842
+ ${ibrInst${target}_PLUGINS}
843
+ DIRS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
844
+ ${ibrInst${target}_DIRS}
845
+ )
846
+ endforeach()
847
+ else()
848
+ message(WARNING "STANDALONE option is only compatible with EXECUTABLES target type. Skip the STANDALONE installation process.")
849
+ endif()
850
+ endif()
851
+
852
+ ## Provide a way to directly load the MSVC debugger with correct settings
853
+ if(MSVC)
854
+ if(ibrInst${target}_MSVC_CMD) ## command absolute filePathName is optional as the default is to use the installed target file application
855
+ set(msvcCmdArg COMMAND ${ibrInst${target}_MSVC_CMD}) ## flag following by the value (both to pass to the MSVCsetUserCommand function)
856
+ endif()
857
+ if(ibrInst${target}_MSVC_ARGS) ## args (between quotes) are optional
858
+ set(msvcArgsArg ARGS ${ibrInst${target}_MSVC_ARGS}) ## flag following by the value (both to pass to the MSVCsetUserCommand function)
859
+ endif()
860
+ get_target_property(type ${target} TYPE)
861
+ if( (ibrInst${target}_MSVC_CMD OR ibrInst${target}_MSVC_ARGS) OR (${type} MATCHES "EXECUTABLE") )
862
+ include(MSVCsetUserCommand)
863
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
864
+ MSVCsetUserCommand( ${target}
865
+ PATH ${CMAKE_OUTPUT_BIN_${CMAKE_BUILD_TYPE}} ##FILE option not necessary since it deduced from targetName
866
+ ARGS "${SIBR_PROGRAMARGS}"
867
+ ${msvcCmdArg}
868
+ #${msvcArgsArg}
869
+ WORKING_DIR ${CMAKE_OUTPUT_BIN_${CMAKE_BUILD_TYPE}}
870
+ )
871
+ endif()
872
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
873
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
874
+ MSVCsetUserCommand( ${target}
875
+ PATH ${CMAKE_OUTPUT_BIN_${CONFIG_TYPES_UC}} ##FILE option not necessary since it deduced from targetName
876
+ ARGS "${SIBR_PROGRAMARGS}"
877
+ ${msvcCmdArg}
878
+ #${msvcArgsArg}
879
+ WORKING_DIR ${CMAKE_OUTPUT_BIN_${CONFIG_TYPES_UC}}
880
+ )
881
+ endforeach()
882
+ elseif(NOT ${type} MATCHES "EXECUTABLE")
883
+ #message("Cannot set MSVCsetUserCommand with target ${target} without COMMAND parameter as it is not an executable (skip it)")
884
+ endif()
885
+ endif()
886
+
887
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/parse_arguments_multi.cmake ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(NOT WIN32 OR __parse_arguments_multi_cmake_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__parse_arguments_multi_cmake_INCLUDED__ ON)
15
+ endif()
16
+
17
+ ## This macro allow to process repeating multi value args from a given function which use cmake_parse_arguments module.
18
+ ##
19
+ ## cmake_parse_arguments multi args standard behavior:
20
+ ## function(foo)
21
+ ## cmake_parse_arguments(arg "" "" "MULTI" ${ARGN})
22
+ ## foreach(item IN LISTS arg_MULTI)
23
+ ## message(STATUS "${item}")
24
+ ## endforeach()
25
+ ## endfunction()
26
+ ## foo(MULTI x y MULTI z w)
27
+ ## The above code outputs 'z' and 'w'. It originally expected it to output all of 'x' 'y' 'z' 'w'.
28
+ ##
29
+ ## Using this macro inside a function which want to handle repeating multi args values
30
+ ## will recursively iterate onto the multi tags list to process each sub list.
31
+ ## It take as 1st argument the subTag flag to separate sub list from the main multi list.
32
+ ## It take as 2nd argument the nameList of the main multi list (the multiValuesArgs from cmake_parse_arguments: here it is MULTI in the example)
33
+ ## and that's why it is important that it should be a macro and not a function (to get access to external variable).
34
+ ## Then you give the content of this list allowing to be processed by the macro.
35
+ ##
36
+ ## parse_arguments_multi macro call a parse_arguments_multi_function which do actually the process from the given sub-list.
37
+ ## By default this function only print infos about what variables you are trying to pass/process (only verbose messages),
38
+ ## but, by overloading this cmake function, you will be able to externalize the process of your multi argument list.
39
+ ##
40
+ ## Usage (into a function) :
41
+ ## parse_arguments_multi(<multiArgsSubTag> <multiArgsList> <multiArgsListContent>
42
+ ## [NEED_RESULTS <multiArgsListSize>] [EXTRAS_FLAGS <...> <...> ...]
43
+ ## )
44
+ ##
45
+ ## Simple usage example [user point of view]:
46
+ ## foo(MULTI
47
+ ## SUB_MULTI x y
48
+ ## SUB_MULTI z w
49
+ ## )
50
+ ##
51
+ ## Simple usage example [inside a function]:
52
+ ## function(foo)
53
+ ## cmake_parse_arguments(arg "" "" "MULTI" ${ARGN})
54
+ ## include(parse_arguments_multi)
55
+ ## function(parse_arguments_multi_function )
56
+ ## #message("I'm an overloaded cmake function used by parse_arguments_multi")
57
+ ## #message("I'm processing first part of my sub list: ${ARGN}")
58
+ ## message("ARGV0=${ARGV0}")
59
+ ## message("ARGV1=${ARGV1}")
60
+ ## endfunction()
61
+ ## parse_arguments_multi(SUB_MULTI arg_MULTI ${arg_MULTI}) ## this function will process recusively items of the sub-list [default print messages]
62
+ ## endfunction()
63
+ ##
64
+ ## Will print:
65
+ ## ARGV0=z
66
+ ## ARGV1=w
67
+ ## ARGV0=x
68
+ ## ARGV1=y
69
+ ##
70
+ ## WARNING : DO NEVER ADD EXTRA THINGS TO parse_arguments_multi MACRO :
71
+ ## parse_arguments_multi(SUB_MULTI arg_MULTI ${arg_MULTI} EXTRAS foo bar SOMTHING) => will failed !!
72
+ ## use EXTRAS_FLAGS instead !!
73
+ ##
74
+ ## Advanced usage example [user point of view]:
75
+ ## bar(C:/prout/test.exe VERBOSE
76
+ ## PLUGINS
77
+ ## PLUGIN_PATH_NAME x PLUGIN_PATH_DEST w
78
+ ## PLUGIN_PATH_NAME a b PLUGIN_PATH_DEST y
79
+ ## PLUGIN_PATH_NAME c
80
+ ## )
81
+ ##
82
+ ## Advanced usage example [inside a function]:
83
+ ## function(bar execFilePathName)
84
+ ## cmake_parse_arguments(arg "VERBOSE" "" "PLUGINS" ${ARGN})
85
+ ##
86
+ ## include(parse_arguments_multi)
87
+ ## function(parse_arguments_multi_function results)
88
+ ## cmake_parse_arguments(pamf "VERBOSE" "PLUGIN_PATH_DEST;EXEC_PATH" "" ${ARGN}) ## EXEC_PATH is for internal use
89
+ ## message("")
90
+ ## message("I'm an overloaded cmake function used by parse_arguments_multi from install_runtime function")
91
+ ## message("I'm processing first part of my sub list: ${ARGN}")
92
+ ## message("PLUGIN_PATH_NAME = ${pamf_UNPARSED_ARGUMENTS}")
93
+ ## message(pamf_VERBOSE = ${pamf_VERBOSE})
94
+ ## message("pamf_PLUGIN_PATH_DEST = ${pamf_PLUGIN_PATH_DEST}")
95
+ ## message(pamf_EXEC_PATH = ${pamf_EXEC_PATH})
96
+ ## if(NOT ${pamf_PLUGIN_PATH_DEST})
97
+ ## set(pamf_PLUGIN_PATH_DEST ${pamf_EXEC_PATH})
98
+ ## endif()
99
+ ## foreach(plugin ${pamf_UNPARSED_ARGUMENTS})
100
+ ## get_filename_component(pluginName ${plugin} NAME)
101
+ ## list(APPEND pluginsList ${pamf_PLUGIN_PATH_DEST}/${pluginName})
102
+ ## endforeach()
103
+ ## set(${results} ${pluginsList} PARENT_SCOPE)
104
+ ## endfunction()
105
+ ##
106
+ ## if(arg_VERBOSE)
107
+ ## list(APPEND extra_flags_to_add VERBOSE) ## here we transmit the VERNOSE flag
108
+ ## endif()
109
+ ## get_filename_component(EXEC_PATH ${execFilePathName} PATH) ## will be the default value if PLUGIN_PATH_DEST option is not provided
110
+ ## list(APPEND extra_flags_to_add EXEC_PATH ${EXEC_PATH})
111
+ ## list(LENGTH arg_PLUGINS arg_PLUGINS_count)
112
+ ## parse_arguments_multi(PLUGIN_PATH_NAME arg_PLUGINS ${arg_PLUGINS}
113
+ ## NEED_RESULTS ${arg_PLUGINS_count} ## this is used to check when we are in the first loop (in order to reset parse_arguments_multi_results)
114
+ ## EXTRAS_FLAGS ${extra_flags_to_add} ## this is used to allow catching VERBOSE and PLUGIN_PATH_DEST flags of our overloaded function
115
+ ## )
116
+ ## endfunction()
117
+ ## message(parse_arguments_multi_results = ${parse_arguments_multi_results}) ## list of the whole pluginsList
118
+ ## #Will print w/x;a/y;b/y;C:/prout/c
119
+ ##
120
+ ## NOTE that here, since our overloaded function need to provide a result list, we use the other parse_arguments_multi_function signature (the which one with a results arg)
121
+ ##
122
+
123
+ function(parse_arguments_multi_function_default) ## used in case of you want to reset the default behavior of this function process
124
+ message("[default function] parse_arguments_multi_function(ARGC=${ARGC} ARGV=${ARGV} ARGN=${ARGN})")
125
+ message("This function is used by parse_arguments_multi and have to be overloaded to process sub list of multi values args")
126
+ endfunction()
127
+
128
+ function(parse_arguments_multi_function ) ## => the function to overload
129
+ parse_arguments_multi_function_default(${ARGN})
130
+ endfunction()
131
+
132
+ ## first default signature above
133
+ ##------------------------------
134
+ ## second results signature behind
135
+
136
+ function(parse_arguments_multi_function_default result) ## used in case of you want to reset the default behavior of this function process
137
+ message("[default function] parse_arguments_multi_function(ARGC=${ARGC} ARGV=${ARGV} ARGN=${ARGN})")
138
+ message("This function is used by parse_arguments_multi and have to be overloaded to process sub list of muluti values args")
139
+ endfunction()
140
+
141
+ function(parse_arguments_multi_function result) ## => the function to overload
142
+ parse_arguments_multi_function_default(result ${ARGN})
143
+ endfunction()
144
+
145
+ ## => the macro to use inside your function which use cmake_parse_arguments
146
+ # NOTE: entry point of parse_arguments_multi, which is called from win3rdPart)
147
+ macro(parse_arguments_multi multiArgsSubTag multiArgsList #<${multiArgsList}> the content of the list
148
+ )
149
+ # message (STATUS "")
150
+ # message(STATUS "calling parse_arguemnts_multi defined in parse_arguments_multi.cmake:141")
151
+ # message(STATUS "multiArgsSubTag = ${multiArgsSubTag}") # CHECK_CACHED_VAR
152
+ # message(STATUS "multiArgsList = ${multiArgsList}") # it contains the name of the variable which is holding the list i.e w3p_MULTI_SET
153
+ # message(STATUS "value of ${multiArgsList} = ${${multiArgsList}}") # a semicolon separated list of values passed to SET or MULTISET keyword in win3rdParty
154
+ # message(STATUS "actual values ARGN = ${ARGN}") # the same as ${${multiArgsList}}
155
+
156
+ ## INFO
157
+ ## starting from CMake 3.5 cmake_parse_arguments is not a module anymore and now is a native CMake command.
158
+ ## the behaviour is different though
159
+ ## In CMake 3.4, if you pass multiple times a multi_value_keyword, CMake returns the values of the LAST match
160
+ ## In CMake 3.5 and above, CMake returns the whole list of values that were following that multi_value_keyword
161
+ ## example:
162
+ ## cmake_parse_arguments(
163
+ ## <prefix>
164
+ ## "" # options
165
+ ## "" # one value keywords
166
+ ## "MY_MULTI_VALUE_TAG"
167
+ ## MY_MULTI_VALUE_TAG value1 value2
168
+ ## MY_MULTI_VALUE_TAG value3 value4
169
+ ## MY_MULTI_VALUE_TAG value5 value6
170
+ ## )
171
+ ## result in CMake 3.4
172
+ ## <prefix>_MY_MULTI_VALUE_TAG = "value5;value6"
173
+ ##
174
+ ## result in CMake 3.8
175
+ ## <prefix>_MY_MULTI_VALUE_TAG = "value5;value6"
176
+
177
+ #include(CMakeParseArguments) #module CMakeParseArguments is obsolete since cmake 3.5
178
+ # cmake_parse_arguments (<prefix> <options> <one_value_keywords> <multi_value_keywords> args)
179
+ # <options> : options (flags) pass to the macro
180
+ # <one_value_keywords> : options that neeed a value
181
+ # <multi_value_keywords> : options that neeed more than one value
182
+ cmake_parse_arguments(_pam "" "NEED_RESULTS" "${multiArgsSubTag};EXTRAS_FLAGS" ${ARGN})
183
+
184
+ ## multiArgsList is the name of the list used by the multiValuesOption flag from the cmake_parse_arguments of the user function
185
+ ## that's why we absolutly need to use MACRO here (and also for passing parse_arguments_multi_results when NEED_RESULTS flag is set)
186
+
187
+ ## for debugging
188
+ #message("")
189
+ #message("[parse_arguments_multi] => ARGN = ${ARGN}")
190
+ #message("_pam_NEED_RESULTS=${_pam_NEED_RESULTS}")
191
+ #message("_pam_EXTRAS_FLAGS=${_pam_EXTRAS_FLAGS}")
192
+ # foreach(var ${_pam_${multiArgsSubTag}})
193
+ # message("arg=${var}")
194
+ # endforeach()
195
+
196
+ if (${CMAKE_VERSION} VERSION_GREATER "3.5")
197
+ # lets make ${_pam_${multiArgsSubTag}} behave as it is in version 3.4
198
+ # that means, cmake_parse_arguments should have only the last values of a multi set for a given keyword
199
+
200
+ # message("")
201
+ # message("values in multiArgsList")
202
+ # foreach(val ${${multiArgsList}})
203
+ # message(STATUS ${val})
204
+ # endforeach()
205
+ # message("end values in multiArgsList")
206
+
207
+
208
+ set(lastIndexFound OFF)
209
+ list(LENGTH ${multiArgsList} argnLength)
210
+ # message(${argnLength})
211
+ math(EXPR argnLength "${argnLength}-1") # make last index a valid one
212
+ set(recordIndex 0)
213
+ set(records "") # clear records list
214
+ set(record0 "") # clear first record list
215
+ foreach(iter RANGE ${argnLength})
216
+ list(GET ${multiArgsList} ${iter} value)
217
+ # message(STATUS "index=${iter} value=${value}")
218
+ if (${value} STREQUAL ${multiArgsSubTag})
219
+ if (lastIndexFound)
220
+ list(APPEND records ${recordIndex}) # records store the list NAMES
221
+ math(EXPR recordIndex "${recordIndex}+1")
222
+ set(record${recordIndex} "") # clear record list
223
+ else ()
224
+ set(lastIndexFound ON)
225
+ endif()
226
+
227
+ set(lastIndex ${iter})
228
+ else ()
229
+ if (lastIndexFound)
230
+ # message(${value})
231
+ list(APPEND record${recordIndex} ${value})
232
+ endif()
233
+ endif()
234
+ endforeach()
235
+
236
+ # save the last list of values
237
+ if (lastIndexFound)
238
+ list(APPEND records ${recordIndex}) # records store the list NAMES
239
+ endif()
240
+
241
+ # set multiArgsList to make it behave like CMake 3.4
242
+ # message("")
243
+ # message("using my records")
244
+ foreach(recordName ${records})
245
+ # message(${recordName})
246
+ # foreach(value ${record${recordName}})
247
+ # message(${value})
248
+ # endforeach()
249
+ # message("")
250
+ set(_pam_${multiArgsSubTag} ${record${recordName}})
251
+ endforeach()
252
+ # message(${_pam_${multiArgsSubTag}})
253
+
254
+ # message("")
255
+ # message("using argn")
256
+ # foreach(value ${ARGN})
257
+ # message(${value})
258
+ # endforeach()
259
+ endif() # end if cmake > 3.5
260
+
261
+ # message("values with pam ${_pam_${multiArgsSubTag}}")
262
+
263
+ ## check and init
264
+ list(LENGTH ${multiArgsList} globalListCount) # GLUT_TRACE: globalListCound=16 in CMake3.4 and CMake3.8
265
+ # message(STATUS "nr items in multiArgsList: ${globalListCount}")
266
+ math(EXPR globalListCount "${globalListCount}-1") ## because it will contain [multiArgsSubTag + ${multiArgsList}]
267
+ if(_pam_NEED_RESULTS)
268
+ if(${globalListCount} EQUAL ${_pam_NEED_RESULTS})
269
+ ## first time we enter into this macro (because we call it recursively)
270
+ unset(parse_arguments_multi_results)
271
+ endif()
272
+ endif()
273
+
274
+ ## process the part of the multi agrs list
275
+ ## ${ARGN} shouldn't be passed to the function in order to avoid missmatch size list ${multiArgsList} and _pam_${multiArgsSubTag}
276
+ ## if you want to pass extra internal flags from your function to this callback, use EXTRAS_FLAGS
277
+ if(_pam_NEED_RESULTS)
278
+ parse_arguments_multi_function(parse_arguments_multi_function_result ${_pam_${multiArgsSubTag}} ${_pam_EXTRAS_FLAGS})
279
+ list(APPEND parse_arguments_multi_results ${parse_arguments_multi_function_result})
280
+ else()
281
+ # message(STATUS "about to call parse_arguments_multi_function in parse_arguments_multi.cmake:177 ${_pam_${multiArgsSubTag}} and extra flags ${_pam_EXTRAS_FLAGS}")
282
+ parse_arguments_multi_function(${_pam_${multiArgsSubTag}} ${_pam_EXTRAS_FLAGS})
283
+ endif()
284
+
285
+ ## remove just processed items from the main list to process (multiArgsList)
286
+ list(REVERSE ${multiArgsList})
287
+ list(LENGTH _pam_${multiArgsSubTag} subTagListCount)
288
+ unset(ids)
289
+ foreach(id RANGE ${subTagListCount})
290
+ list(APPEND ids ${id})
291
+ endforeach()
292
+ list(REMOVE_AT ${multiArgsList} ${ids})
293
+ list(REVERSE ${multiArgsList})
294
+
295
+ ## test if remain sub multi list to process (recursive call) or finish the process
296
+ list(LENGTH ${multiArgsList} mainTagListCount)
297
+ if(${mainTagListCount} GREATER 1)
298
+ ## do not pass ${ARGN} just because it will re pass the initial 2 inputs args and we wont as they was consumed (in order to avoir conflicts)
299
+ # message(STATUS "about to call a parse_arguments_multi but without knowing where the definition is going to be taken from")
300
+ parse_arguments_multi(${multiArgsSubTag} ${multiArgsList} ${${multiArgsList}}
301
+ NEED_RESULTS ${_pam_NEED_RESULTS} EXTRAS_FLAGS ${_pam_EXTRAS_FLAGS}
302
+ )
303
+ endif()
304
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/linux/sibr_library.cmake ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ # NOTE
12
+ # This feature is used to easily download, store and link external dependencies. This
13
+ # requires to prepare pre-compiled libraries (to download). For now, packages have
14
+ # only be prepare for Windows 64-bit with Visual Studio 2012. (You should re-build
15
+ # everything if you want to use another version of Visual Studio/ another compiler).
16
+
17
+ # NOTE ABOUT UNIX SYSTEMS
18
+ # There is no need for "searching mechanism". This function is discard and your
19
+ # libraries should be installed is the standard folders that are:
20
+ #
21
+ # /usr/include/
22
+ # /usr/lib/
23
+ # /usr/lib64/
24
+ # for packages downloaded using apt-get/yum
25
+ #
26
+ # /usr/local/include/
27
+ # /usr/local/lib/
28
+ # /usr/local/lib64/
29
+ # for packages manually installed ("make install")
30
+ #
31
+ # if you encounter problems when linking (e.g. lib not found even if it is installed),
32
+ # please check these folders are in your search PATH environment variables.
33
+
34
+ set(EXTLIBS_PACKAGE_FOLDER "${CMAKE_SOURCE_DIR}/extlibs")
35
+
36
+ function(sibr_addlibrary)
37
+ if(NOT WIN32)
38
+ return()
39
+ endif()
40
+
41
+ file(MAKE_DIRECTORY ${EXTLIBS_PACKAGE_FOLDER})
42
+ cmake_parse_arguments(args "VCID" "VERBOSE;TIMEOUT;DEFAULT_USE;NAME;VERSION;MSVC11;MSVC12;MSVC14;MSVC17" "MULTI_SET;SET" ${ARGN})
43
+
44
+
45
+ if (NOT "${args_VERSION}" MATCHES "")
46
+ message(WARNING "VERSION is not implemented yet")
47
+ endif()
48
+
49
+ set(lcname "")
50
+ set(ucname "")
51
+ string(TOLOWER "${args_NAME}" lcname)
52
+ string(TOUPPER "${args_NAME}" ucname)
53
+
54
+ set(LIB_PACKAGE_FOLDER "${EXTLIBS_PACKAGE_FOLDER}/${lcname}")
55
+ win3rdParty(${ucname}
56
+ $<args_VCID:VCID>
57
+ VERBOSE ${args_VERBOSE}
58
+ TIMEOUT ${args_TIMEOUT}
59
+ DEFAULT_USE ${args_DEFAULT_USE}
60
+ MSVC11 "${LIB_PACKAGE_FOLDER}" "${args_MSVC11}"
61
+ MSVC12 "${LIB_PACKAGE_FOLDER}" "${args_MSVC12}"
62
+ MSVC14 "${LIB_PACKAGE_FOLDER}" "${args_MSVC14}" # TODO SV: make sure to build this library if required
63
+ MSVC17 "${LIB_PACKAGE_FOLDER}" "${args_MSVC17}"
64
+ SET ${args_SET}
65
+ MULTI_SET ${args_MULTI_SET}
66
+ )
67
+
68
+ # Add include/ directory
69
+ # and lib/ directories
70
+
71
+ # TODO SV: paths not matching with current hierarchy. example: libraw/libraw-0.17.1/include
72
+ # SR: The link directories will also be used to lookup for dependency DLLs to copy in the install directory.
73
+ # Some libraries put the DLLs in the bin/ directory, so we include those.
74
+ file(GLOB subdirs RELATIVE ${LIB_PACKAGE_FOLDER} ${LIB_PACKAGE_FOLDER}/*)
75
+ set(dirlist "")
76
+ foreach(dir ${subdirs})
77
+ if(IS_DIRECTORY ${LIB_PACKAGE_FOLDER}/${dir})
78
+ # message("adding ${LIB_PACKAGE_FOLDER}/${dir}/include/ to the include directories")
79
+ include_directories("${LIB_PACKAGE_FOLDER}/${dir}/include/")
80
+ # message("adding ${LIB_PACKAGE_FOLDER}/${dir}/lib[64] to the link directories")
81
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/")
82
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/lib/")
83
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/lib64/")
84
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/bin/")
85
+ endif()
86
+ endforeach()
87
+
88
+ endfunction()
89
+
90
+ include(FetchContent)
91
+ include(git_describe)
92
+ include(install_runtime)
93
+
94
+ function(sibr_gitlibrary)
95
+ cmake_parse_arguments(args "" "TARGET;GIT_REPOSITORY;GIT_TAG;ROOT_DIR;SOURCE_DIR" "INCLUDE_DIRS" ${ARGN})
96
+ if(NOT args_TARGET)
97
+ message(FATAL "Error on sibr_gitlibrary : please define your target name.")
98
+ return()
99
+ endif()
100
+
101
+ if(NOT args_ROOT_DIR)
102
+ set(args_ROOT_DIR ${args_TARGET})
103
+ endif()
104
+
105
+ if(NOT args_SOURCE_DIR)
106
+ set(args_SOURCE_DIR ${args_TARGET})
107
+ endif()
108
+
109
+ if(args_GIT_REPOSITORY AND args_GIT_TAG)
110
+ if(EXISTS ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}/.git)
111
+ git_describe(
112
+ PATH ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}
113
+ GIT_URL SIBR_GITLIBRARY_URL
114
+ GIT_BRANCH SIBR_GITLIBRARY_BRANCH
115
+ GIT_COMMIT_HASH SIBR_GITLIBRARY_COMMIT_HASH
116
+ GIT_TAG SIBR_GITLIBRARY_TAG
117
+ )
118
+
119
+ if((SIBR_GITLIBRARY_URL STREQUAL args_GIT_REPOSITORY) AND
120
+ ((SIBR_GITLIBRARY_BRANCH STREQUAL args_GIT_TAG) OR
121
+ (SIBR_GITLIBRARY_TAG STREQUAL args_GIT_TAG) OR
122
+ (SIBR_GITLIBRARY_COMMIT_HASH STREQUAL args_GIT_TAG)))
123
+ message(STATUS "Library ${args_TARGET} already available, skipping.")
124
+ set(SIBR_GITLIBRARY_DECLARED ON)
125
+ else()
126
+ message(STATUS "Adding library ${args_TARGET} from git...")
127
+ endif()
128
+ endif()
129
+
130
+ FetchContent_Declare(${args_TARGET}
131
+ GIT_REPOSITORY ${args_GIT_REPOSITORY}
132
+ GIT_TAG ${args_GIT_TAG}
133
+ GIT_SHALLOW ON
134
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}
135
+ SUBBUILD_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/subbuild
136
+ BINARY_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/build
137
+ )
138
+ FetchContent_GetProperties(${args_TARGET})
139
+ string(TOLOWER "<name>" lcTargetName)
140
+
141
+ if((NOT SIBR_GITLIBRARY_DECLARED) AND (NOT ${lcTargetName}_POPULATED))
142
+ message(STATUS "Populating library ${args_TARGET}...")
143
+ FetchContent_Populate(${args_TARGET} QUIET
144
+ GIT_REPOSITORY ${args_GIT_REPOSITORY}
145
+ GIT_TAG ${args_GIT_TAG}
146
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}
147
+ SUBBUILD_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/subbuild
148
+ BINARY_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/build
149
+ )
150
+ endif()
151
+
152
+ add_subdirectory(${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/build)
153
+
154
+ get_target_property(type ${args_TARGET} TYPE)
155
+ if(NOT (type STREQUAL "INTERFACE_LIBRARY"))
156
+ set_target_properties(${args_TARGET} PROPERTIES FOLDER "extlibs")
157
+
158
+ ibr_install_target(${args_TARGET}
159
+ COMPONENT ${args_TARGET}_install ## will create custom target to install only this project
160
+ )
161
+ endif()
162
+
163
+ list(APPEND ${args_TARGET}_INCLUDE_DIRS ${EXTLIBS_PACKAGE_FOLDER}/${args_ROOT_DIR})
164
+ list(APPEND ${args_TARGET}_INCLUDE_DIRS ${EXTLIBS_PACKAGE_FOLDER}/${args_ROOT_DIR}/${args_SOURCE_DIR})
165
+
166
+ foreach(args_INCLUDE_DIR ${args_INCLUDE_DIRS})
167
+ list(APPEND ${args_TARGET}_INCLUDE_DIRS ${EXTLIBS_PACKAGE_FOLDER}/${args_ROOT_DIR}/${args_SOURCE_DIR}/${args_INCLUDE_DIR})
168
+ endforeach()
169
+
170
+ include_directories(${${args_TARGET}_INCLUDE_DIRS})
171
+ else()
172
+ message(FATAL "Error on sibr_gitlibrary for target ${args_TARGET}: missing git tag or git url.")
173
+ endif()
174
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/MSVCsetUserCommand.cmake ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(__MSVCsetUserCommand_cmake_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__MSVCsetUserCommand_cmake_INCLUDED__ ON)
15
+ endif()
16
+
17
+ ## Allow to configure the Debugger settings of visual studio
18
+ ## Note: Using this command under linux doesn't affect anything
19
+ ## On run Debug Windows local : visual will try to load a specific COMMAND with ARGS in the provided WORKING_DIR
20
+ ##
21
+ ## usage:
22
+ ## MSVCsetUserCommand( <targetName>
23
+ ## [COMMAND <myCustomAppToLaunch> | [ PATH <myCustomDirWhereIsDefaultTargetFileNameToLaunch> [FILE <myCustomExecFileToLaunch>] ] ]
24
+ ## ARGS <associatedArguments>
25
+ ## WORKING_DIR <whereStartTheProgram>
26
+ ## )
27
+ ##
28
+ ## Warning 1 : All arugments () must be passed under quotes
29
+ ## Warning 2 : WORKING_DIR path arg have to finish with remain slah '/'
30
+ ## Warning 3 : use COMMAND for external app OR PATH (optionaly with FILE) option(s) to set your built/installed/moved target
31
+ ##
32
+ ## Example 1:
33
+ ## include(MSVCsetUserCommand)
34
+ ## MSVCsetUserCommand( UnityRenderingPlugin
35
+ ## COMMAND "C:/Program Files (x86)/Unity/Editor/Unity.exe"
36
+ ## ARGS "-force-opengl -projectPath \"${CMAKE_HOME_DIRECTORY}/UnityPlugins/RenderingPluginExample/UnityProject\""
37
+ ## WORKING_DIR "${CMAKE_HOME_DIRECTORY}/UnityPlugins/RenderingPluginExample/UnityProject"
38
+ ## VERBOSE
39
+ ## )
40
+ ##
41
+ ## Example 2:
42
+ ## include(MSVCsetUserCommand)
43
+ ## MSVCsetUserCommand( ibrApp
44
+ ## PATH "C:/Program Files (x86)/workspace/IBR/install"
45
+ ## FILE "ibrApp${CMAKE_EXECUTABLE_SUFFIX}" ## this option line is optional since the target name didn't change between build and install step
46
+ ## ARGS "-path \"${CMAKE_HOME_DIRECTORY}/dataset\""
47
+ ## WORKING_DIR "${CMAKE_HOME_DIRECTORY}"
48
+ ## VERBOSE
49
+ ## )
50
+ ##
51
+ function(MSVCsetUserCommand targetName)
52
+ cmake_parse_arguments(MSVCsuc "VERBOSE" "PATH;FILE;COMMAND;ARGS;WORKING_DIR" "" ${ARGN} )
53
+
54
+ ## If no arguments are given, do not create an unecessary .vcxproj.user file
55
+ set(MSVCsuc_DEFAULT OFF)
56
+
57
+ if(MSVCsuc_PATH AND MSVCsuc_DEFAULT)
58
+ set(MSVCsuc_DEFAULT OFF)
59
+ endif()
60
+
61
+ if(MSVCsuc_FILE AND MSVCsuc_DEFAULT)
62
+ set(MSVCsuc_DEFAULT OFF)
63
+ endif()
64
+
65
+ if(NOT MSVCsuc_COMMAND)
66
+ if(MSVCsuc_PATH AND MSVCsuc_FILE)
67
+ set(MSVCsuc_COMMAND "${MSVCsuc_PATH}\\${MSVCsuc_FILE}")
68
+ elseif(MSVCsuc_PATH)
69
+ set(MSVCsuc_COMMAND "${MSVCsuc_PATH}\\$(TargetFileName)")
70
+ else()
71
+ set(MSVCsuc_COMMAND "$(TargetPath)") ## => $(TargetDir)\$(TargetName)$(TargetExt)
72
+ endif()
73
+ elseif(MSVCsuc_DEFAULT)
74
+ set(MSVCsuc_DEFAULT OFF)
75
+ endif()
76
+
77
+ # NOTE: there was a typo here. there is an else if written after else statement
78
+ # changing the order of the else if statement
79
+ if(MSVCsuc_WORKING_DIR)
80
+ file(TO_NATIVE_PATH ${MSVCsuc_WORKING_DIR} MSVCsuc_WORKING_DIR)
81
+ elseif(MSVCsuc_DEFAULT)
82
+ set(MSVCsuc_DEFAULT OFF)
83
+ else()
84
+ set(MSVCsuc_WORKING_DIR "$(ProjectDir)")
85
+ endif()
86
+
87
+ if(NOT MSVCsuc_ARGS)
88
+ set(MSVCsuc_ARGS "")
89
+ elseif(MSVCsuc_DEFAULT)
90
+ set(MSVCsuc_DEFAULT OFF)
91
+ endif()
92
+
93
+ if(MSVC10 OR (MSVC AND MSVC_VERSION GREATER 1600)) # 2010 or newer
94
+
95
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
96
+ set(PLATEFORM_BITS x64)
97
+ else()
98
+ set(PLATEFORM_BITS Win32)
99
+ endif()
100
+
101
+ if(NOT MSVCsuc_DEFAULT AND PLATEFORM_BITS)
102
+
103
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${targetName}.vcxproj.user"
104
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>
105
+ <Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">
106
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|${PLATEFORM_BITS}'\">
107
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
108
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
109
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
110
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
111
+ </PropertyGroup>
112
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|${PLATEFORM_BITS}'\">
113
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
114
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
115
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
116
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
117
+ </PropertyGroup>
118
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='MinSizeRel|${PLATEFORM_BITS}'\">
119
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
120
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
121
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
122
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
123
+ </PropertyGroup>
124
+ <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='RelWithDebInfo|${PLATEFORM_BITS}'\">
125
+ <LocalDebuggerCommand>${MSVCsuc_COMMAND}</LocalDebuggerCommand>
126
+ <LocalDebuggerCommandArguments>${MSVCsuc_ARGS}</LocalDebuggerCommandArguments>
127
+ <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
128
+ <LocalDebuggerWorkingDirectory>${MSVCsuc_WORKING_DIR}</LocalDebuggerWorkingDirectory>
129
+ </PropertyGroup>
130
+ </Project>"
131
+ )
132
+ if(MSVCsuc_VERBOSE)
133
+ message(STATUS "[MSVCsetUserCommand] Write ${CMAKE_CURRENT_BINARY_DIR}/${targetName}.vcxproj.user file")
134
+ message(STATUS " to execute ${MSVCsuc_COMMAND} ${MSVCsuc_ARGS}")
135
+ message(STATUS " from derectory ${MSVCsuc_WORKING_DIR}")
136
+ message(STATUS " on visual studio run debugger button")
137
+ endif()
138
+
139
+ else()
140
+ message(WARNING "PLATEFORM_BITS is undefined...")
141
+ endif()
142
+
143
+ else()
144
+ if(MSVCsuc_VERBOSE)
145
+ message(WARNING "MSVCsetUserCommand is disable because too old MSVC is used (need MSVC10 2010 or newer)")
146
+ endif()
147
+ endif()
148
+
149
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Modules/FindASSIMP.cmake ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## Try to find the ASSIMP library
12
+ ## Once done this will define
13
+ ##
14
+ ## ASSIMP_FOUND - system has ASSIMP
15
+ ## ASSIMP_INCLUDE_DIR - The ASSIMP include directory
16
+ ## ASSIMP_LIBRARIES - The libraries needed to use ASSIMP
17
+ ## ASSIMP_CMD - the full path of ASSIMP executable
18
+ ## ASSIMP_DYNAMIC_LIB - the Assimp dynamic lib (available only on windows as .dll file for the moment)
19
+ ##
20
+ ## Edited for using a bugfixed version of Assimp
21
+
22
+ if(NOT ASSIMP_DIR)
23
+ set(ASSIMP_DIR "$ENV{ASSIMP_DIR}" CACHE PATH "ASSIMP root directory")
24
+ endif()
25
+ if(ASSIMP_DIR)
26
+ file(TO_CMAKE_PATH ${ASSIMP_DIR} ASSIMP_DIR)
27
+ endif()
28
+
29
+
30
+ ## set the LIB POSTFIX to find in a right directory according to what kind of compiler we use (32/64bits)
31
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
32
+ set(ASSIMP_SEARCH_LIB "lib64")
33
+ set(ASSIMP_SEARCH_BIN "bin64")
34
+ set(ASSIMP_SEARCH_LIB_PATHSUFFIXE "x64")
35
+ else()
36
+ set(ASSIMP_SEARCH_LIB "lib32")
37
+ set(ASSIMP_SEARCH_BIN "bin32")
38
+ set(ASSIMP_SEARCH_LIB_PATHSUFFIXE "x86")
39
+ endif()
40
+
41
+ set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
42
+
43
+
44
+ FIND_PATH(ASSIMP_INCLUDE_DIR
45
+ NAMES assimp/config.h
46
+ PATHS
47
+ ${ASSIMP_DIR}
48
+ ## linux
49
+ /usr
50
+ /usr/local
51
+ /opt/local
52
+ ## windows
53
+ "$ENV{PROGRAMFILES}/Assimp"
54
+ "$ENV{${PROGRAMFILESx86}}/Assimp"
55
+ "$ENV{ProgramW6432}/Assimp"
56
+ PATH_SUFFIXES include
57
+ )
58
+
59
+
60
+ FIND_LIBRARY(ASSIMP_LIBRARY
61
+ NAMES assimp-vc140-mt
62
+ PATHS
63
+ ${ASSIMP_DIR}/${ASSIMP_SEARCH_LIB}
64
+ ${ASSIMP_DIR}/lib
65
+ ${ASSIMP_DIR}/lib64
66
+ ## linux
67
+ /usr/${ASSIMP_SEARCH_LIB}
68
+ /usr/local/${ASSIMP_SEARCH_LIB}
69
+ /opt/local/${ASSIMP_SEARCH_LIB}
70
+ /usr/lib
71
+ /usr/local/lib
72
+ /opt/local/lib
73
+ ## windows
74
+ "$ENV{PROGRAMFILES}/Assimp/${ASSIMP_SEARCH_LIB}"
75
+ "$ENV{${PROGRAMFILESx86}}/Assimp/${ASSIMP_SEARCH_LIB}"
76
+ "$ENV{ProgramW6432}/Assimp/${ASSIMP_SEARCH_LIB}"
77
+ "$ENV{PROGRAMFILES}/Assimp/lib"
78
+ "$ENV{${PROGRAMFILESx86}}/Assimp/lib"
79
+ "$ENV{ProgramW6432}/Assimp/lib"
80
+ PATH_SUFFIXES ${ASSIMP_SEARCH_LIB_PATHSUFFIXE}
81
+ )
82
+ set(ASSIMP_LIBRARIES ${ASSIMP_LIBRARY})
83
+
84
+
85
+ if(ASSIMP_LIBRARY)
86
+ get_filename_component(ASSIMP_LIBRARY_DIR ${ASSIMP_LIBRARY} PATH)
87
+ file(GLOB ASSIMP_DYNAMIC_LIB "${ASSIMP_LIBRARY_DIR}/assimp*.dll")
88
+ if(NOT ASSIMP_DYNAMIC_LIB)
89
+ message("ASSIMP_DYNAMIC_LIB is missing... at ${ASSIMP_LIBRARY_DIR}")
90
+ endif()
91
+ set(ASSIMP_DYNAMIC_LIB ${ASSIMP_DYNAMIC_LIB} CACHE PATH "Windows dll location")
92
+ endif()
93
+
94
+ MARK_AS_ADVANCED(ASSIMP_DYNAMIC_LIB ASSIMP_INCLUDE_DIR ASSIMP_LIBRARIES)
95
+
96
+ INCLUDE(FindPackageHandleStandardArgs)
97
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASSIMP
98
+ REQUIRED_VARS ASSIMP_INCLUDE_DIR ASSIMP_LIBRARIES
99
+ FAIL_MESSAGE "ASSIMP wasn't found correctly. Set ASSIMP_DIR to the root SDK installation directory."
100
+ )
101
+
102
+ if(NOT ASSIMP_FOUND)
103
+ set(ASSIMP_DIR "" CACHE STRING "Path to ASSIMP install directory")
104
+ endif()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Modules/FindEmbree.cmake ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## Important Note:
12
+ ## This is not an official Find*cmake. It has been written for searching through
13
+ ## a custom path (EMBREE_DIR) before checking elsewhere.
14
+ ##
15
+ ## FindEMBREE.cmake
16
+ ## Find EMBREE's includes and library
17
+ ##
18
+ ## This module defines :
19
+ ## [in] EMBREE_DIR, The base directory to search for EMBREE (as cmake var or env var)
20
+ ## [out] EMBREE_INCLUDE_DIR where to find EMBREE.h
21
+ ## [out] EMBREE_LIBRARIES, EMBREE_LIBRARY, libraries to link against to use EMBREE
22
+ ## [out] EMBREE_FOUND, If false, do not try to use EMBREE.
23
+ ##
24
+
25
+
26
+ if(NOT EMBREE_DIR)
27
+ set(EMBREE_DIR "$ENV{EMBREE_DIR}" CACHE PATH "EMBREE root directory")
28
+ endif()
29
+ if(EMBREE_DIR)
30
+ file(TO_CMAKE_PATH ${EMBREE_DIR} EMBREE_DIR)
31
+ endif()
32
+
33
+
34
+ ## set the LIB POSTFIX to find in a right directory according to what kind of compiler we use (32/64bits)
35
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
36
+ set(EMBREE_SEARCH_LIB "lib64")
37
+ set(EMBREE_SEARCH_BIN "bin64")
38
+ set(EMBREE_SEARCH_LIB_PATHSUFFIXE "x64")
39
+ else()
40
+ set(EMBREE_SEARCH_LIB "lib32")
41
+ set(EMBREE_SEARCH_BIN "bin32")
42
+ set(EMBREE_SEARCH_LIB_PATHSUFFIXE "x86")
43
+ endif()
44
+
45
+ set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
46
+
47
+ FIND_PATH(EMBREE_INCLUDE_DIR
48
+ NAMES embree3/rtcore_geometry.h
49
+ PATHS
50
+ ${EMBREE_DIR}
51
+ ## linux
52
+ /usr
53
+ /usr/local
54
+ /opt/local
55
+ ## windows
56
+ "$ENV{PROGRAMFILES}/EMBREE"
57
+ "$ENV{${PROGRAMFILESx86}}/EMBREE"
58
+ "$ENV{ProgramW6432}/EMBREE"
59
+ PATH_SUFFIXES include
60
+ )
61
+
62
+ FIND_LIBRARY(EMBREE_LIBRARY
63
+ NAMES embree3
64
+ PATHS
65
+ ${EMBREE_DIR}/${EMBREE_SEARCH_LIB}
66
+ ${EMBREE_DIR}/lib
67
+ ## linux
68
+ /usr/${EMBREE_SEARCH_LIB}
69
+ /usr/local/${EMBREE_SEARCH_LIB}
70
+ /opt/local/${EMBREE_SEARCH_LIB}
71
+ /usr/lib
72
+ /usr/local/lib
73
+ /opt/local/lib
74
+ ## windows
75
+ "$ENV{PROGRAMFILES}/EMBREE/${EMBREE_SEARCH_LIB}"
76
+ "$ENV{${PROGRAMFILESx86}}/EMBREE/${EMBREE_SEARCH_LIB}"
77
+ "$ENV{ProgramW6432}/EMBREE/${EMBREE_SEARCH_LIB}"
78
+ "$ENV{PROGRAMFILES}/EMBREE/lib"
79
+ "$ENV{${PROGRAMFILESx86}}/EMBREE/lib"
80
+ "$ENV{ProgramW6432}/EMBREE/lib"
81
+ PATH_SUFFIXES ${EMBREE_SEARCH_LIB_PATHSUFFIXE}
82
+ )
83
+ set(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
84
+
85
+ MARK_AS_ADVANCED(EMBREE_INCLUDE_DIR EMBREE_LIBRARIES)
86
+
87
+ INCLUDE(FindPackageHandleStandardArgs)
88
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE
89
+ REQUIRED_VARS EMBREE_INCLUDE_DIR EMBREE_LIBRARIES
90
+ FAIL_MESSAGE "EMBREE wasn't found correctly. Set EMBREE_DIR to the root SDK installation directory."
91
+ )
92
+
93
+ if(NOT EMBREE_FOUND)
94
+ set(EMBREE_DIR "" CACHE STRING "Path to EMBREE install directory")
95
+ endif()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Modules/FindFFmpeg.cmake ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## Try to find the FFMPEG library
12
+ ## Once done this will define
13
+ ##
14
+ ## FFMPEG_FOUND - system has FFmpeg
15
+ ## FFMPEG_INCLUDE_DIR - The FFmpeg include directory
16
+ ## FFMPEG_LIBRARIES - The libraries needed to use FFmpeg
17
+ ## FFMPEG_DYNAMIC_LIBS - DLLs for windows
18
+
19
+
20
+ if(NOT FFMPEG_DIR)
21
+ set(FFMPEG_DIR "$ENV{FFMPEG_DIR}" CACHE PATH "FFMPEG_DIR root directory")
22
+ endif()
23
+
24
+ if(FFMPEG_DIR)
25
+ file(TO_CMAKE_PATH ${FFMPEG_DIR} FFMPEG_DIR)
26
+ endif()
27
+
28
+ MACRO(FFMPEG_FIND varname shortname headername)
29
+
30
+ # Path to include dirs
31
+ FIND_PATH(FFMPEG_${varname}_INCLUDE_DIRS
32
+ NAMES "lib${shortname}/${headername}"
33
+ PATHS
34
+ "${FFMPEG_DIR}/include" # modify this to adapt according to OS/compiler
35
+ )
36
+
37
+ #Add libraries
38
+ IF(${FFMPEG_${varname}_INCLUDE_DIRS} STREQUAL "FFMPEG_${varname}_INCLUDE_DIR-NOTFOUND")
39
+ MESSAGE(STATUS "Can't find includes for ${shortname}...")
40
+ ELSE()
41
+ FIND_LIBRARY(FFMPEG_${varname}_LIBRARIES
42
+ NAMES ${shortname}
43
+ PATHS
44
+ ${FFMPEG_DIR}/lib
45
+ )
46
+
47
+ # set libraries and other variables
48
+ SET(FFMPEG_${varname}_FOUND 1)
49
+ SET(FFMPEG_${varname}_INCLUDE_DIRS ${FFMPEG_${varname}_INCLUDE_DIR})
50
+ SET(FFMPEG_${varname}_LIBS ${FFMPEG_${varname}_LIBRARIES})
51
+ ENDIF()
52
+ ENDMACRO(FFMPEG_FIND)
53
+
54
+ #Calls to ffmpeg_find to get librarires ------------------------------
55
+ FFMPEG_FIND(LIBAVFORMAT avformat avformat.h)
56
+ FFMPEG_FIND(LIBAVDEVICE avdevice avdevice.h)
57
+ FFMPEG_FIND(LIBAVCODEC avcodec avcodec.h)
58
+ FFMPEG_FIND(LIBAVUTIL avutil avutil.h)
59
+ FFMPEG_FIND(LIBSWSCALE swscale swscale.h)
60
+
61
+ # check if libs are found and set FFMPEG related variables
62
+ #SET(FFMPEG_FOUND "NO")
63
+ IF(FFMPEG_LIBAVFORMAT_FOUND
64
+ AND FFMPEG_LIBAVDEVICE_FOUND
65
+ AND FFMPEG_LIBAVCODEC_FOUND
66
+ AND FFMPEG_LIBAVUTIL_FOUND
67
+ AND FFMPEG_LIBSWSCALE_FOUND)
68
+
69
+ # All ffmpeg libs are here
70
+ SET(FFMPEG_FOUND "YES")
71
+ SET(FFMPEG_INCLUDE_DIR ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS})
72
+ SET(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBAVFORMAT_LIBRARY_DIRS})
73
+ SET(FFMPEG_LIBRARIES
74
+ ${FFMPEG_LIBAVFORMAT_LIBS}
75
+ ${FFMPEG_LIBAVDEVICE_LIBS}
76
+ ${FFMPEG_LIBAVCODEC_LIBS}
77
+ ${FFMPEG_LIBAVUTIL_LIBS}
78
+ ${FFMPEG_LIBSWSCALE_LIBS} )
79
+
80
+ # add dynamic libraries
81
+ if(WIN32)
82
+ file(GLOB FFMPEG_DYNAMIC_LIBS "${FFMPEG_DIR}/bin/*.dll")
83
+ if(NOT FFMPEG_DYNAMIC_LIBS)
84
+ message("FFMPEG_DYNAMIC_LIBS is missing...")
85
+ endif()
86
+ set(FFMPEG_DYNAMIC_LIBS ${FFMPEG_DYNAMIC_LIBS} CACHE PATH "Windows dll location")
87
+ endif()
88
+
89
+ mark_as_advanced(FFMPEG_INCLUDE_DIR FFMPEG_LIBRARY_DIRS FFMPEG_LIBRARIES FFMPEG_DYNAMIC_LIBS)
90
+ ELSE ()
91
+ MESSAGE(STATUS "Could not find FFMPEG")
92
+ ENDIF()
93
+
94
+
95
+ INCLUDE(FindPackageHandleStandardArgs)
96
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFMPEG
97
+ REQUIRED_VARS FFMPEG_INCLUDE_DIR FFMPEG_LIBRARIES
98
+ FAIL_MESSAGE "FFmpeg wasn't found correctly. Set FFMPEG_DIR to the root SDK installation directory."
99
+ )
100
+
101
+ if(NOT FFMPEG_FOUND)
102
+ set(FFMPEG_DIR "" CACHE STRING "Path to FFmpeg install directory")
103
+ endif()
104
+
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/Win3rdParty.cmake ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## This file should be include and use only on WIN32 OS and once
12
+ ## It allow to auto check/download and use a preconfigured 3rdParty binaries for cmake usage
13
+ ## It use the downloadAndExtractZipFile cmake module to work.
14
+ ##
15
+ if(__Win3rdParty_cmake_INCLUDED__)
16
+ return()
17
+ else()
18
+ set(__Win3rdParty_cmake_INCLUDED__ ON)
19
+ endif()
20
+
21
+
22
+ ##
23
+ ## To be sure to reset an empty cached variable but keep any other kind of variables
24
+ ##
25
+ ## Usage:
26
+ ## check_cached_var(<var> <resetedCachedValue> <cacheType> <cacheDoc> [FORCE])
27
+ ##
28
+ ## <var> is the cached cmake variable you need to reset
29
+ ## <resetedCachedValue> is the new default value of the reseted cached cmake variable
30
+ ## <cacheType> is the kind of GUI cache input can be : FILEPATH; PATH; STRING or BOOL
31
+ ## <cacheDoc> is the associated GUI cache input documentation display in the GUI
32
+ ## FORCE option could be use to reset a cached variable even if it is not empty.
33
+ ##
34
+ macro(check_cached_var var resetedCachedValue cacheType cacheDoc)
35
+ # message(STATUS "inside check_cached_var macro. argn=${ARGN}")
36
+ cmake_parse_arguments(ccv "FORCE" "" "" ${ARGN})
37
+
38
+ if(ccv_FORCE)
39
+ set(FORCE FORCE)
40
+ else()
41
+ set(FORCE )
42
+ endif()
43
+
44
+ if(NOT ${var} OR ccv_FORCE)
45
+ unset(${var} CACHE)
46
+ # message(STATUS "setting new cache value. var ${var} = ${resetedCachedValue}")
47
+ set(${var} "${resetedCachedValue}" CACHE ${cacheType} "${cacheDoc}" ${FORCE})
48
+ endif()
49
+ endmacro()
50
+
51
+
52
+ ##
53
+ ## Win3rdParty function allow to specify a directory which contain all necessary windows dependenties.
54
+ ## By uploading 3rdParty directory (which contain dependencies, *.lib, *.dll... for a specific version of compiler) onto Gforge file tab,
55
+ ## you get back an URL of download you can give to this function with a directory name. So you can provide multiple 3rdParty version of same dependencies (MSVC11, MSVC12...).
56
+ ## By providing a prefix to this function, you allow to use different kind of 3rdParty which can be handled by CMAKE OPTIONS depending on what your framework need for example.
57
+ ##
58
+ ## Usage 1:
59
+ ## Win3rdParty(<prefix> MSVC<XX> <DirName> <URL>
60
+ ## [MSVC<XX> <DirName> <URL>] [...]
61
+ ## [VCID] [DEFAULT_USE] [VERBOSE] )
62
+ ##
63
+ ## * <prefix> allow to identify which 3rdParty you process (prefix name)
64
+ ## * MSVC<XX> flag could be MSVC11 or MSVC12 (any element of the MSVC_VERSIONS_LIST) and refer to a 3rdParty compiler with :
65
+ ## * <DirName> which will be the local pathName of the downloaded 3rdParty : relative to CMAKE_BINARY_DIR
66
+ ## * <URL> which is the link location of the 3rdParty zip
67
+ ## * VCID flag will make available a cache variable ${prefix}_WIN3RDPARTY_VCID
68
+ ## * DEFAULT_USE flag [ON|OFF] may be used to set default value of cmake cached variable : <prefix>_WIN3RDPARTY_USE [default to ON]
69
+ ##
70
+ ## WARNING:
71
+ ## This function define CACHE variables you can use after :
72
+ ## * ${prefix}_WIN3RDPARTY_USE : allow to check/downloaded win3rdParty dir (it will force the cached variables for this dependency folder generally <prefix>_DIR>)
73
+ ## * ${prefix}_WIN3RDPARTY_DIR : where is your local win3rdParty dir (the PATH)
74
+ ## * ${prefix}_WIN3RDPARTY_VCID : [if VCID flag is used] the MSVC id (commonly used to prefix/suffix library name, see boost or CGAL)
75
+ ##
76
+ ## If you want to add a win3rdParty version, please:
77
+ ## 1- build dependencies on your local side with the compiler you want
78
+ ## 2- build your own zip with your built dependencies
79
+ ## 3- upload it (onto the forge where the project is stored) and copy the link location in order to use it for this function
80
+ ## 4- if you just introduced a new MSVC version, add it to the MSVC_VERSIONS_LIST bellow
81
+ ##
82
+ ## In a second pass, you can also use this function to set necessary cmake cached variables in order to let cmake find packages of these 3rdParty.
83
+ ##
84
+ ## Usage 2:
85
+ ## win3rdParty(<prefix> [VERBOSE] MULTI_SET|SET
86
+ ## CHECK_CACHED_VAR <cmakeVar> <cmakeCacheType> [LIST] <cmakeValue> [DOC <stringToolTips>]
87
+ ## [ CHECK_CACHED_VAR <cmakeVar> <cmakeCacheType> [LIST] <cmakeValue> [DOC <stringToolTips>] ] [...]
88
+ ##
89
+ ## * MULTI_SET or SET flags are used to tell cmake that all next arguments will use repeated flags with differents entries (SET mean we will provide only one set of arguments, without repetition)
90
+ ## * CHECK_CACHED_VAR are the repeated flag which contain differents entries
91
+ ## * <cmakeVar> is the cmake variable you want to be cached for the project
92
+ ## * <cmakeCacheType> is the kind of cmake variable (couble be: FILEPATH; PATH; STRING or BOOL) => see check_cached_var.
93
+ ## * LIST optional flag could be used with CHECK_CACHED_VAR when <cmakeCacheType> = STRING. It allow to handle multiple STRINGS value list.
94
+ ## * <cmakeValue> is the value of the variable (if FILEPATH, PATH or STRING: use quotes, if BOOL : use ON/OFF)
95
+ ## * DOC optional flag is used to have a tooltips info about this new cmake variable entry into the GUI (use quotes).
96
+ ##
97
+ ## Full example 1 :
98
+ ## win3rdParty(COMMON MSVC11 "win3rdParty-MSVC11" "https://path.to/an.archive.7z"
99
+ ## SET CHECK_CACHED_VAR SuiteSparse_DIR PATH "SuiteSparse-4.2.1" DOC "default empty doc"
100
+ ## )
101
+ ##
102
+ ## WARNING:
103
+ ## For the 2nd usage (with MULTI_SET), if you planned to set some CACHED_VAR using/composed by ${prefix}_WIN3RDPARTY_* just set in this macro (usage 1),
104
+ ## then (due to the not yet existing var) you will need to call this function 2 times :
105
+ ## One for the 1st usage (downloading of the current compiler 3rdParty).
106
+ ## One for the MLUTI_SET flag which will use existsing ${prefix}_WIN3RDPARTY_* cached var.
107
+ ##
108
+ ## Full example 2 :
109
+ ## win3rdParty(COMMON MSVC11 "win3rdParty-MSVC11" "https://path.to/an.archive.7z")
110
+ ## win3rdParty(COMMON MULTI_SET
111
+ ## CHECK_CACHED_VAR CGAL_INCLUDE_DIR PATH "CGAL-4.3/include" DOC "default empty doc"
112
+ ## CHECK_CACHED_VAR CGAL_LIBRARIES STRING LIST "debug;CGAL-4.3/lib${LIB_POSTFIX}/CGAL-${WIN3RDPARTY_COMMON_VCID}-mt-gd-4.3.lib;optimized;CGAL-4.3/lib${LIB_POSTFIX}/CGAL-${WIN3RDPARTY_COMMON_VCID}-mt-4.3.lib"
113
+ ##
114
+ ##
115
+ ## WARNING: This function use internaly :
116
+ ## * downloadAndExtractZipFile.cmake
117
+ ## * parse_arguments_multi.cmake
118
+ ## * check_cached_var macro
119
+ ##
120
+ function(win3rdParty prefix )
121
+
122
+ # ARGV: list of all arguments given to the macro/function
123
+ # ARGN: list of remaining arguments
124
+
125
+ if(NOT WIN32)
126
+ return()
127
+ endif()
128
+
129
+ ## set the handled version of MSVC
130
+ ## if you plan to add a win3rdParty dir to download with a new MSVC version: build the win3rdParty dir and add the MSCV entry here.
131
+ set(MSVC_VERSIONS_LIST "MSVC17;MSVC11;MSVC12;MSVC14")
132
+
133
+ #include(CMakeParseArguments) # CMakeParseArguments is obsolete since cmake 3.5
134
+ # cmake_parse_arguments (<prefix> <options> <one_value_keywords> <multi_value_keywords> args)
135
+ # <options> : options (flags) pass to the macro
136
+ # <one_value_keywords> : options that neeed a value
137
+ # <multi_value_keywords> : options that neeed more than one value
138
+ cmake_parse_arguments(w3p "VCID" "VERBOSE;TIMEOUT;DEFAULT_USE" "${MSVC_VERSIONS_LIST};MULTI_SET;SET" ${ARGN})
139
+
140
+ # message(STATUS "value of w3p_VCID = ${w3p_VCID}")
141
+ # message(STATUS "value of w3p_VERBOSE = ${w3p_VERBOSE}")
142
+ # message(STATUS "value of w3p_TIMEOUT = ${w3p_TIMEOUT}")
143
+ # message(STATUS "value of w3p_DEFAULT_USE = ${w3p_DEFAULT_USE}")
144
+
145
+ # foreach (loop_var ${MSVC_VERSIONS_LIST})
146
+ # message(STATUS "value of w3p_${loop_var} = ${w3p_${loop_var}}")
147
+ # endforeach(loop_var)
148
+
149
+ # message(STATUS "value of w3p_MULTI_SET = ${w3p_MULTI_SET}")
150
+ # message(STATUS "value of w3p_SET = ${w3p_SET}")
151
+
152
+ # message("values for MSVC = ${w3p_MSVC14}")
153
+
154
+ if(NOT w3p_TIMEOUT)
155
+ set(w3p_TIMEOUT 300)
156
+ endif()
157
+
158
+ if(NOT DEFINED w3p_DEFAULT_USE)
159
+ set(w3p_DEFAULT_USE ON)
160
+ endif()
161
+
162
+
163
+ ## 1st use (check/update|download) :
164
+ set(${prefix}_WIN3RDPARTY_USE ${w3p_DEFAULT_USE} CACHE BOOL "Use required 3rdParty binaries from ${prefix}_WIN3RDPARTY_DIR or download it if not exist")
165
+
166
+
167
+ ## We want to test if each version of MSVC was filled by the function (see associated parameters)
168
+ ## As CMake is running only for one version of MSVC, if that MSVC version was filled, we get back associated parameters,
169
+ ## otherwise we can't use the downloadAndExtractZipFile with win3rdParty.
170
+ set(enableWin3rdParty OFF)
171
+
172
+ foreach(MSVC_VER ${MSVC_VERSIONS_LIST})
173
+ if(${MSVC_VER} AND w3p_${MSVC_VER} OR ${MSVC_TOOLSET_VERSION} EQUAL 143 AND ${MSVC_VER} STREQUAL "MSVC17")
174
+ list(LENGTH w3p_${MSVC_VER} count)
175
+ if("${count}" LESS "2")
176
+ #message(WARNING "You are using ${MSVC_VER} with ${prefix}_WIN3RDPARTY_USE=${${prefix}_WIN3RDPARTY_USE}, but win3rdParty function isn't filled for ${MSVC_VER}!")
177
+ else()
178
+ list(GET w3p_${MSVC_VER} 0 Win3rdPartyName)
179
+ list(GET w3p_${MSVC_VER} 1 Win3rdPartyUrl)
180
+ if(w3p_VCID)
181
+ ## try to get the VcId of MSVC. See also MSVC_VERSION cmake var in the doc.
182
+ string(REGEX REPLACE "MS([A-Za-z_0-9-]+)" "\\1" vcId ${MSVC_VER})
183
+ string(TOLOWER ${vcId} vcId)
184
+ set(${prefix}_WIN3RDPARTY_VCID "${vcId}0" CACHE STRING "the MSVC id (commonly used to prefix/suffix library name, see boost or CGAL)")
185
+ mark_as_advanced(${prefix}_WIN3RDPARTY_VCID)
186
+ endif()
187
+ set(enableWin3rdParty ON)
188
+ set(suffixCompilerID ${MSVC_VER})
189
+ break()
190
+ endif()
191
+ endif()
192
+ endforeach()
193
+ ## If previous step succeed to get MSVC dirname and URL of the current MSVC version, use it to auto download/update the win3rdParty dir
194
+ if(enableWin3rdParty AND ${prefix}_WIN3RDPARTY_USE)
195
+
196
+ if(IS_ABSOLUTE "${Win3rdPartyName}")
197
+ else()
198
+ set(Win3rdPartyName "${CMAKE_BINARY_DIR}/${Win3rdPartyName}")
199
+ endif()
200
+
201
+ if(NOT EXISTS "${Win3rdPartyName}")
202
+ file(MAKE_DIRECTORY ${Win3rdPartyName})
203
+ endif()
204
+
205
+ include(downloadAndExtractZipFile)
206
+ downloadAndExtractZipFile( "${Win3rdPartyUrl}" ## URL link location
207
+ "Win3rdParty-${prefix}-${suffixCompilerID}.7z" ## where download it: relative path, so default to CMAKE_BINARY_DIR
208
+ "${Win3rdPartyName}" ## where extract it : fullPath (default relative to CMAKE_BINARY_DIR)
209
+ CHECK_DIRTY_URL "${Win3rdPartyName}/Win3rdPartyUrl" ## last downloaded url file : fullPath (default relative to CMAKE_BINARY_DIR)
210
+ TIMEOUT ${w3p_TIMEOUT}
211
+ VERBOSE ${w3p_VERBOSE}
212
+ )
213
+ file(GLOB checkDl "${Win3rdPartyName}/*")
214
+ list(LENGTH checkDl checkDlCount)
215
+ if("${checkDlCount}" GREATER "1")
216
+ else()
217
+ message("The downloadAndExtractZipFile didn't work...?")
218
+ set(enableWin3rdParty OFF)
219
+ endif()
220
+ endif()
221
+
222
+ ## Try to auto set ${prefix}_WIN3RDPARTY_DIR or let user set it manually
223
+ set(${prefix}_WIN3RDPARTY_DIR "" CACHE PATH "windows ${Win3rdPartyName} dir to ${prefix} dependencies of the project")
224
+
225
+ if(NOT ${prefix}_WIN3RDPARTY_DIR AND ${prefix}_WIN3RDPARTY_USE)
226
+ if(EXISTS "${Win3rdPartyName}")
227
+ unset(${prefix}_WIN3RDPARTY_DIR CACHE)
228
+ set(${prefix}_WIN3RDPARTY_DIR "${Win3rdPartyName}" CACHE PATH "dir to ${prefix} dependencies of the project")
229
+ endif()
230
+ endif()
231
+
232
+ if(EXISTS ${${prefix}_WIN3RDPARTY_DIR})
233
+ message(STATUS "Found a 3rdParty ${prefix} dir : ${${prefix}_WIN3RDPARTY_DIR}.")
234
+ set(enableWin3rdParty ON)
235
+ elseif(${prefix}_WIN3RDPARTY_USE)
236
+ message(WARNING "${prefix}_WIN3RDPARTY_USE=${${prefix}_WIN3RDPARTY_USE} but ${prefix}_WIN3RDPARTY_DIR=${${prefix}_WIN3RDPARTY_DIR}.")
237
+ set(enableWin3rdParty OFF)
238
+ endif()
239
+
240
+ ## Final check
241
+ if(NOT enableWin3rdParty)
242
+ message("Disable ${prefix}_WIN3RDPARTY_USE (cmake cached var will be not set), due to a win3rdParty problem.")
243
+ message("You still can set ${prefix}_WIN3RDPARTY_DIR to an already downloaded Win3rdParty directory location.")
244
+ set(${prefix}_WIN3RDPARTY_USE OFF CACHE BOOL "Use required 3rdParty binaries from ${prefix}_WIN3RDPARTY_DIR or download it if not exist" FORCE)
245
+ endif()
246
+
247
+ ## 2nd use : handle multi values args to set cached cmake variables in order to ease the next find_package call
248
+ if(${prefix}_WIN3RDPARTY_USE AND ${prefix}_WIN3RDPARTY_DIR)
249
+ if(w3p_VERBOSE)
250
+ message(STATUS "Try to set cmake cached variables for ${prefix} required libraries directly from : ${${prefix}_WIN3RDPARTY_DIR}.")
251
+ endif()
252
+
253
+ include(parse_arguments_multi)
254
+ # message (STATUS "before defining an override of parse_arguments_multi_function")
255
+ function(parse_arguments_multi_function ) ## overloaded function to handle all CHECK_CACHED_VAR values list (see: parse_arguments_multi)
256
+ # message(STATUS "inside overloaded parse_arguments_multi_function defined in Win3rdParty.cmake")
257
+ # message(STATUS ${ARGN})
258
+ ## we know the function take 3 args : var cacheType resetedCachedValue (see check_cached_var)
259
+ cmake_parse_arguments(pamf "" "DOC" "LIST" ${ARGN})
260
+
261
+ ## var and cacheType are mandatory (with the resetedCachedValue)
262
+ set(var ${ARGV0})
263
+ set(cacheType ${ARGV1})
264
+ # message(STATUS "var=${var} and cacheType=${cacheType} list=${pamf_LIST}")
265
+ if(pamf_DOC)
266
+ set(cacheDoc ${pamf_DOC})
267
+ else()
268
+ set(cacheDoc "")
269
+ endif()
270
+ if(pamf_LIST)
271
+ set(value ${pamf_LIST})
272
+ else()
273
+ # message("USING ARGV2 with value ${ARGV2}")
274
+ set(value ${ARGV2})
275
+ endif()
276
+ # message("inside override function in Win3rdparty.cmake value+ ${value}")
277
+ if("${cacheType}" MATCHES "PATH" AND EXISTS "${${prefix}_WIN3RDPARTY_DIR}/${value}")
278
+ # message("math with path")
279
+ set(resetedCachedValue "${${prefix}_WIN3RDPARTY_DIR}/${value}") ## path relative to ${prefix}_WIN3RDPARTY_DIR
280
+ elseif ("${cacheType}" MATCHES "PATH" AND EXISTS "${${prefix}_WIN3RDPARTY_DIR}")
281
+ set(resetedCachedValue "${${prefix}_WIN3RDPARTY_DIR}") ## path relative to ${prefix}_WIN3RDPARTY_DIR
282
+ elseif("${cacheType}" MATCHES "STRING")
283
+ foreach(var IN LISTS value)
284
+ if(EXISTS "${${prefix}_WIN3RDPARTY_DIR}/${var}")
285
+ list(APPEND resetedCachedValue "${${prefix}_WIN3RDPARTY_DIR}/${var}") ## string item of the string list is a path => make relative to ${prefix}_WIN3RDPARTY_DIR
286
+ else()
287
+ list(APPEND resetedCachedValue ${var}) ## string item of the string list is not an existing path => simply use the item
288
+ endif()
289
+ endforeach()
290
+ else()
291
+ set(resetedCachedValue "${value}") ## could be a BOOL or a STRING
292
+ endif()
293
+
294
+ ## call our macro to reset cmake cache variable if empty
295
+ check_cached_var(${var} "${resetedCachedValue}" ${cacheType} "${cacheDoc}" FORCE)
296
+
297
+ endfunction()
298
+ # message (STATUS "after defining an override of parse_arguments_multi_function")
299
+
300
+ if(w3p_MULTI_SET)
301
+ parse_arguments_multi(CHECK_CACHED_VAR w3p_MULTI_SET ${w3p_MULTI_SET}) ## internaly will call our overloaded parse_arguments_multi_function
302
+ elseif(w3p_SET)
303
+ # message("calling set version of parse_arguments_multi with w3p_set = ${w3p_SET}")
304
+ parse_arguments_multi(CHECK_CACHED_VAR w3p_SET ${w3p_SET})
305
+ endif()
306
+
307
+ endif()
308
+
309
+ endfunction()
310
+
311
+ ## cmake variables introspection to globally activate/deactivate ${prefix}_WIN3RDPARTY_USE
312
+ ## This "one shot" call (only one for the next cmake configure) will automatically then reset the global variable WIN3RDPARTY_USE to UserDefined (do nothing).
313
+ ## use (call it) before and after the call of all your win3rdParty functions
314
+ function(Win3rdPartyGlobalCacheAction )
315
+ set(WIN3RDPARTY_USE "UserDefined" CACHE STRING "Choose how to handle all cmake cached *_WIN3RDPARTY_USE for the next configure.\nCould be:\nUserDefined [default]\nActivateAll\nDesactivateAll" )
316
+ set_property(CACHE WIN3RDPARTY_USE PROPERTY STRINGS "UserDefined;ActivateAll;DesactivateAll" )
317
+ if(${WIN3RDPARTY_USE} MATCHES "UserDefined")
318
+ else()
319
+ if(${WIN3RDPARTY_USE} MATCHES "ActivateAll")
320
+ set(win3rdPvalue ON)
321
+ elseif(${WIN3RDPARTY_USE} MATCHES "DesactivateAll")
322
+ set(win3rdPvalue OFF)
323
+ endif()
324
+ get_cmake_property(_variableNames CACHE_VARIABLES)
325
+ foreach (_variableName ${_variableNames})
326
+ string(REGEX MATCH "[A-Za-z_0-9-]+_WIN3RDPARTY_USE" win3rdpartyUseCacheVar ${_variableName})
327
+ if(win3rdpartyUseCacheVar)
328
+ string(REGEX REPLACE "([A-Za-z_0-9-]+_WIN3RDPARTY_USE)" "\\1" win3rdpartyUseCacheVar ${_variableName})
329
+ set(${win3rdpartyUseCacheVar} ${win3rdPvalue} CACHE BOOL "Use required 3rdParty binaries from ${prefix}_WIN3RDPARTY_DIR or download it if not exist" FORCE)
330
+ message(STATUS "${win3rdpartyUseCacheVar} cached variable set to ${win3rdPvalue}.")
331
+ endif()
332
+ endforeach()
333
+ set(WIN3RDPARTY_USE "UserDefined" CACHE STRING "Choose how to handle all cmake cached *_WIN3RDPARTY_USE for the next configure.\nCould be:\nUserDefined [default]\nActivateAll\nDesactivateAll" FORCE)
334
+ message(STATUS "reset WIN3RDPARTY_USE to UserDefined.")
335
+ endif()
336
+ mark_as_advanced(WIN3RDPARTY_USE)
337
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/cmake_policies.cmake ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(__set_policies_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__set_policies_INCLUDED__ ON)
15
+ endif()
16
+
17
+ macro(setPolicies)
18
+ # No more policies to enforce
19
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/dependencies.cmake ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## Included once for all sub project.
12
+ ## It contain the whole cmake instructions to find necessary common dependencies.
13
+ ## 3rdParty (provided by sibr_addlibrary win3rdParty or from external packages) are then available in cmake sub projects.
14
+ ##
15
+ ## Do not include this file more than once but you can modify it to fit to your own project.
16
+ ## So please, read it carefully because you can use on of these dependencies for your project or appen new one.
17
+ ##
18
+ ## As it is included after camke options, you can use conditional if(<CMAKE_PROJ_OPT>)/endif() to encapsulate your 3rdParty.
19
+ ##
20
+
21
+ ## win3rdParty function allowing to auto check/download/update binaries dependencies for current windows compiler
22
+ ## Please open this file in order to get more documentation and usage examples.
23
+ include(Win3rdParty)
24
+
25
+ include(sibr_library)
26
+
27
+ Win3rdPartyGlobalCacheAction()
28
+
29
+ find_package(OpenGL REQUIRED)
30
+
31
+ ############
32
+ ## Find GLEW
33
+ ############
34
+ if (MSVC11 OR MSVC12)
35
+ set(glew_multiset_arguments
36
+ CHECK_CACHED_VAR GLEW_INCLUDE_DIR PATH "glew-1.10.0/include" DOC "default empty doc"
37
+ CHECK_CACHED_VAR GLEW_LIBRARIES STRING LIST "debug;glew-1.10.0/${LIB_BUILT_DIR}/glew32d.lib;optimized;glew-1.10.0/${LIB_BUILT_DIR}/glew32.lib" DOC "default empty doc"
38
+ )
39
+ elseif (MSVC14 OR MSVC17)
40
+ set(glew_multiset_arguments
41
+ CHECK_CACHED_VAR GLEW_INCLUDE_DIR PATH "glew-2.0.0/include" DOC "default empty doc"
42
+ CHECK_CACHED_VAR GLEW_SHARED_LIBRARY_RELEASE PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32.lib"
43
+ CHECK_CACHED_VAR GLEW_STATIC_LIBRARY_RELEASE PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32s.lib"
44
+ CHECK_CACHED_VAR GLEW_SHARED_LIBRARY_DEBUG PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32d.lib"
45
+ CHECK_CACHED_VAR GLEW_STATIC_LIBRARY_DEBUG PATH "glew-2.0.0/${LIB_BUILT_DIR}/glew32sd.lib"
46
+ )
47
+ else ()
48
+ message("There is no provided GLEW library for your version of MSVC")
49
+ endif()
50
+ sibr_addlibrary(NAME GLEW #VERBOSE ON
51
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/glew-1.10.0.7z"
52
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/glew-1.10.0.7z"
53
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/glew-2.0.0.7z" # using recompiled version of glew
54
+ MULTI_SET ${glew_multiset_arguments}
55
+ )
56
+ set(GLEW_VERBOSE ON)
57
+ FIND_PACKAGE(GLEW REQUIRED)
58
+ IF(GLEW_FOUND)
59
+ INCLUDE_DIRECTORIES(${GLEW_INCLUDE_DIR})
60
+ ELSE(GLEW_FOUND)
61
+ MESSAGE("GLEW not found. Set GLEW_DIR to base directory of GLEW.")
62
+ ENDIF(GLEW_FOUND)
63
+
64
+
65
+ ##############
66
+ ## Find ASSIMP
67
+ ##############
68
+ if (MSVC11 OR MSVC12)
69
+ set(assimp_set_arguments
70
+ CHECK_CACHED_VAR ASSIMP_DIR PATH "Assimp_3.1_fix"
71
+ )
72
+ elseif (MSVC14 OR MSVC17)
73
+ set(assimp_set_arguments
74
+ CHECK_CACHED_VAR ASSIMP_DIR PATH "Assimp-4.1.0"
75
+ )
76
+ else ()
77
+ message("There is no provided ASSIMP library for your version of MSVC")
78
+ endif()
79
+
80
+ sibr_addlibrary(NAME ASSIMP #VERBOSE ON
81
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/Assimp_3.1_fix.7z"
82
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/Assimp_3.1_fix.7z"
83
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/Assimp-4.1.0.7z"
84
+ MULTI_SET
85
+ ${assimp_set_arguments}
86
+ )
87
+
88
+ find_package(ASSIMP REQUIRED)
89
+ include_directories(${ASSIMP_INCLUDE_DIR})
90
+
91
+ ################
92
+ ## Find FFMPEG
93
+ ################
94
+ sibr_addlibrary(NAME FFMPEG
95
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/ffmpeg.zip"
96
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/ffmpeg.zip"
97
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/ffmpeg-4.0.2-win64-win3rdParty.7z"
98
+ SET CHECK_CACHED_VAR FFMPEG_DIR PATH ${FFMPEG_WIN3RDPARTY_DIR}
99
+ )
100
+ find_package(FFMPEG QUIET)
101
+ include_directories(${FFMPEG_INCLUDE_DIR})
102
+
103
+ ###################
104
+ ## Find embree3
105
+ ###################
106
+ sibr_addlibrary(
107
+ NAME embree3
108
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/embree2.7.0.x64.windows.7z"
109
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/embree-3.6.1.x64.vc14.windows.7z" # TODO SV: provide a valid version if required
110
+ )
111
+
112
+ ###################
113
+ ## Find eigen3
114
+ ###################
115
+ sibr_addlibrary(
116
+ NAME eigen3
117
+ #MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/eigen-eigen-dc6cfdf9bcec.7z"
118
+ #MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/eigen-eigen-dc6cfdf9bcec.7z" # TODO SV: provide a valid version if required
119
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/eigen3.7z"
120
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/eigen3.7z"
121
+ SET CHECK_CACHED_VAR eigen3_DIR PATH "eigen/share/eigen3/cmake"
122
+ )
123
+ include_directories(/usr/include/eigen3)
124
+ add_definitions(-DEIGEN_INITIALIZE_MATRICES_BY_ZERO)
125
+
126
+ #############
127
+ ## Find Boost
128
+ #############
129
+ set(Boost_REQUIRED_COMPONENTS "system;chrono;filesystem;date_time" CACHE INTERNAL "Boost Required Components")
130
+
131
+ if (WIN32)
132
+ # boost multiset arguments
133
+ if (MSVC11 OR MSVC12)
134
+ set(boost_multiset_arguments
135
+ CHECK_CACHED_VAR BOOST_ROOT PATH "boost_1_55_0"
136
+ CHECK_CACHED_VAR BOOST_INCLUDEDIR PATH "boost_1_55_0"
137
+ CHECK_CACHED_VAR BOOST_LIBRARYDIR PATH "boost_1_55_0/${LIB_BUILT_DIR}"
138
+ #CHECK_CACHED_VAR Boost_COMPILER STRING "-${Boost_WIN3RDPARTY_VCID}" DOC "vcid (eg: -vc110 for MSVC11)"
139
+ CHECK_CACHED_VAR Boost_COMPILER STRING "-vc110" DOC "vcid (eg: -vc110 for MSVC11)" # NOTE: if it doesnt work, uncomment this option and set the right value for VisualC id
140
+ )
141
+ elseif (MSVC14 OR MSVC17)
142
+ set(boost_multiset_arguments
143
+ CHECK_CACHED_VAR BOOST_ROOT PATH "boost-1.71"
144
+ CHECK_CACHED_VAR BOOST_INCLUDEDIR PATH "boost-1.71"
145
+ CHECK_CACHED_VAR BOOST_LIBRARYDIR PATH "boost-1.71/${LIB_BUILT_DIR}"
146
+ CHECK_CACHED_VAR Boost_COMPILER STRING "-vc141" DOC "vcid (eg: -vc110 for MSVC11)" # NOTE: if it doesnt work, uncomment this option and set the right value for VisualC id
147
+ )
148
+
149
+ option(BOOST_MINIMAL_VERSION "Only get minimal Boost dependencies" ON)
150
+
151
+ if(${BOOST_MINIMAL_VERSION})
152
+ set(BOOST_MSVC14_ZIP "boost-1.71-ibr-minimal.7z")
153
+ else()
154
+ set(BOOST_MSVC14_ZIP "boost-1.71.7z")
155
+ endif()
156
+ else ()
157
+ message("There is no provided Boost library for your version of MSVC")
158
+ endif()
159
+
160
+ sibr_addlibrary(NAME Boost VCID TIMEOUT 600 #VERBOSE ON
161
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/boost_1_55_0.7z"
162
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC11-splitted%20version/boost_1_55_0.7z"
163
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/${BOOST_MSVC14_ZIP}" # boost compatible with msvc14
164
+ MULTI_SET ${boost_multiset_arguments}
165
+ CHECK_CACHED_VAR Boost_NO_SYSTEM_PATHS BOOL ON DOC "Set to ON to disable searching in locations not specified by these boost cached hint variables"
166
+ CHECK_CACHED_VAR Boost_NO_BOOST_CMAKE BOOL ON DOC "Set to ON to disable the search for boost-cmake (package cmake config file if boost was built with cmake)"
167
+ )
168
+ if(NOT Boost_COMPILER AND Boost_WIN3RDPARTY_USE)
169
+ message(WARNING "Boost_COMPILER is not set and it's needed.")
170
+ endif()
171
+ endif()
172
+
173
+ find_package(Boost 1.71.0 REQUIRED COMPONENTS ${Boost_REQUIRED_COMPONENTS})
174
+
175
+ if(WIN32)
176
+ add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/EHsc>")
177
+ #add_definitions(/EHsc)
178
+ endif()
179
+
180
+ if(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
181
+ add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
182
+ endif()
183
+
184
+ #if(WIN32)
185
+ add_definitions(-DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB)
186
+ #endif()
187
+
188
+ include_directories(${BOOST_INCLUDEDIR} ${Boost_INCLUDE_DIRS})
189
+ link_directories(${BOOST_LIBRARYDIR} ${Boost_LIBRARY_DIRS})
190
+
191
+
192
+ ##############
193
+ ## Find OpenMP
194
+ ##############
195
+ find_package(OpenMP)
196
+
197
+ sibr_addlibrary(
198
+ NAME NativeFileDialog
199
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/nfd.7z"
200
+ )
201
+
202
+ ##############
203
+ ## Find OpenCV
204
+ ##############
205
+ if (WIN32)
206
+ if (${MSVC_TOOLSET_VERSION} EQUAL 143)
207
+ MESSAGE("SPECIAL OPENCV HANDLING")
208
+ set(opencv_set_arguments
209
+ CHECK_CACHED_VAR OpenCV_DIR PATH "install" ## see OpenCVConfig.cmake
210
+ )
211
+ elseif (MSVC11 OR MSVC12)
212
+ set(opencv_set_arguments
213
+ CHECK_CACHED_VAR OpenCV_DIR PATH "opencv/build" ## see OpenCVConfig.cmake
214
+ )
215
+ elseif (MSVC14)
216
+ set(opencv_set_arguments
217
+ CHECK_CACHED_VAR OpenCV_DIR PATH "opencv-4.5.0/build" ## see OpenCVConfig.cmake
218
+ )
219
+ else ()
220
+ message("There is no provided OpenCV library for your compiler, relying on find_package to find it")
221
+ endif()
222
+ else()
223
+ message("There is no provided OpenCV library for your compiler, relying on find_package to find it")
224
+ endif()
225
+
226
+ sibr_addlibrary(NAME OpenCV #VERBOSE ON
227
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv.7z"
228
+ MSVC12 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv.7z"
229
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv-4.5.0.7z" # opencv compatible with msvc14 and with contribs
230
+ MSVC17 "https://repo-sam.inria.fr/fungraph/dependencies/sibr/~0.9/opencv4-8.7z"
231
+ SET ${opencv_set_arguments}
232
+ )
233
+ find_package(OpenCV REQUIRED) ## Use directly the OpenCVConfig.cmake provided
234
+
235
+ ##https://stackoverflow.com/questions/24262081/cmake-relwithdebinfo-links-to-debug-libs
236
+ set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
237
+
238
+ add_definitions(-DOPENCV_TRAITS_ENABLE_DEPRECATED)
239
+
240
+ if(OpenCV_INCLUDE_DIRS)
241
+ foreach(inc ${OpenCV_INCLUDE_DIRS})
242
+ if(NOT EXISTS ${inc})
243
+ set(OpenCV_INCLUDE_DIR "" CACHE PATH "additional custom include DIR (in case of trouble to find it (fedora 17 opencv package))")
244
+ endif()
245
+ endforeach()
246
+ if(OpenCV_INCLUDE_DIR)
247
+ list(APPEND OpenCV_INCLUDE_DIRS ${OpenCV_INCLUDE_DIR})
248
+ include_directories(${OpenCV_INCLUDE_DIRS})
249
+ endif()
250
+ endif()
251
+
252
+ ###################
253
+ ## Find GLFW
254
+ ###################
255
+ sibr_addlibrary(
256
+ NAME GLFW
257
+ MSVC11 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/glfw-3.2.1.7z"
258
+ MSVC14 "https://repo-sam.inria.fr/fungraph/dependencies/ibr-common/win3rdParty-MSVC15-splitted%20version/glfw-3.2.1.7z" # TODO SV: provide a valid version if required
259
+ )
260
+
261
+ sibr_gitlibrary(TARGET imgui
262
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/imgui.git"
263
+ GIT_TAG "e7f0fa31b9fa3ee4ecd2620b9951f131b4e377c6"
264
+ )
265
+
266
+ sibr_gitlibrary(TARGET mrf
267
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/mrf.git"
268
+ GIT_TAG "564e5e0b395c788d2f8b2cf4f879fed2493faea7"
269
+ )
270
+
271
+ sibr_gitlibrary(TARGET nanoflann
272
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/nanoflann.git"
273
+ GIT_TAG "7a20a9ac0a1d34850fc3a9e398fc4a7618e8a69a"
274
+ )
275
+
276
+ sibr_gitlibrary(TARGET picojson
277
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/picojson.git"
278
+ GIT_TAG "7cf8feee93c8383dddbcb6b64cf40b04e007c49f"
279
+ )
280
+
281
+ sibr_gitlibrary(TARGET rapidxml
282
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/rapidxml.git"
283
+ GIT_TAG "069e87f5ec5ce1745253bd64d89644d6b894e516"
284
+ )
285
+
286
+ sibr_gitlibrary(TARGET xatlas
287
+ GIT_REPOSITORY "https://gitlab.inria.fr/sibr/libs/xatlas.git"
288
+ GIT_TAG "0fbe06a5368da13fcdc3ee48d4bdb2919ed2a249"
289
+ INCLUDE_DIRS "source/xatlas"
290
+ )
291
+
292
+ Win3rdPartyGlobalCacheAction()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/downloadAndExtractZipFile.cmake ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## downloadAndExtractZipFile cmake function
12
+ ## Provide a way to download zip file from public internet ZIP_URL host
13
+ ## and to extract it in a specific EXCTRATED_ZIP_PATH destination.
14
+ ## This function use 7-Zip external tool to maximize the compatibles formats.
15
+ ## This will be not download again if the EXCTRATED_ZIP_PATH already exist and DL_FORCE is set to OFF.
16
+ ## This will try to unzip file if already exist in the ZIP_DL_PATH.
17
+ ##
18
+ ## If EXCTRATED_ZIP_PATH and/or ZIP_DL_PATH are not full path,
19
+ ## it will be interpreted relative to CMAKE_BINARY_DIR
20
+ ##
21
+ ## Usage example :
22
+ ## include(downloadAndExtractZipFile)
23
+ ## downloadAndExtractZipFile(
24
+ ## http://www.cs.cornell.edu/~snavely/bundler/distr/bundler-v0.4-source.zip
25
+ ## ${CMAKE_BINARY_DIR}/Bundler/bundler-v0.4-source.zip
26
+ ## ${CMAKE_BINARY_DIR}/Bundler
27
+ ## [DL_FORCE ON|OFF]
28
+ ## [TIMEOUT]
29
+ ## [CHECK_DIRTY_URL]
30
+ ## )
31
+ ##
32
+ ## option DL_FORCE will redownload the zip file [deafult to OFF]
33
+ ## option TIMEOUT will end the unzip process after this period of time [default to 600s]
34
+ ## option CHECK_DIRTY_URL will write into the given file the downloaded URL and then,
35
+ ## next time, if the URL was updated, it detect it with this file
36
+ ## and will download the last version. This prevent to alway set manually DL_FORCE to ON...
37
+ ##
38
+ if(__downloadAndExtractZipFile_cmake_INCLUDED__)
39
+ return()
40
+ else()
41
+ set(__downloadAndExtractZipFile_cmake_INCLUDED__ ON)
42
+ endif()
43
+
44
+ function(downloadAndExtractZipFile ZIP_URL ZIP_DL_PATH EXCTRATED_ZIP_PATH)
45
+
46
+ # message(STATUS "zipUrl=${ZIP_URL} zipDlPath=${ZIP_DL_PATH} extractedZipPath=${EXCTRATED_ZIP_PATH}")
47
+ cmake_parse_arguments(dwnlezf "" "VERBOSE;DL_FORCE;TIMEOUT;CHECK_DIRTY_URL" "" ${ARGN})
48
+
49
+ set(PROGRAMFILESx86 "PROGRAMFILES(x86)")
50
+
51
+ ## Check entries mandatory args
52
+ if(IS_ABSOLUTE "${ZIP_DL_PATH}")
53
+ else()
54
+ set(ZIP_DL_PATH "${CMAKE_BINARY_DIR}/${ZIP_DL_PATH}")
55
+ endif()
56
+ if(IS_ABSOLUTE "${EXCTRATED_ZIP_PATH}")
57
+ else()
58
+ set(EXCTRATED_ZIP_PATH "${CMAKE_BINARY_DIR}/${EXCTRATED_ZIP_PATH}")
59
+ endif()
60
+ if(NOT EXISTS "${EXCTRATED_ZIP_PATH}")
61
+ file(MAKE_DIRECTORY ${EXCTRATED_ZIP_PATH})
62
+ endif()
63
+
64
+ # SB: Once, one of downloaded zip was corrupted by an error message coming from the server.
65
+ if(EXISTS "${ZIP_DL_PATH}")
66
+ # So I check for removing such corrupted files
67
+ message("Removing previous ${ZIP_DL_PATH} (might be corrupted)")
68
+ file(REMOVE "${ZIP_DL_PATH}")
69
+ if(EXISTS "${dwnlezf_CHECK_DIRTY_URL}")
70
+ # and remove the previous (corrupted) made 'Win3rdPartyUrl' file
71
+ file(REMOVE "${dwnlezf_CHECK_DIRTY_URL}")
72
+ endif()
73
+ endif()
74
+
75
+ ## Check entries optional args
76
+ macro(readDirtyUrl )
77
+ if(dwnlezf_CHECK_DIRTY_URL)
78
+ if(IS_ABSOLUTE "${dwnlezf_CHECK_DIRTY_URL}")
79
+ else()
80
+ set(dwnlezf_CHECK_DIRTY_URL "${CMAKE_BINARY_DIR}/${dwnlezf_CHECK_DIRTY_URL}")
81
+ endif()
82
+ get_filename_component(unzipDir ${EXCTRATED_ZIP_PATH} NAME)
83
+ get_filename_component(unzipPath ${EXCTRATED_ZIP_PATH} PATH)
84
+ message(STATUS "Checking ${unzipDir} [from ${unzipPath}]...")
85
+ if(EXISTS "${dwnlezf_CHECK_DIRTY_URL}")
86
+ get_filename_component(CHECK_DIRTY_URL_FILENAME ${dwnlezf_CHECK_DIRTY_URL} NAME)
87
+ file(STRINGS "${dwnlezf_CHECK_DIRTY_URL}" contents)
88
+ list(GET contents 0 downloadURL)
89
+ list(REMOVE_AT contents 0)
90
+ if("${downloadURL}" MATCHES "${ZIP_URL}")
91
+ if(dwnlezf_VERBOSE)
92
+ message(STATUS "Your downloaded version (URL) seems to be up to date. Let me check if nothing is missing... (see ${dwnlezf_CHECK_DIRTY_URL}).")
93
+ endif()
94
+ file(GLOB PATHNAME_PATTERN_LIST "${EXCTRATED_ZIP_PATH}/*") ## is there something inside the downloaded destination ?
95
+ unset(NAME_PATTERN_LIST)
96
+ foreach(realPathPattern ${PATHNAME_PATTERN_LIST})
97
+ get_filename_component(itemName ${realPathPattern} NAME)
98
+ list(APPEND NAME_PATTERN_LIST ${itemName})
99
+ endforeach()
100
+ if(NAME_PATTERN_LIST)
101
+ foreach(item ${contents})
102
+ list(FIND NAME_PATTERN_LIST ${item} id)
103
+ if(${id} MATCHES "-1")
104
+ message(STATUS "${item} is missing, your downloaded version content changed, need to redownload it.")
105
+ set(ZIP_DL_FORCE ON)
106
+ break()
107
+ else()
108
+ list(REMOVE_AT NAME_PATTERN_LIST ${id})
109
+ set(ZIP_DL_FORCE OFF)
110
+ endif()
111
+ endforeach()
112
+ if(NOT ZIP_DL_FORCE AND NAME_PATTERN_LIST)
113
+ message("Yours seems to be up to date (regarding to ${CHECK_DIRTY_URL_FILENAME})!\nBut there are additional files/folders into your downloaded destination (feel free to clean it if you want).")
114
+ foreach(item ${NAME_PATTERN_LIST})
115
+ if(item)
116
+ message("${item}")
117
+ endif()
118
+ endforeach()
119
+ endif()
120
+ endif()
121
+ else()
122
+ set(ZIP_DL_FORCE ON)
123
+ message(STATUS "Your downloaded version is dirty (too old).")
124
+ endif()
125
+ else()
126
+ file(GLOB PATHNAME_PATTERN_LIST "${EXCTRATED_ZIP_PATH}/*") ## is there something inside the downloaded destination ?
127
+ if(NOT PATHNAME_PATTERN_LIST)
128
+ message("We found nothing into ${EXCTRATED_ZIP_PATH}, we will try to download it for you now.")
129
+ endif()
130
+ set(ZIP_DL_FORCE ON)
131
+ endif()
132
+ endif()
133
+ endmacro()
134
+ readDirtyUrl()
135
+ if(NOT ZIP_DL_FORCE)
136
+ return() ## do not need to further (as we are up to date, just exit the function
137
+ endif()
138
+
139
+ macro(writeDirtyUrl )
140
+ if(dwnlezf_CHECK_DIRTY_URL)
141
+ file(WRITE "${dwnlezf_CHECK_DIRTY_URL}" "${ZIP_URL}\n")
142
+ file(GLOB PATHNAME_PATTERN_LIST "${EXCTRATED_ZIP_PATH}/*") ## is there something inside the downloaded destination ?
143
+ unset(NAME_PATTERN_LIST)
144
+ foreach(realPathPattern ${PATHNAME_PATTERN_LIST})
145
+ get_filename_component(itemName ${realPathPattern} NAME)
146
+ list(APPEND NAME_PATTERN_LIST ${itemName})
147
+ endforeach()
148
+ if(NAME_PATTERN_LIST)
149
+ foreach(item ${NAME_PATTERN_LIST})
150
+ file(APPEND "${dwnlezf_CHECK_DIRTY_URL}" "${item}\n")
151
+ endforeach()
152
+ endif()
153
+ endif()
154
+ endmacro()
155
+
156
+ if(dwnlezf_DL_FORCE)
157
+ set(ZIP_DL_FORCE ON)
158
+ endif()
159
+
160
+ if(NOT dwnlezf_TIMEOUT)
161
+ set(dwnlezf_TIMEOUT 600)
162
+ endif()
163
+ math(EXPR dwnlezf_TIMEOUT_MIN "${dwnlezf_TIMEOUT}/60")
164
+
165
+ macro(unzip whichZipFile)
166
+ if(NOT SEVEN_ZIP_CMD)
167
+ find_program(SEVEN_ZIP_CMD NAMES 7z 7za p7zip DOC "7-zip executable" PATHS "$ENV{PROGRAMFILES}/7-Zip" "$ENV{${PROGRAMFILESx86}}/7-Zip" "$ENV{ProgramW6432}/7-Zip")
168
+ endif()
169
+ if(SEVEN_ZIP_CMD)
170
+ if(dwnlezf_VERBOSE)
171
+ message(STATUS "UNZIP: please, WAIT UNTIL ${SEVEN_ZIP_CMD} finished...\n(no more than ${dwnlezf_TIMEOUT_MIN} min)")
172
+ else()
173
+ message(STATUS "UNZIP...wait...")
174
+ endif()
175
+ execute_process( COMMAND ${SEVEN_ZIP_CMD} x ${whichZipFile} -y
176
+ WORKING_DIRECTORY ${EXCTRATED_ZIP_PATH} TIMEOUT ${dwnlezf_TIMEOUT}
177
+ RESULT_VARIABLE resVar OUTPUT_VARIABLE outVar ERROR_VARIABLE errVar
178
+ )
179
+ if(${resVar} MATCHES "0")
180
+ if(dwnlezf_VERBOSE)
181
+ message(STATUS "SUCESS to unzip in ${EXCTRATED_ZIP_PATH}. Now we can remove the downloaded zip file.")
182
+ endif()
183
+ execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${whichZipFile})
184
+ mark_as_advanced(SEVEN_ZIP_CMD)
185
+ else()
186
+ message(WARNING "something wrong in ${EXCTRATED_ZIP_PATH}\n with \"${SEVEN_ZIP_CMD} x ${whichZipFile} -y\", redo or try to unzip by yourself...")
187
+ message("unzip: resVar=${resVar}")
188
+ message("unzip: outVar=${outVar}")
189
+ message("unzip: errVar=${errVar}")
190
+ message("unzip: failed or canceled or timeout")
191
+ endif()
192
+ else()
193
+ message(WARNING "You need 7zip (http://www.7-zip.org/download.html) to unzip the downloaded dir.")
194
+ set(SEVEN_ZIP_CMD "" CACHE FILEPATH "7-zip executable")
195
+ mark_as_advanced(CLEAR SEVEN_ZIP_CMD)
196
+ endif()
197
+ endmacro()
198
+
199
+ if(dwnlezf_VERBOSE)
200
+ message(STATUS "Trying to look ${ZIP_DL_PATH} if a zip file exist...")
201
+ endif()
202
+ if(EXISTS "${ZIP_DL_PATH}")
203
+
204
+ ## already downloaded, so just unzip it
205
+ unzip(${ZIP_DL_PATH})
206
+ writeDirtyUrl()
207
+
208
+ elseif(ZIP_DL_FORCE)
209
+
210
+ ## the download part (+ unzip)
211
+ message(STATUS "Let me try to download package for you : ${ZIP_URL}")
212
+ if(dwnlezf_VERBOSE)
213
+ message(STATUS "Downloading...\n SRC=${ZIP_URL}\n DEST=${ZIP_DL_PATH}.tmp\n INACTIVITY_TIMEOUT=180s")
214
+ endif()
215
+ file(DOWNLOAD ${ZIP_URL} ${ZIP_DL_PATH}.tmp INACTIVITY_TIMEOUT 360 STATUS status SHOW_PROGRESS)
216
+
217
+ list(GET status 0 numResult)
218
+ if(${numResult} MATCHES "0")
219
+
220
+ if(dwnlezf_VERBOSE)
221
+ message(STATUS "Download succeed, so let me rename the tmp file to unzip it")
222
+ endif()
223
+ execute_process(COMMAND ${CMAKE_COMMAND} -E rename ${ZIP_DL_PATH}.tmp ${ZIP_DL_PATH})
224
+ unzip(${ZIP_DL_PATH})
225
+ writeDirtyUrl()
226
+
227
+ else()
228
+
229
+ list(GET status 1 errMsg)
230
+ message(WARNING "DOWNLOAD ${ZIP_URL} to ${ZIP_DL_PATH} failed\n:${errMsg}")
231
+ message(WARNING "OK, you need to download the ${ZIP_URL} manually and put it into ${ZIP_DL_PATH}")
232
+ message("Take a look at the project website page to check available URL.")
233
+
234
+ endif()
235
+
236
+ endif()
237
+
238
+ ## clean up the tmp downloaded file
239
+ if(EXISTS "${ZIP_DL_PATH}.tmp")
240
+ execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${ZIP_DL_PATH}.tmp)
241
+ endif()
242
+
243
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/git_describe.cmake ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(__git_describe_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__git_describe_INCLUDED__ ON)
15
+ endif()
16
+
17
+ find_package(Git)
18
+ if(Git_FOUND)
19
+ message(STATUS "Git found: ${GIT_EXECUTABLE}")
20
+ else()
21
+ message(FATAL_ERROR "Git not found. Aborting")
22
+ endif()
23
+
24
+ macro(git_describe)
25
+ cmake_parse_arguments(GIT_DESCRIBE "" "GIT_URL;GIT_BRANCH;GIT_COMMIT_HASH;GIT_TAG;GIT_VERSION;PATH" "" ${ARGN})
26
+
27
+ if(NOT GIT_DESCRIBE_PATH)
28
+ set(GIT_DESCRIBE_PATH ${CMAKE_SOURCE_DIR})
29
+ endif()
30
+
31
+ if(GIT_DESCRIBE_GIT_URL)
32
+ # Get the current remote
33
+ execute_process(
34
+ COMMAND git remote
35
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
36
+ OUTPUT_VARIABLE GIT_DESCRIBE_GIT_REMOTE
37
+ OUTPUT_STRIP_TRAILING_WHITESPACE
38
+ ERROR_QUIET
39
+ )
40
+
41
+ # Get the current remote
42
+ execute_process(
43
+ COMMAND git remote get-url ${GIT_DESCRIBE_GIT_REMOTE}
44
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
45
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_URL}
46
+ OUTPUT_STRIP_TRAILING_WHITESPACE
47
+ ERROR_QUIET
48
+ )
49
+ endif()
50
+
51
+ if(GIT_DESCRIBE_GIT_BRANCH)
52
+ # Get the current working branch
53
+ execute_process(
54
+ COMMAND git rev-parse --abbrev-ref HEAD
55
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
56
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_BRANCH}
57
+ OUTPUT_STRIP_TRAILING_WHITESPACE
58
+ ERROR_QUIET
59
+ )
60
+ endif()
61
+
62
+ if(GIT_DESCRIBE_GIT_COMMIT_HASH)
63
+ # Get the latest abbreviated commit hash of the working branch
64
+ execute_process(
65
+ COMMAND git rev-parse HEAD
66
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
67
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_COMMIT_HASH}
68
+ OUTPUT_STRIP_TRAILING_WHITESPACE
69
+ ERROR_QUIET
70
+ )
71
+ endif()
72
+
73
+ if(GIT_DESCRIBE_GIT_TAG)
74
+ # Get the tag
75
+ execute_process(
76
+ COMMAND git describe --tags --exact-match
77
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
78
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_TAG}
79
+ OUTPUT_STRIP_TRAILING_WHITESPACE
80
+ ERROR_QUIET
81
+ )
82
+ endif()
83
+
84
+ if(GIT_DESCRIBE_GIT_VERSION)
85
+ # Get the version from git describe
86
+ execute_process(
87
+ COMMAND git describe
88
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
89
+ OUTPUT_VARIABLE ${GIT_DESCRIBE_GIT_VERSION}
90
+ OUTPUT_STRIP_TRAILING_WHITESPACE
91
+ ERROR_QUIET
92
+ )
93
+
94
+ if(${GIT_DESCRIBE_GIT_VERSION} STREQUAL "")
95
+ execute_process(
96
+ COMMAND git rev-parse --abbrev-ref HEAD
97
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
98
+ OUTPUT_VARIABLE GIT_DESCRIBE_GIT_VERSION_BRANCH
99
+ OUTPUT_STRIP_TRAILING_WHITESPACE
100
+ ERROR_QUIET
101
+ )
102
+ execute_process(
103
+ COMMAND git log -1 --format=%h
104
+ WORKING_DIRECTORY ${GIT_DESCRIBE_PATH}
105
+ OUTPUT_VARIABLE GIT_DESCRIBE_GIT_VERSION_COMMIT
106
+ OUTPUT_STRIP_TRAILING_WHITESPACE
107
+ ERROR_QUIET
108
+ )
109
+
110
+ set(${GIT_DESCRIBE_GIT_VERSION} "${GIT_DESCRIBE_GIT_VERSION_BRANCH}-${GIT_DESCRIBE_GIT_VERSION_COMMIT}")
111
+ endif()
112
+ endif()
113
+
114
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/include_once.cmake ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ macro(include_once file)
12
+ get_filename_component(INCLUDE_ONCE_FILEPATH ${file} REALPATH)
13
+ string(REGEX REPLACE "(\\.|\\/+|\\:|\\\\+)" "_" INCLUDE_ONCE_FILEPATH ${INCLUDE_ONCE_FILEPATH})
14
+ get_property(INCLUDED_${INCLUDE_ONCE_FILEPATH}_LOCAL GLOBAL PROPERTY INCLUDED_${INCLUDE_ONCE_FILEPATH})
15
+ if (INCLUDED_${INCLUDE_ONCE_FILEPATH}_LOCAL)
16
+ return()
17
+ else()
18
+ set_property(GLOBAL PROPERTY INCLUDED_${INCLUDE_ONCE_FILEPATH} true)
19
+
20
+ include(${file})
21
+ endif()
22
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/install_runtime.cmake ADDED
@@ -0,0 +1,880 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ ## This file is mainly used to allow runtime installation
12
+ ## There are some utilities cmake functions to ease the generic deployement (abstract common usage of cmake)...
13
+ ##
14
+ ## You cannot run your programm automaticaly from your CNAKE_BINARY_DIR when you build
15
+ ## as it will miss all dependencies and ressources files...
16
+ ## You have to run install target in order to test your programm.
17
+ ##
18
+ ## The only one function/macros you may use inside your sub-CMakeLists.txt (sub-project) is :
19
+ ## ******************
20
+ ## ibr_install_target macro => see documentation at the end of this file
21
+ ## ******************
22
+ ## It use these utilities cmake functions to abstract the installation in an uniform way for all sub-projects.
23
+ ##
24
+ if(__install_runtime_cmake_INCLUDED__)
25
+ return()
26
+ else()
27
+ set(__install_runtime_cmake_INCLUDED__ ON)
28
+ endif()
29
+
30
+
31
+ ##
32
+ ## Allow to write a resource config file which contain additional ressource paths
33
+ ## (used by IBR_Common Resource system to load shaders and potentialy images, plugins and so on)
34
+ ##
35
+ ## ADD option list all the paths to add in the file (relative paths are interpreted relative to working dir of the executable)
36
+ ## INSTALL option to specify where we want to install this file
37
+ ##
38
+ ## Example usage:
39
+ ## resourceFile(ADD "shaders" "${PROJECT_NAME}_rsc" INSTALL bin)
40
+ ##
41
+ macro(resourceFile)
42
+ cmake_parse_arguments(rsc "" "INSTALL;FILE_PATH;CONFIG_TYPE" "ADD" ${ARGN}) ## both args are directory path
43
+
44
+ if(rsc_ADD)
45
+ unset(IBR_RSC_FILE_CONTENT_LIST)
46
+ if(EXISTS "${rsc_FILE_PATH}")
47
+ file(READ "${rsc_FILE_PATH}" IBR_RSC_FILE_CONTENT)
48
+ string(REGEX REPLACE "\n" ";" IBR_RSC_FILE_CONTENT_LIST "${IBR_RSC_FILE_CONTENT}")
49
+ endif()
50
+ list(APPEND IBR_RSC_FILE_CONTENT_LIST "${rsc_ADD}")
51
+ list(REMOVE_DUPLICATES IBR_RSC_FILE_CONTENT_LIST)
52
+ file(WRITE "${rsc_FILE_PATH}" "")
53
+ foreach(rscDir ${IBR_RSC_FILE_CONTENT_LIST})
54
+ file(APPEND "${rsc_FILE_PATH}" "${rscDir}\n")
55
+ endforeach()
56
+ unset(rsc_ADD)
57
+ endif()
58
+
59
+ if(rsc_INSTALL)
60
+ install(FILES ${rsc_FILE_PATH} CONFIGURATIONS ${rsc_CONFIG_TYPE} DESTINATION ${rsc_INSTALL})
61
+ unset(rsc_INSTALL)
62
+ endif()
63
+ endmacro()
64
+
65
+
66
+ ##
67
+ ## Install *.pdb generated file for the current cmake project
68
+ ## assuming the output target name is the cmake project name.
69
+ ## This macro is useful for crossplateform multi config mode.
70
+ ##
71
+ ## Usage Example:
72
+ ##
73
+ ## if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
74
+ ## installPDB(${PROJECT_NAME} ${CMAKE_BUILD_TYPE} RUNTIME_DEST bin ARCHIVE_DEST lib LIBRARY_DEST lib)
75
+ ## endif()
76
+ ## foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
77
+ ## installPDB(${PROJECT_NAME} ${CONFIG_TYPES} RUNTIME_DEST bin ARCHIVE_DEST lib LIBRARY_DEST lib)
78
+ ## endforeach()
79
+ ##
80
+ macro(installPDB targetName configType)
81
+ cmake_parse_arguments(instpdb "" "COMPONENT" "ARCHIVE_DEST;LIBRARY_DEST;RUNTIME_DEST" ${ARGN}) ## both args are directory path
82
+
83
+ if(NOT MSVC)
84
+ return()
85
+ endif()
86
+
87
+ ## Check if DESTINATION are provided according to the TYPE of the given target (see install command doc to see correspodances)
88
+ get_target_property(type ${targetName} TYPE)
89
+ if(${type} MATCHES "EXECUTABLE" AND instpdb_RUNTIME_DEST)
90
+ set(pdb_DESTINATION ${instpdb_RUNTIME_DEST})
91
+ elseif(${type} MATCHES "STATIC_LIBRARY" AND instpdb_ARCHIVE_DEST)
92
+ set(pdb_DESTINATION ${instpdb_ARCHIVE_DEST})
93
+ elseif(${type} MATCHES "MODULE_LIBRARY" AND instpdb_LIBRARY_DEST)
94
+ set(pdb_DESTINATION ${instpdb_LIBRARY_DEST})
95
+ elseif(${type} MATCHES "SHARED_LIBRARY")
96
+ if(WIN32 AND instpdb_RUNTIME_DEST)
97
+ set(pdb_DESTINATION ${instpdb_RUNTIME_DEST})
98
+ else()
99
+ set(pdb_DESTINATION ${instpdb_LIBRARY_DEST})
100
+ endif()
101
+ endif()
102
+
103
+ if(NOT pdb_DESTINATION)
104
+ set(pdb_DESTINATION bin) ## default destination of the pdb file
105
+ endif()
106
+
107
+ if(NOT instpdb_COMPONENT)
108
+ set(instpdb_COMPONENT )
109
+ else()
110
+ set(instpdb_COMPONENT COMPONENT ${instpdb_COMPONENT})
111
+ endif()
112
+
113
+ string(TOUPPER ${configType} CONFIG_TYPES_UC)
114
+ get_target_property(PDB_PATH ${targetName} PDB_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC})
115
+
116
+ get_target_property(confModePostfix ${targetName} ${CONFIG_TYPES_UC}_POSTFIX)
117
+ if(NOT confModePostfix)
118
+ set(confModePostfix "")
119
+ endif()
120
+ set_target_properties(${targetName} PROPERTIES PDB_NAME_${CONFIG_TYPES_UC} ${targetName}${confModePostfix})
121
+ get_target_property(PDB_NAME ${targetName} PDB_NAME_${CONFIG_TYPES_UC})# if not set, this is empty
122
+
123
+ if(EXISTS "${PDB_PATH}/${PDB_NAME}.pdb")
124
+ install(FILES "${PDB_PATH}/${PDB_NAME}.pdb" CONFIGURATIONS ${configType} DESTINATION ${pdb_DESTINATION} ${instpdb_COMPONENT} OPTIONAL)
125
+ endif()
126
+ endmacro()
127
+
128
+
129
+ ##
130
+ ## Add additional target to install a project independently and based on its component
131
+ ## configMode is used to prevent default Release installation (we want also to install in other build/config type)
132
+ ##
133
+ macro(installTargetProject targetOfProject targetOfInstallProject)
134
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
135
+ set(configMode ${CMAKE_BUILD_TYPE})
136
+ elseif(MSVC)
137
+ ## $(Configuration) will be one of the following : Debug, Release, MinSizeRel, RelWithDebInfo
138
+ set(configMode $(Configuration))
139
+ endif()
140
+ if(configMode)
141
+ get_target_property(srcFiles ${targetOfProject} SOURCES)
142
+ add_custom_target( ${targetOfInstallProject} #ALL
143
+ ${CMAKE_COMMAND} -DBUILD_TYPE=${configMode} -DCOMPONENT=${targetOfInstallProject} -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
144
+ DEPENDS ${srcFiles}
145
+ COMMENT "run the installation only for ${targetOfProject}" VERBATIM
146
+ )
147
+ add_dependencies(${targetOfInstallProject} ${targetOfProject})
148
+
149
+ get_target_property(INSTALL_BUILD_FOLDER ${targetOfProject} FOLDER)
150
+ set_target_properties(${targetOfInstallProject} PROPERTIES FOLDER ${INSTALL_BUILD_FOLDER})
151
+ endif()
152
+ endmacro()
153
+
154
+ # Collect all currently added targets in all subdirectories
155
+ #
156
+ # Parameters:
157
+ # - _result the list containing all found targets
158
+ # - _dir root directory to start looking from
159
+ function(get_all_targets _result _dir)
160
+ get_property(_subdirs DIRECTORY "${_dir}" PROPERTY SUBDIRECTORIES)
161
+ foreach(_subdir IN LISTS _subdirs)
162
+ get_all_targets(${_result} "${_subdir}")
163
+ endforeach()
164
+
165
+ get_directory_property(_sub_targets DIRECTORY "${_dir}" BUILDSYSTEM_TARGETS)
166
+ set(${_result} ${${_result}} ${_sub_targets} PARENT_SCOPE)
167
+ endfunction()
168
+
169
+ ##
170
+ ## Add targets for building and installing subdirectories
171
+ macro(subdirectory_target target directory build_folder)
172
+ add_custom_target(${target}
173
+ COMMENT "run build for all projects in this directory" VERBATIM
174
+ )
175
+ get_all_targets(ALL_TARGETS ${directory})
176
+ add_dependencies(${target} ${ALL_TARGETS})
177
+ add_custom_target(${target}_install
178
+ ${CMAKE_COMMAND} -DBUILD_TYPE=$<CONFIG> -DCOMPONENT=${target}_install -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
179
+ COMMENT "run install for all projects in this directory" VERBATIM
180
+ )
181
+ add_dependencies(${target}_install ${target})
182
+
183
+ set_target_properties(${target} PROPERTIES FOLDER ${build_folder})
184
+ set_target_properties(${target}_install PROPERTIES FOLDER ${build_folder})
185
+ endmacro()
186
+
187
+
188
+ ## CMAKE install all required dependencies for an application (included system OS files like msvc*.dll for example)
189
+ ##
190
+ ## install_runtime(<installedFilePathTargetAppToResolve>
191
+ ## [TARGET name]
192
+ ## [PLUGINS name [nameN ...] [PLUGIN_PATH_NAME currentPathName [FROM_REL_PATH matchDirFromCurrentPathName] [PLUGIN_PATH_DEST installDir] ]
193
+ ## [PLUGINS ...]
194
+ ## [DIRS path [pathN ...] ]
195
+ ## [TARGET_LIBRARIES filePath [filePathN ...] ]
196
+ ## [TARGET_PACKAGES packageName [packageNameN ...] ]
197
+ ## [COMPONENT installComponentName]
198
+ ## [PLAUSIBLES_POSTFIX Debug_postfix [MinSizeRel_postfix relWithDebInfo_postfix ...] ]
199
+ ## [VERBOSE]
200
+ ## )
201
+ ##
202
+ ## installedFilePathTargetAppToResolve : the final installed targetApp absolute full file path name you want to resolve
203
+ ##
204
+ ## TARGET : The target app we want to install. If given, it's used to look for link libraries paths (best choice to use, strongly advised to use it)
205
+ ##
206
+ ## PLUGINS : Some application built use/load some plugins which can't be detect inside its binary,
207
+ ## so, here you can specify which plugins the application use/load in order to install them
208
+ ## and resolve also there dependencies.
209
+ ## With PLUGINS multi FLAGS :
210
+ ## PLUGIN_PATH_NAME : The current plugin full file path we want to install
211
+ ## FROM_REL_PATH : [optional: default only the file is kept] From which matching dir of the plugin path we want to install (keep the directories structure)
212
+ ## PLUGIN_PATH_DEST : [optional: default relative to executable directory] Where (full path to the install directory) we will install the plugin file (or file path)
213
+ ##
214
+ ## DIRS : A list of directories to looking for dependencies
215
+ ## TARGET_LIBRARIES : DEPRECATED (use TARGET flag instead) : The cmake content variables used for the target_link_libraries(<targetApp> ...)
216
+ ## TARGET_PACKAGES : DEPRECATED (use TARGET flag instead) : The cmake package names used for the findPackage(...) for your targetApp
217
+ ## ADVICE: This flag add entries in cache (like: <packageName>_DIR), it could be useful to fill these variable!
218
+ ## COMPONENT : (default to runtime) Is the component name associated to the installation
219
+ ## It is used when you want to install separatly some part of your projets (see install cmake doc)
220
+ ## VERBOSE : For debug or to get more informations in the output console
221
+ ##
222
+ ## Usage:
223
+ ## install_runtime(${CMAKE_INSTALL_PREFIX}/${EXECUTABLE_NAME}${CMAKE_EXECUTABLE_SUFFIX}
224
+ ## VERBOSE
225
+ ## TARGET ${PROJECT_NAME}
226
+ ## PLAUSIBLES_POSTFIX _d
227
+ ## PLUGINS
228
+ ## PLUGIN_PATH_NAME ${PLUGIN_PATH_NAME}${CMAKE_SHARED_MODULE_SUFFIX} ## will be installed (default exec path if no PLUGINS_DEST) and then will be resolved
229
+ ## FROM_REL_PATH plugins ## optional, used especially for keeping qt plugins tree structure
230
+ ## PLUGIN_PATH_DEST ${CMAKE_INSTALL_PREFIX}/plugins ## (or relative path 'plugins' will be interpreted relative to installed executable)
231
+ ## DIRS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}
232
+ ## TARGET_LIBRARIES ${OPENGL_LIBRARIES} ## DEPRECATED (use TARGET flag instead)
233
+ ## ${GLEW_LIBRARIES}
234
+ ## ${GLUT_LIBRARIES}
235
+ ## ${Boost_LIBRARIES}
236
+ ## ${SuiteSparse_LIBRARIES}
237
+ ## ${CGAL_LIBRARIES}
238
+ ## TARGET_PACKAGES OPENGL ## DEPRECATED (use TARGET flag instead)
239
+ ## GLEW
240
+ ## GLUT
241
+ ## CGAL
242
+ ## Boost
243
+ ## SuiteSparse
244
+ ## )
245
+ ##
246
+ ## For plugins part, it use our internal parse_arguments_multi.cmake
247
+ ##
248
+ function(install_runtime installedFilePathTargetAppToResolve)
249
+ set(optionsArgs "VERBOSE")
250
+ set(oneValueArgs "COMPONENT;INSTALL_FOLDER;CONFIG_TYPE")
251
+ set(multiValueArgs "DIRS;PLUGINS;TARGET_LIBRARIES;TARGET_PACKAGES;TARGET;PLAUSIBLES_POSTFIX")
252
+ cmake_parse_arguments(inst_run "${optionsArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
253
+
254
+ if(IS_ABSOLUTE ${installedFilePathTargetAppToResolve})
255
+ else()
256
+ set(installedFilePathTargetAppToResolve ${inst_run_INSTALL_FOLDER}/${installedFilePathTargetAppToResolve})
257
+ endif()
258
+
259
+ get_filename_component(EXEC_NAME ${installedFilePathTargetAppToResolve} NAME_WE)
260
+ get_filename_component(EXEC_PATH ${installedFilePathTargetAppToResolve} PATH)
261
+
262
+ if(NOT inst_run_COMPONENT)
263
+ set(inst_run_COMPONENT runtime)
264
+ endif()
265
+
266
+
267
+ ## Try to append as more possible as possible paths to find dependencies (deprecated since we can use target_properties to get back paths)
268
+ set(libPaths )
269
+ foreach(libraryFileName ${inst_run_TARGET_LIBRARIES})
270
+ if(IS_DIRECTORY "${libraryFileName}")
271
+ list(APPEND libPaths "${libraryFileName}")
272
+ else()
273
+ get_filename_component(libpath "${libraryFileName}" PATH)
274
+ if(EXISTS "${libpath}")
275
+ list(APPEND libPaths "${libpath}")
276
+ endif()
277
+ endif()
278
+ endforeach()
279
+
280
+ ## This macro is used internaly here to recursilvely get path of LINK_LIBRARIES of each non imported target
281
+ ## Typically if you have 2 internal dependencies between cmake targets, we want cmake to be able to get back path where are these dependencies
282
+ macro(recurseDepList target)
283
+ get_target_property(linkLibs ${target} LINK_LIBRARIES)
284
+ foreach(lib ${linkLibs})
285
+ string(FIND ${lib} ">" strId) ## cmake is using generator-expression?
286
+ if(TARGET ${lib})
287
+ ## Skipping interface libraries as they're system ones
288
+ get_target_property(type ${lib} TYPE)
289
+ get_target_property(imported ${lib} IMPORTED)
290
+ if(type STREQUAL "INTERFACE_LIBRARY")
291
+ get_target_property(imp_loc ${lib} INTERFACE_IMPORTED_LOCATION)
292
+ if(imp_loc)
293
+ get_filename_component(imp_loc ${imp_loc} PATH)
294
+ list(APPEND targetLibPath ${imp_loc})
295
+ endif()
296
+ get_target_property(loc ${lib} INTERFACE_LOCATION)
297
+ if(loc)
298
+ get_filename_component(loc ${loc} PATH)
299
+ list(APPEND targetLibPath ${loc})
300
+ endif()
301
+ ## it's not a path but a single target name
302
+ ## for build-target which are part of the current cmake configuration : nothing to do as cmake already know the output path
303
+ ## for imported target, we need to look for theire imported location
304
+ elseif(imported)
305
+ get_target_property(imp_loc ${lib} IMPORTED_LOCATION)
306
+ if(imp_loc)
307
+ get_filename_component(imp_loc ${imp_loc} PATH)
308
+ list(APPEND targetLibPath ${imp_loc})
309
+ endif()
310
+ get_target_property(loc ${lib} LOCATION)
311
+ if(loc)
312
+ get_filename_component(loc ${loc} PATH)
313
+ list(APPEND targetLibPath ${loc})
314
+ endif()
315
+ else()
316
+ recurseDepList(${lib})
317
+ endif()
318
+ elseif(NOT ${strId} MATCHES -1) ## mean cmake use generator-expression (CMAKE VERSION > 3.0)
319
+ string(REGEX MATCH ">:[@A-Za-z_:/.0-9-]+" targetLibPath ${lib})
320
+ string(REGEX REPLACE ">:([@A-Za-z_:/.0-9-]+)" "\\1" targetLibPath ${targetLibPath})
321
+ get_filename_component(targetLibPath ${targetLibPath} PATH)
322
+ elseif(EXISTS ${lib})
323
+ set(targetLibPath ${lib})
324
+ get_filename_component(targetLibPath ${targetLibPath} PATH)
325
+ else()
326
+ #message(STATUS "[install_runtime] skip link library : ${lib} , of target ${target}")
327
+ endif()
328
+ if(targetLibPath)
329
+ list(APPEND targetLinkLibsPathList ${targetLibPath})
330
+ endif()
331
+ endforeach()
332
+ if(targetLinkLibsPathList)
333
+ list(REMOVE_DUPLICATES targetLinkLibsPathList)
334
+ endif()
335
+ endmacro()
336
+ if(inst_run_TARGET)
337
+ recurseDepList(${inst_run_TARGET})
338
+ if(targetLinkLibsPathList)
339
+ list(APPEND libPaths ${targetLinkLibsPathList})
340
+ endif()
341
+ endif()
342
+
343
+ if(libPaths)
344
+ list(REMOVE_DUPLICATES libPaths)
345
+ foreach(libPath ${libPaths})
346
+ get_filename_component(path ${libPath} PATH)
347
+ list(APPEND libPaths ${path})
348
+ endforeach()
349
+ endif()
350
+
351
+
352
+ ## possible speciale dir(s) according to the build system and OS
353
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
354
+ set(BUILD_TYPES_FOR_DLL "x64")
355
+ if(WIN32)
356
+ list(APPEND BUILD_TYPES_FOR_DLL "Win64")
357
+ endif()
358
+ else()
359
+ set(BUILD_TYPES_FOR_DLL "x86")
360
+ if(WIN32)
361
+ list(APPEND BUILD_TYPES_FOR_DLL "Win32")
362
+ endif()
363
+ endif()
364
+
365
+
366
+ ## Try to append as more as possible paths to find dependencies (here, mainly for *.dll)
367
+ foreach(dir ${inst_run_DIRS} ${libPaths})
368
+ if(EXISTS "${dir}/bin")
369
+ list(APPEND inst_run_DIRS "${dir}/bin")
370
+ elseif(EXISTS "${dir}")
371
+ list(APPEND inst_run_DIRS "${dir}")
372
+ endif()
373
+ endforeach()
374
+ list(REMOVE_DUPLICATES inst_run_DIRS)
375
+ foreach(dir ${inst_run_DIRS})
376
+ if(EXISTS "${dir}")
377
+ list(APPEND argDirs ${dir})
378
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
379
+ if(EXISTS "${dir}/${BUILD_TYPE_FOR_DLL}")
380
+ list(APPEND argDirs "${dir}/${BUILD_TYPE_FOR_DLL}")
381
+ endif()
382
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
383
+ if(EXISTS "${dir}/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
384
+ list(APPEND argDirs "${dir}/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
385
+ endif()
386
+ endforeach()
387
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
388
+ if(EXISTS "${dir}/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
389
+ list(APPEND argDirs "${dir}/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
390
+ endif()
391
+ endif()
392
+ endforeach()
393
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
394
+ if(EXISTS "${dir}/${OUTPUTCONFIG}")
395
+ list(APPEND argDirs "${dir}/${OUTPUTCONFIG}")
396
+ endif()
397
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
398
+ if(EXISTS "${dir}/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
399
+ list(APPEND argDirs "${dir}/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
400
+ endif()
401
+ endforeach()
402
+ endforeach()
403
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
404
+ if(EXISTS "${dir}/${CMAKE_BUILD_TYPE}")
405
+ list(APPEND argDirs "${dir}/${CMAKE_BUILD_TYPE}")
406
+ endif()
407
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
408
+ if(EXISTS "${dir}/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
409
+ list(APPEND argDirs "${dir}/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
410
+ endif()
411
+ endforeach()
412
+ endif()
413
+ endif()
414
+ endforeach()
415
+ if(argDirs)
416
+ list(REMOVE_DUPLICATES argDirs)
417
+ endif()
418
+
419
+
420
+ ## Try to append as more possible paths to find dependencies (here, mainly for *.dll)
421
+ foreach(packageName ${inst_run_TARGET_PACKAGES})
422
+ if(EXISTS "${${packageName}_DIR}")
423
+ list(APPEND packageDirs ${${packageName}_DIR})
424
+ list(APPEND packageDirs ${${packageName}_DIR}/bin)
425
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
426
+ if(EXISTS "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}")
427
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}")
428
+ endif()
429
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
430
+ if(EXISTS "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
431
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${OUTPUTCONFIG}")
432
+ endif()
433
+ endforeach()
434
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
435
+ if(EXISTS "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
436
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${BUILD_TYPE_FOR_DLL}/${CMAKE_BUILD_TYPE}")
437
+ endif()
438
+ endif()
439
+ endforeach()
440
+ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) ## for windows multi-generator (MSVC)
441
+ if(EXISTS "${${packageName}_DIR}/bin/${OUTPUTCONFIG}")
442
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${OUTPUTCONFIG}")
443
+ endif()
444
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
445
+ if(EXISTS "${${packageName}_DIR}/bin/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
446
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${OUTPUTCONFIG}/${BUILD_TYPE_FOR_DLL}")
447
+ endif()
448
+ endforeach()
449
+ endforeach()
450
+ if(CMAKE_BUILD_TYPE) ## for single generator (makefiles)
451
+ if(EXISTS "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}")
452
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}")
453
+ endif()
454
+ foreach(BUILD_TYPE_FOR_DLL ${BUILD_TYPES_FOR_DLL})
455
+ if(EXISTS "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
456
+ list(APPEND packageDirs "${${packageName}_DIR}/bin/${CMAKE_BUILD_TYPE}/${BUILD_TYPE_FOR_DLL}")
457
+ endif()
458
+ endforeach()
459
+ endif()
460
+ else()
461
+ set(${packageName}_DIR "$ENV{${packageName}_DIR}" CACHE PATH "${packageName}_DIR root directory for looking for dirs containning *.dll")
462
+ endif()
463
+ endforeach()
464
+ if(packageDirs)
465
+ list(REMOVE_DUPLICATES packageDirs)
466
+ endif()
467
+
468
+
469
+ set(dirsToLookFor "${EXEC_PATH}")
470
+ if(packageDirs)
471
+ list(APPEND dirsToLookFor ${packageDirs})
472
+ endif()
473
+ if(argDirs)
474
+ list(APPEND dirsToLookFor ${argDirs})
475
+ endif()
476
+ get_property(used_LINK_DIRECTORIES DIRECTORY PROPERTY LINK_DIRECTORIES)
477
+ if (used_LINK_DIRECTORIES)
478
+ list(APPEND dirsToLookFor ${used_LINK_DIRECTORIES})
479
+ list(REMOVE_DUPLICATES dirsToLookFor)
480
+ endif()
481
+
482
+
483
+ ## handle plugins
484
+ set(pluginsList "")
485
+ include(parse_arguments_multi) ## this function will process recursively items of the sub-list [default print messages]
486
+ function(parse_arguments_multi_function results)
487
+ cmake_parse_arguments(pamf "VERBOSE" "PLUGIN_PATH_DEST;FROM_REL_PATH;EXEC_PATH;COMPONENT" "" ${ARGN}) ## EXEC_PATH and COMPONENT are for exclusive internal use
488
+ list(REMOVE_DUPLICATES pamf_UNPARSED_ARGUMENTS)
489
+ foreach(PLUGIN_PATH_NAME ${pamf_UNPARSED_ARGUMENTS})
490
+ if(EXISTS ${PLUGIN_PATH_NAME})
491
+ if(IS_DIRECTORY ${PLUGIN_PATH_NAME})
492
+ if(pamf_VERBOSE)
493
+ message(WARNING "${PLUGIN_PATH_NAME} IS_DIRECTORY, cannot installed a directory, please give a path filename")
494
+ endif()
495
+ else()
496
+ if(NOT pamf_PLUGIN_PATH_DEST)
497
+ set(PLUGIN_PATH_DEST ${pamf_EXEC_PATH}) ## the default dest value
498
+ else()
499
+ set(PLUGIN_PATH_DEST ${pamf_PLUGIN_PATH_DEST})
500
+ endif()
501
+
502
+ if(pamf_FROM_REL_PATH)
503
+ file(TO_CMAKE_PATH ${PLUGIN_PATH_NAME} PLUGIN_PATH_NAME)
504
+ get_filename_component(PLUGIN_PATH ${PLUGIN_PATH_NAME} PATH)
505
+ unset(PLUGIN_PATH_LIST)
506
+ unset(PLUGIN_PATH_LIST_COUNT)
507
+ unset(PLUGIN_REL_PATH_LIST)
508
+ unset(PLUGIN_REL_PATH)
509
+ string(REPLACE "/" ";" PLUGIN_PATH_LIST ${PLUGIN_PATH}) ## create a list of dir
510
+ list(FIND PLUGIN_PATH_LIST ${pamf_FROM_REL_PATH} id)
511
+ list(LENGTH PLUGIN_PATH_LIST PLUGIN_PATH_LIST_COUNT)
512
+ if(${id} GREATER 0)
513
+ math(EXPR id "${id}+1") ## matches relative path not include
514
+ math(EXPR PLUGIN_PATH_LIST_COUNT "${PLUGIN_PATH_LIST_COUNT}-1") ## the end of the list
515
+ foreach(i RANGE ${id} ${PLUGIN_PATH_LIST_COUNT})
516
+ list(GET PLUGIN_PATH_LIST ${i} out)
517
+ list(APPEND PLUGIN_REL_PATH_LIST ${out})
518
+ endforeach()
519
+ foreach(dir ${PLUGIN_REL_PATH_LIST})
520
+ set(PLUGIN_REL_PATH "${PLUGIN_REL_PATH}/${dir}")
521
+ endforeach()
522
+ endif()
523
+ set(PLUGIN_PATH_DEST ${PLUGIN_PATH_DEST}${PLUGIN_REL_PATH})
524
+ endif()
525
+
526
+ install(FILES ${PLUGIN_PATH_NAME} CONFIGURATIONS ${inst_run_CONFIG_TYPE} DESTINATION ${PLUGIN_PATH_DEST} COMPONENT ${pamf_COMPONENT})
527
+ get_filename_component(pluginName ${PLUGIN_PATH_NAME} NAME)
528
+ if(IS_ABSOLUTE ${PLUGIN_PATH_DEST})
529
+ else()
530
+ set(PLUGIN_PATH_DEST ${inst_run_INSTALL_FOLDER}/${PLUGIN_PATH_DEST})
531
+ endif()
532
+ list(APPEND pluginsList ${PLUGIN_PATH_DEST}/${pluginName})
533
+ endif()
534
+ else()
535
+ message(WARNING "You need to provide a valid PLUGIN_PATH_NAME")
536
+ set(pluginsList )
537
+ endif()
538
+ endforeach()
539
+ set(${results} ${pluginsList} PARENT_SCOPE)
540
+ endfunction()
541
+
542
+ if(inst_run_VERBOSE)
543
+ list(APPEND extra_flags_to_add VERBOSE)
544
+ endif()
545
+ list(APPEND extra_flags_to_add EXEC_PATH ${EXEC_PATH} COMPONENT ${inst_run_COMPONENT}) ## for internal use inside overloaded function
546
+ list(LENGTH inst_run_PLUGINS inst_run_PLUGINS_count)
547
+ if(${inst_run_PLUGINS_count} GREATER 0)
548
+ parse_arguments_multi(PLUGIN_PATH_NAME inst_run_PLUGINS ${inst_run_PLUGINS} ## see internal overload parse_arguments_multi_function for processing each sub-list
549
+ NEED_RESULTS ${inst_run_PLUGINS_count} ## this is used to check when we are in the first loop (in order to reset parse_arguments_multi_results)
550
+ EXTRAS_FLAGS ${extra_flags_to_add} ## this is used to allow catching additional internal flags of our overloaded function
551
+ )
552
+ endif()
553
+
554
+ #message(parse_arguments_multi_results = ${parse_arguments_multi_results})
555
+ list(APPEND pluginsList ${parse_arguments_multi_results})
556
+
557
+
558
+
559
+ ## Install rules for required system runtimes such as MSVCRxx.dll
560
+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)
561
+ include(InstallRequiredSystemLibraries)
562
+ if(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
563
+ install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
564
+ CONFIGURATIONS ${inst_run_CONFIG_TYPE}
565
+ DESTINATION ${EXEC_PATH}
566
+ COMPONENT ${inst_run_COMPONENT}
567
+ )
568
+ endif()
569
+
570
+ ## print what we are doing to do
571
+ if(inst_run_VERBOSE)
572
+ message(STATUS "[install_runtime] On install target call, cmake will try to resolve dependencies for given app:\n ${installedFilePathTargetAppToResolve} (with plausible postfix: ${inst_run_PLAUSIBLES_POSTFIX})")
573
+ if(pluginsList)
574
+ message(STATUS " and also for plugins :")
575
+ foreach(plugin ${pluginsList})
576
+ message(STATUS " ${plugin}")
577
+ endforeach()
578
+ endif()
579
+ message(STATUS " Looking for dependencies into:")
580
+ foreach(dir ${dirsToLookFor})
581
+ message(STATUS " ${dir}")
582
+ endforeach()
583
+ endif()
584
+
585
+ ## Install rules for required dependencies libs/plugins for the target app
586
+ ## will resolve all installed target files with config modes postfixes
587
+ string(TOUPPER ${inst_run_CONFIG_TYPE} inst_run_CONFIG_TYPE_UC)
588
+ get_target_property(postfix ${inst_run_TARGET} "${inst_run_CONFIG_TYPE_UC}_POSTFIX")
589
+ install(CODE "set(target \"${inst_run_TARGET}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
590
+ install(CODE "set(inst_run_CONFIG_TYPE \"${inst_run_CONFIG_TYPE}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
591
+ install(CODE "set(inst_run_INSTALL_FOLDER \"${inst_run_INSTALL_FOLDER}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
592
+ install(CODE "set(app \"${EXEC_PATH}/${EXEC_NAME}${postfix}${CMAKE_EXECUTABLE_SUFFIX}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
593
+ install(CODE "set(dirsToLookFor \"${dirsToLookFor}\")" COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE})
594
+ install(CODE
595
+ [[
596
+ if("${CMAKE_INSTALL_CONFIG_NAME}" STREQUAL "${inst_run_CONFIG_TYPE}")
597
+ message(STATUS "Installing ${target} dependencies...")
598
+
599
+ file(GET_RUNTIME_DEPENDENCIES
600
+ EXECUTABLES ${app}
601
+ RESOLVED_DEPENDENCIES_VAR _r_deps
602
+ UNRESOLVED_DEPENDENCIES_VAR _u_deps
603
+ CONFLICTING_DEPENDENCIES_PREFIX _c_deps
604
+ DIRECTORIES ${dirsToLookFor}
605
+ PRE_EXCLUDE_REGEXES "api-ms-*"
606
+ POST_EXCLUDE_REGEXES ".*system32/.*\\.dll" ".*SysWOW64/.*\\.dll"
607
+ )
608
+
609
+ if(_u_deps)
610
+ message(WARNING "There were unresolved dependencies for executable ${EXEC_FILE}: \"${_u_deps}\"!")
611
+ endif()
612
+ if(_c_deps_FILENAMES)
613
+ message(WARNING "There were conflicting dependencies for executable ${EXEC_FILE}: \"${_c_deps_FILENAMES}\"!")
614
+ endif()
615
+
616
+ foreach(_file ${_r_deps})
617
+ file(INSTALL
618
+ DESTINATION "${inst_run_INSTALL_FOLDER}/bin"
619
+ TYPE SHARED_LIBRARY
620
+ FOLLOW_SYMLINK_CHAIN
621
+ FILES "${_file}"
622
+ )
623
+ endforeach()
624
+ endif()
625
+ ]]
626
+ COMPONENT ${inst_run_COMPONENT} CONFIGURATIONS ${CONFIG_TYPE}
627
+ )
628
+
629
+
630
+ endfunction()
631
+
632
+ ## High level macro to install resources in the correct folder
633
+ ##
634
+ ## EXECUTABLE: [opt] option to copy files as programs
635
+ ## RELATIVE : [opt] copy files relatively to current folder
636
+ ## TYPE : [opt] type and folder where to store the files
637
+ ## FOLDER : [opt] subfolder to use
638
+ ## FILES : [opt] contains a list of resources files to copy to install folder
639
+ macro(ibr_install_rsc target)
640
+ cmake_parse_arguments(install_rsc_${target} "EXECUTABLE;RELATIVE" "TYPE;FOLDER" "FILES" ${ARGN})
641
+ set(rsc_target "${target}_${install_rsc_${target}_TYPE}")
642
+
643
+ if(install_rsc_${target}_FOLDER)
644
+ set(rsc_folder "${install_rsc_${target}_TYPE}/${install_rsc_${target}_FOLDER}")
645
+ else()
646
+ set(rsc_folder "${install_rsc_${target}_TYPE}")
647
+ endif()
648
+
649
+ add_custom_target(${rsc_target}
650
+ COMMENT "run the ${install_rsc_${target}_TYPE} installation only for ${target} (component ${rsc_target})"
651
+ VERBATIM)
652
+ foreach(scriptFile ${install_rsc_${target}_FILES})
653
+ if(install_rsc_${target}_RELATIVE)
654
+ file(RELATIVE_PATH relativeFilename ${CMAKE_CURRENT_SOURCE_DIR} ${scriptFile})
655
+ else()
656
+ get_filename_component(relativeFilename ${scriptFile} NAME)
657
+ endif()
658
+
659
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
660
+ add_custom_command(TARGET ${rsc_target} POST_BUILD
661
+ COMMAND ${CMAKE_COMMAND} -E
662
+ copy_if_different ${scriptFile} ${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/${rsc_folder}/${relativeFilename})
663
+ endif()
664
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
665
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
666
+ add_custom_command(TARGET ${rsc_target} POST_BUILD
667
+ COMMAND ${CMAKE_COMMAND} -E
668
+ copy_if_different ${scriptFile} ${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/${rsc_folder}/${relativeFilename})
669
+ endforeach()
670
+ endforeach()
671
+
672
+ get_target_property(INSTALL_RSC_BUILD_FOLDER ${target} FOLDER)
673
+ set_target_properties(${rsc_target} PROPERTIES FOLDER ${INSTALL_RSC_BUILD_FOLDER})
674
+
675
+ add_dependencies(${target} ${rsc_target})
676
+ add_dependencies(PREBUILD ${rsc_target})
677
+
678
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
679
+ resourceFile(ADD ${rsc_folder} CONFIG_TYPE ${CMAKE_BUILD_TYPE} FILE_PATH "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/ibr_resources.ini")
680
+
681
+ if(install_rsc_${target}_EXECUTABLE)
682
+ install(
683
+ PROGRAMS ${install_rsc_${target}_FILES}
684
+ CONFIGURATIONS ${CMAKE_BUILD_TYPE}
685
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/${rsc_folder}"
686
+ )
687
+ else()
688
+ install(
689
+ FILES ${install_rsc_${target}_FILES}
690
+ CONFIGURATIONS ${CMAKE_BUILD_TYPE}
691
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}/${rsc_folder}"
692
+ )
693
+ endif()
694
+ endif()
695
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
696
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
697
+ resourceFile(ADD ${rsc_folder} CONFIG_TYPE ${CONFIG_TYPES} FILE_PATH "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/ibr_resources.ini")
698
+
699
+ if(install_rsc_${target}_EXECUTABLE)
700
+ install(
701
+ PROGRAMS ${install_rsc_${target}_FILES}
702
+ CONFIGURATIONS ${CONFIG_TYPES}
703
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/${rsc_folder}"
704
+ )
705
+ else()
706
+ install(
707
+ FILES ${install_rsc_${target}_FILES}
708
+ CONFIGURATIONS ${CONFIG_TYPES}
709
+ DESTINATION "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}/${rsc_folder}"
710
+ )
711
+ endif()
712
+ endforeach()
713
+ endmacro()
714
+
715
+
716
+ ## High level macro to install in an homogen way all our ibr targets (it use some functions inside this file)
717
+ ##
718
+ ## RSC_FILE_ADD : [opt] is used to auto write/append relative paths of target resources into a common file
719
+ ## INSTALL_PDB : [opt] is used to auto install PDB file (when using MSVC according to the target type)
720
+ ## STANDALONE : [opt] bool ON/OFF var to call install_runtime or not (for bundle resolution)
721
+ ## DIRS : [opt] used if STANDALONE set to ON, see install_runtime doc
722
+ ## PLUGINS: [opt] used if STANDALONE set to ON, see install_runtime doc
723
+ ## MSVC_CMD : [opt] used to specify an absolute filePathName application to launch with the MSVC IDE Debugger associated to this target (project file)
724
+ ## MSVC_ARGS : [opt] load the MSVC debugger with correct settings (app path, args, working dir)
725
+ ##
726
+ macro(ibr_install_target target)
727
+ cmake_parse_arguments(ibrInst${target} "VERBOSE;INSTALL_PDB" "COMPONENT;MSVC_ARGS;STANDALONE;RSC_FOLDER" "SHADERS;RESOURCES;SCRIPTS;DIRS;PLUGINS" ${ARGN})
728
+
729
+ if(ibrInst${target}_RSC_FOLDER)
730
+ set(rsc_folder "${ibrInst${target}_RSC_FOLDER}")
731
+ else()
732
+ set(rsc_folder "${target}")
733
+ endif()
734
+
735
+ if(ibrInst${target}_SHADERS)
736
+ ibr_install_rsc(${target} EXECUTABLE TYPE "shaders" FOLDER ${rsc_folder} FILES "${ibrInst${target}_SHADERS}")
737
+ endif()
738
+
739
+ if(ibrInst${target}_RESOURCES)
740
+ ibr_install_rsc(${target} TYPE "resources" FOLDER ${rsc_folder} FILES "${ibrInst${target}_RESOURCES}")
741
+ endif()
742
+
743
+ if(ibrInst${target}_SCRIPTS)
744
+ ibr_install_rsc(${target} EXECUTABLE TYPE "scripts" FOLDER ${rsc_folder} FILES "${ibrInst${target}_SCRIPTS}")
745
+ endif()
746
+
747
+ if(ibrInst${target}_COMPONENT)
748
+ set(installCompArg COMPONENT ${ibrInst${target}_COMPONENT})
749
+ ## Create a custom install target based on COMPONENT
750
+ installTargetProject(${target} ${ibrInst${target}_COMPONENT})
751
+ endif()
752
+
753
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
754
+ string(TOUPPER ${CMAKE_BUILD_TYPE} CONFIG_TYPES_UC)
755
+ set_target_properties(${target} PROPERTIES ${CONFIG_TYPES_UC}_POSTFIX "${CMAKE_${CONFIG_TYPES_UC}_POSTFIX}")
756
+ get_target_property(CURRENT_TARGET_BUILD_TYPE_POSTFIX ${target} ${CONFIG_TYPES_UC}_POSTFIX)
757
+ endif()
758
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
759
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
760
+ set_target_properties(${target} PROPERTIES ${CONFIG_TYPES_UC}_POSTFIX "${CMAKE_${CONFIG_TYPES_UC}_POSTFIX}")
761
+ get_target_property(CURRENT_TARGET_BUILD_TYPE_POSTFIX ${target} ${CONFIG_TYPES_UC}_POSTFIX)
762
+ endforeach()
763
+
764
+ ## Specify default installation rules
765
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
766
+ string(TOUPPER ${CMAKE_BUILD_TYPE} CONFIG_TYPES_UC)
767
+ install(TARGETS ${target}
768
+ CONFIGURATIONS ${CMAKE_BUILD_TYPE}
769
+ LIBRARY DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
770
+ ARCHIVE DESTINATION ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
771
+ RUNTIME DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}} ${installCompArg}
772
+ )
773
+ endif()
774
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
775
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
776
+ install(TARGETS ${target}
777
+ CONFIGURATIONS ${CONFIG_TYPES}
778
+ LIBRARY DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
779
+ ARCHIVE DESTINATION ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
780
+ RUNTIME DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}} ${installCompArg}
781
+ )
782
+ endforeach()
783
+
784
+ if(ibrInst${target}_INSTALL_PDB)
785
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
786
+ installPDB(${target} ${CMAKE_BUILD_TYPE}
787
+ LIBRARY_DEST ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}}
788
+ ARCHIVE_DEST ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}}
789
+ RUNTIME_DEST ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CMAKE_BUILD_TYPE}}
790
+ )
791
+ endif()
792
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
793
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
794
+ installPDB(${target} ${CONFIG_TYPES}
795
+ LIBRARY_DEST ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
796
+ ARCHIVE_DEST ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
797
+ RUNTIME_DEST ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
798
+ )
799
+ endforeach()
800
+ endif()
801
+
802
+ ## install dynamic necessary dependencies
803
+ if(ibrInst${target}_STANDALONE)
804
+ get_target_property(type ${target} TYPE)
805
+ if(${type} MATCHES "EXECUTABLE")
806
+
807
+ if(ibrInst${target}_VERBOSE)
808
+ set(VERBOSE VERBOSE)
809
+ else()
810
+ set(VERBOSE )
811
+ endif()
812
+
813
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
814
+ install_runtime(bin/${target}${CMAKE_EXECUTABLE_SUFFIX} ## default relative to CMAKE_INSTALL_PREFIX
815
+ INSTALL_FOLDER "${CMAKE_INSTALL_PREFIX_${CMAKE_BUILD_TYPE}}"
816
+ CONFIG_TYPE ${CMAKE_BUILD_TYPE}
817
+ ${VERBOSE}
818
+ TARGET ${target}
819
+ ${installCompArg}
820
+ PLUGINS ## will be installed
821
+ ${ibrInst${target}_PLUGINS}
822
+ DIRS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
823
+ ${ibrInst${target}_DIRS}
824
+ )
825
+ endif()
826
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
827
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
828
+ install_runtime(bin/${target}${CMAKE_EXECUTABLE_SUFFIX} ## default relative to CMAKE_INSTALL_PREFIX
829
+ INSTALL_FOLDER "${CMAKE_INSTALL_PREFIX_${CONFIG_TYPES_UC}}"
830
+ CONFIG_TYPE ${CONFIG_TYPES}
831
+ ${VERBOSE}
832
+ TARGET ${target}
833
+ ${installCompArg}
834
+ PLUGINS ## will be installed
835
+ ${ibrInst${target}_PLUGINS}
836
+ DIRS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPES_UC}}
837
+ ${ibrInst${target}_DIRS}
838
+ )
839
+ endforeach()
840
+ else()
841
+ message(WARNING "STANDALONE option is only compatible with EXECUTABLES target type. Skip the STANDALONE installation process.")
842
+ endif()
843
+ endif()
844
+
845
+ ## Provide a way to directly load the MSVC debugger with correct settings
846
+ if(MSVC)
847
+ if(ibrInst${target}_MSVC_CMD) ## command absolute filePathName is optional as the default is to use the installed target file application
848
+ set(msvcCmdArg COMMAND ${ibrInst${target}_MSVC_CMD}) ## flag following by the value (both to pass to the MSVCsetUserCommand function)
849
+ endif()
850
+ if(ibrInst${target}_MSVC_ARGS) ## args (between quotes) are optional
851
+ set(msvcArgsArg ARGS ${ibrInst${target}_MSVC_ARGS}) ## flag following by the value (both to pass to the MSVCsetUserCommand function)
852
+ endif()
853
+ get_target_property(type ${target} TYPE)
854
+ if( (ibrInst${target}_MSVC_CMD OR ibrInst${target}_MSVC_ARGS) OR (${type} MATCHES "EXECUTABLE") )
855
+ include(MSVCsetUserCommand)
856
+ if(DEFINED CMAKE_BUILD_TYPE) ## for make/nmake based
857
+ MSVCsetUserCommand( ${target}
858
+ PATH ${CMAKE_OUTPUT_BIN_${CMAKE_BUILD_TYPE}} ##FILE option not necessary since it deduced from targetName
859
+ ARGS "${SIBR_PROGRAMARGS}"
860
+ ${msvcCmdArg}
861
+ #${msvcArgsArg}
862
+ WORKING_DIR ${CMAKE_OUTPUT_BIN_${CMAKE_BUILD_TYPE}}
863
+ )
864
+ endif()
865
+ foreach(CONFIG_TYPES ${CMAKE_CONFIGURATION_TYPES}) ## for multi config types (MSVC based)
866
+ string(TOUPPER ${CONFIG_TYPES} CONFIG_TYPES_UC)
867
+ MSVCsetUserCommand( ${target}
868
+ PATH ${CMAKE_OUTPUT_BIN_${CONFIG_TYPES_UC}} ##FILE option not necessary since it deduced from targetName
869
+ ARGS "${SIBR_PROGRAMARGS}"
870
+ ${msvcCmdArg}
871
+ #${msvcArgsArg}
872
+ WORKING_DIR ${CMAKE_OUTPUT_BIN_${CONFIG_TYPES_UC}}
873
+ )
874
+ endforeach()
875
+ elseif(NOT ${type} MATCHES "EXECUTABLE")
876
+ #message("Cannot set MSVCsetUserCommand with target ${target} without COMMAND parameter as it is not an executable (skip it)")
877
+ endif()
878
+ endif()
879
+
880
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/parse_arguments_multi.cmake ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ if(NOT WIN32 OR __parse_arguments_multi_cmake_INCLUDED__)
12
+ return()
13
+ else()
14
+ set(__parse_arguments_multi_cmake_INCLUDED__ ON)
15
+ endif()
16
+
17
+ ## This macro allow to process repeating multi value args from a given function which use cmake_parse_arguments module.
18
+ ##
19
+ ## cmake_parse_arguments multi args standard behavior:
20
+ ## function(foo)
21
+ ## cmake_parse_arguments(arg "" "" "MULTI" ${ARGN})
22
+ ## foreach(item IN LISTS arg_MULTI)
23
+ ## message(STATUS "${item}")
24
+ ## endforeach()
25
+ ## endfunction()
26
+ ## foo(MULTI x y MULTI z w)
27
+ ## The above code outputs 'z' and 'w'. It originally expected it to output all of 'x' 'y' 'z' 'w'.
28
+ ##
29
+ ## Using this macro inside a function which want to handle repeating multi args values
30
+ ## will recursively iterate onto the multi tags list to process each sub list.
31
+ ## It take as 1st argument the subTag flag to separate sub list from the main multi list.
32
+ ## It take as 2nd argument the nameList of the main multi list (the multiValuesArgs from cmake_parse_arguments: here it is MULTI in the example)
33
+ ## and that's why it is important that it should be a macro and not a function (to get access to external variable).
34
+ ## Then you give the content of this list allowing to be processed by the macro.
35
+ ##
36
+ ## parse_arguments_multi macro call a parse_arguments_multi_function which do actually the process from the given sub-list.
37
+ ## By default this function only print infos about what variables you are trying to pass/process (only verbose messages),
38
+ ## but, by overloading this cmake function, you will be able to externalize the process of your multi argument list.
39
+ ##
40
+ ## Usage (into a function) :
41
+ ## parse_arguments_multi(<multiArgsSubTag> <multiArgsList> <multiArgsListContent>
42
+ ## [NEED_RESULTS <multiArgsListSize>] [EXTRAS_FLAGS <...> <...> ...]
43
+ ## )
44
+ ##
45
+ ## Simple usage example [user point of view]:
46
+ ## foo(MULTI
47
+ ## SUB_MULTI x y
48
+ ## SUB_MULTI z w
49
+ ## )
50
+ ##
51
+ ## Simple usage example [inside a function]:
52
+ ## function(foo)
53
+ ## cmake_parse_arguments(arg "" "" "MULTI" ${ARGN})
54
+ ## include(parse_arguments_multi)
55
+ ## function(parse_arguments_multi_function )
56
+ ## #message("I'm an overloaded cmake function used by parse_arguments_multi")
57
+ ## #message("I'm processing first part of my sub list: ${ARGN}")
58
+ ## message("ARGV0=${ARGV0}")
59
+ ## message("ARGV1=${ARGV1}")
60
+ ## endfunction()
61
+ ## parse_arguments_multi(SUB_MULTI arg_MULTI ${arg_MULTI}) ## this function will process recusively items of the sub-list [default print messages]
62
+ ## endfunction()
63
+ ##
64
+ ## Will print:
65
+ ## ARGV0=z
66
+ ## ARGV1=w
67
+ ## ARGV0=x
68
+ ## ARGV1=y
69
+ ##
70
+ ## WARNING : DO NEVER ADD EXTRA THINGS TO parse_arguments_multi MACRO :
71
+ ## parse_arguments_multi(SUB_MULTI arg_MULTI ${arg_MULTI} EXTRAS foo bar SOMTHING) => will failed !!
72
+ ## use EXTRAS_FLAGS instead !!
73
+ ##
74
+ ## Advanced usage example [user point of view]:
75
+ ## bar(C:/prout/test.exe VERBOSE
76
+ ## PLUGINS
77
+ ## PLUGIN_PATH_NAME x PLUGIN_PATH_DEST w
78
+ ## PLUGIN_PATH_NAME a b PLUGIN_PATH_DEST y
79
+ ## PLUGIN_PATH_NAME c
80
+ ## )
81
+ ##
82
+ ## Advanced usage example [inside a function]:
83
+ ## function(bar execFilePathName)
84
+ ## cmake_parse_arguments(arg "VERBOSE" "" "PLUGINS" ${ARGN})
85
+ ##
86
+ ## include(parse_arguments_multi)
87
+ ## function(parse_arguments_multi_function results)
88
+ ## cmake_parse_arguments(pamf "VERBOSE" "PLUGIN_PATH_DEST;EXEC_PATH" "" ${ARGN}) ## EXEC_PATH is for internal use
89
+ ## message("")
90
+ ## message("I'm an overloaded cmake function used by parse_arguments_multi from install_runtime function")
91
+ ## message("I'm processing first part of my sub list: ${ARGN}")
92
+ ## message("PLUGIN_PATH_NAME = ${pamf_UNPARSED_ARGUMENTS}")
93
+ ## message(pamf_VERBOSE = ${pamf_VERBOSE})
94
+ ## message("pamf_PLUGIN_PATH_DEST = ${pamf_PLUGIN_PATH_DEST}")
95
+ ## message(pamf_EXEC_PATH = ${pamf_EXEC_PATH})
96
+ ## if(NOT ${pamf_PLUGIN_PATH_DEST})
97
+ ## set(pamf_PLUGIN_PATH_DEST ${pamf_EXEC_PATH})
98
+ ## endif()
99
+ ## foreach(plugin ${pamf_UNPARSED_ARGUMENTS})
100
+ ## get_filename_component(pluginName ${plugin} NAME)
101
+ ## list(APPEND pluginsList ${pamf_PLUGIN_PATH_DEST}/${pluginName})
102
+ ## endforeach()
103
+ ## set(${results} ${pluginsList} PARENT_SCOPE)
104
+ ## endfunction()
105
+ ##
106
+ ## if(arg_VERBOSE)
107
+ ## list(APPEND extra_flags_to_add VERBOSE) ## here we transmit the VERNOSE flag
108
+ ## endif()
109
+ ## get_filename_component(EXEC_PATH ${execFilePathName} PATH) ## will be the default value if PLUGIN_PATH_DEST option is not provided
110
+ ## list(APPEND extra_flags_to_add EXEC_PATH ${EXEC_PATH})
111
+ ## list(LENGTH arg_PLUGINS arg_PLUGINS_count)
112
+ ## parse_arguments_multi(PLUGIN_PATH_NAME arg_PLUGINS ${arg_PLUGINS}
113
+ ## NEED_RESULTS ${arg_PLUGINS_count} ## this is used to check when we are in the first loop (in order to reset parse_arguments_multi_results)
114
+ ## EXTRAS_FLAGS ${extra_flags_to_add} ## this is used to allow catching VERBOSE and PLUGIN_PATH_DEST flags of our overloaded function
115
+ ## )
116
+ ## endfunction()
117
+ ## message(parse_arguments_multi_results = ${parse_arguments_multi_results}) ## list of the whole pluginsList
118
+ ## #Will print w/x;a/y;b/y;C:/prout/c
119
+ ##
120
+ ## NOTE that here, since our overloaded function need to provide a result list, we use the other parse_arguments_multi_function signature (the which one with a results arg)
121
+ ##
122
+
123
+ function(parse_arguments_multi_function_default) ## used in case of you want to reset the default behavior of this function process
124
+ message("[default function] parse_arguments_multi_function(ARGC=${ARGC} ARGV=${ARGV} ARGN=${ARGN})")
125
+ message("This function is used by parse_arguments_multi and have to be overloaded to process sub list of multi values args")
126
+ endfunction()
127
+
128
+ function(parse_arguments_multi_function ) ## => the function to overload
129
+ parse_arguments_multi_function_default(${ARGN})
130
+ endfunction()
131
+
132
+ ## first default signature above
133
+ ##------------------------------
134
+ ## second results signature behind
135
+
136
+ function(parse_arguments_multi_function_default result) ## used in case of you want to reset the default behavior of this function process
137
+ message("[default function] parse_arguments_multi_function(ARGC=${ARGC} ARGV=${ARGV} ARGN=${ARGN})")
138
+ message("This function is used by parse_arguments_multi and have to be overloaded to process sub list of muluti values args")
139
+ endfunction()
140
+
141
+ function(parse_arguments_multi_function result) ## => the function to overload
142
+ parse_arguments_multi_function_default(result ${ARGN})
143
+ endfunction()
144
+
145
+ ## => the macro to use inside your function which use cmake_parse_arguments
146
+ # NOTE: entry point of parse_arguments_multi, which is called from win3rdPart)
147
+ macro(parse_arguments_multi multiArgsSubTag multiArgsList #<${multiArgsList}> the content of the list
148
+ )
149
+ # message (STATUS "")
150
+ # message(STATUS "calling parse_arguemnts_multi defined in parse_arguments_multi.cmake:141")
151
+ # message(STATUS "multiArgsSubTag = ${multiArgsSubTag}") # CHECK_CACHED_VAR
152
+ # message(STATUS "multiArgsList = ${multiArgsList}") # it contains the name of the variable which is holding the list i.e w3p_MULTI_SET
153
+ # message(STATUS "value of ${multiArgsList} = ${${multiArgsList}}") # a semicolon separated list of values passed to SET or MULTISET keyword in win3rdParty
154
+ # message(STATUS "actual values ARGN = ${ARGN}") # the same as ${${multiArgsList}}
155
+
156
+ ## INFO
157
+ ## starting from CMake 3.5 cmake_parse_arguments is not a module anymore and now is a native CMake command.
158
+ ## the behaviour is different though
159
+ ## In CMake 3.4, if you pass multiple times a multi_value_keyword, CMake returns the values of the LAST match
160
+ ## In CMake 3.5 and above, CMake returns the whole list of values that were following that multi_value_keyword
161
+ ## example:
162
+ ## cmake_parse_arguments(
163
+ ## <prefix>
164
+ ## "" # options
165
+ ## "" # one value keywords
166
+ ## "MY_MULTI_VALUE_TAG"
167
+ ## MY_MULTI_VALUE_TAG value1 value2
168
+ ## MY_MULTI_VALUE_TAG value3 value4
169
+ ## MY_MULTI_VALUE_TAG value5 value6
170
+ ## )
171
+ ## result in CMake 3.4
172
+ ## <prefix>_MY_MULTI_VALUE_TAG = "value5;value6"
173
+ ##
174
+ ## result in CMake 3.8
175
+ ## <prefix>_MY_MULTI_VALUE_TAG = "value5;value6"
176
+
177
+ #include(CMakeParseArguments) #module CMakeParseArguments is obsolete since cmake 3.5
178
+ # cmake_parse_arguments (<prefix> <options> <one_value_keywords> <multi_value_keywords> args)
179
+ # <options> : options (flags) pass to the macro
180
+ # <one_value_keywords> : options that neeed a value
181
+ # <multi_value_keywords> : options that neeed more than one value
182
+ cmake_parse_arguments(_pam "" "NEED_RESULTS" "${multiArgsSubTag};EXTRAS_FLAGS" ${ARGN})
183
+
184
+ ## multiArgsList is the name of the list used by the multiValuesOption flag from the cmake_parse_arguments of the user function
185
+ ## that's why we absolutly need to use MACRO here (and also for passing parse_arguments_multi_results when NEED_RESULTS flag is set)
186
+
187
+ ## for debugging
188
+ #message("")
189
+ #message("[parse_arguments_multi] => ARGN = ${ARGN}")
190
+ #message("_pam_NEED_RESULTS=${_pam_NEED_RESULTS}")
191
+ #message("_pam_EXTRAS_FLAGS=${_pam_EXTRAS_FLAGS}")
192
+ # foreach(var ${_pam_${multiArgsSubTag}})
193
+ # message("arg=${var}")
194
+ # endforeach()
195
+
196
+ if (${CMAKE_VERSION} VERSION_GREATER "3.5")
197
+ # lets make ${_pam_${multiArgsSubTag}} behave as it is in version 3.4
198
+ # that means, cmake_parse_arguments should have only the last values of a multi set for a given keyword
199
+
200
+ # message("")
201
+ # message("values in multiArgsList")
202
+ # foreach(val ${${multiArgsList}})
203
+ # message(STATUS ${val})
204
+ # endforeach()
205
+ # message("end values in multiArgsList")
206
+
207
+
208
+ set(lastIndexFound OFF)
209
+ list(LENGTH ${multiArgsList} argnLength)
210
+ # message(${argnLength})
211
+ math(EXPR argnLength "${argnLength}-1") # make last index a valid one
212
+ set(recordIndex 0)
213
+ set(records "") # clear records list
214
+ set(record0 "") # clear first record list
215
+ foreach(iter RANGE ${argnLength})
216
+ list(GET ${multiArgsList} ${iter} value)
217
+ # message(STATUS "index=${iter} value=${value}")
218
+ if (${value} STREQUAL ${multiArgsSubTag})
219
+ if (lastIndexFound)
220
+ list(APPEND records ${recordIndex}) # records store the list NAMES
221
+ math(EXPR recordIndex "${recordIndex}+1")
222
+ set(record${recordIndex} "") # clear record list
223
+ else ()
224
+ set(lastIndexFound ON)
225
+ endif()
226
+
227
+ set(lastIndex ${iter})
228
+ else ()
229
+ if (lastIndexFound)
230
+ # message(${value})
231
+ list(APPEND record${recordIndex} ${value})
232
+ endif()
233
+ endif()
234
+ endforeach()
235
+
236
+ # save the last list of values
237
+ if (lastIndexFound)
238
+ list(APPEND records ${recordIndex}) # records store the list NAMES
239
+ endif()
240
+
241
+ # set multiArgsList to make it behave like CMake 3.4
242
+ # message("")
243
+ # message("using my records")
244
+ foreach(recordName ${records})
245
+ # message(${recordName})
246
+ # foreach(value ${record${recordName}})
247
+ # message(${value})
248
+ # endforeach()
249
+ # message("")
250
+ set(_pam_${multiArgsSubTag} ${record${recordName}})
251
+ endforeach()
252
+ # message(${_pam_${multiArgsSubTag}})
253
+
254
+ # message("")
255
+ # message("using argn")
256
+ # foreach(value ${ARGN})
257
+ # message(${value})
258
+ # endforeach()
259
+ endif() # end if cmake > 3.5
260
+
261
+ # message("values with pam ${_pam_${multiArgsSubTag}}")
262
+
263
+ ## check and init
264
+ list(LENGTH ${multiArgsList} globalListCount) # GLUT_TRACE: globalListCound=16 in CMake3.4 and CMake3.8
265
+ # message(STATUS "nr items in multiArgsList: ${globalListCount}")
266
+ math(EXPR globalListCount "${globalListCount}-1") ## because it will contain [multiArgsSubTag + ${multiArgsList}]
267
+ if(_pam_NEED_RESULTS)
268
+ if(${globalListCount} EQUAL ${_pam_NEED_RESULTS})
269
+ ## first time we enter into this macro (because we call it recursively)
270
+ unset(parse_arguments_multi_results)
271
+ endif()
272
+ endif()
273
+
274
+ ## process the part of the multi agrs list
275
+ ## ${ARGN} shouldn't be passed to the function in order to avoid missmatch size list ${multiArgsList} and _pam_${multiArgsSubTag}
276
+ ## if you want to pass extra internal flags from your function to this callback, use EXTRAS_FLAGS
277
+ if(_pam_NEED_RESULTS)
278
+ parse_arguments_multi_function(parse_arguments_multi_function_result ${_pam_${multiArgsSubTag}} ${_pam_EXTRAS_FLAGS})
279
+ list(APPEND parse_arguments_multi_results ${parse_arguments_multi_function_result})
280
+ else()
281
+ # message(STATUS "about to call parse_arguments_multi_function in parse_arguments_multi.cmake:177 ${_pam_${multiArgsSubTag}} and extra flags ${_pam_EXTRAS_FLAGS}")
282
+ parse_arguments_multi_function(${_pam_${multiArgsSubTag}} ${_pam_EXTRAS_FLAGS})
283
+ endif()
284
+
285
+ ## remove just processed items from the main list to process (multiArgsList)
286
+ list(REVERSE ${multiArgsList})
287
+ list(LENGTH _pam_${multiArgsSubTag} subTagListCount)
288
+ unset(ids)
289
+ foreach(id RANGE ${subTagListCount})
290
+ list(APPEND ids ${id})
291
+ endforeach()
292
+ list(REMOVE_AT ${multiArgsList} ${ids})
293
+ list(REVERSE ${multiArgsList})
294
+
295
+ ## test if remain sub multi list to process (recursive call) or finish the process
296
+ list(LENGTH ${multiArgsList} mainTagListCount)
297
+ if(${mainTagListCount} GREATER 1)
298
+ ## do not pass ${ARGN} just because it will re pass the initial 2 inputs args and we wont as they was consumed (in order to avoir conflicts)
299
+ # message(STATUS "about to call a parse_arguments_multi but without knowing where the definition is going to be taken from")
300
+ parse_arguments_multi(${multiArgsSubTag} ${multiArgsList} ${${multiArgsList}}
301
+ NEED_RESULTS ${_pam_NEED_RESULTS} EXTRAS_FLAGS ${_pam_EXTRAS_FLAGS}
302
+ )
303
+ endif()
304
+ endmacro()
submodule/gaussian-splatting/SIBR_viewers/cmake/windows/sibr_library.cmake ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ # NOTE
12
+ # This feature is used to easily download, store and link external dependencies. This
13
+ # requires to prepare pre-compiled libraries (to download). For now, packages have
14
+ # only be prepare for Windows 64-bit with Visual Studio 2012. (You should re-build
15
+ # everything if you want to use another version of Visual Studio/ another compiler).
16
+
17
+ # NOTE ABOUT UNIX SYSTEMS
18
+ # There is no need for "searching mechanism". This function is discard and your
19
+ # libraries should be installed is the standard folders that are:
20
+ #
21
+ # /usr/include/
22
+ # /usr/lib/
23
+ # /usr/lib64/
24
+ # for packages downloaded using apt-get/yum
25
+ #
26
+ # /usr/local/include/
27
+ # /usr/local/lib/
28
+ # /usr/local/lib64/
29
+ # for packages manually installed ("make install")
30
+ #
31
+ # if you encounter problems when linking (e.g. lib not found even if it is installed),
32
+ # please check these folders are in your search PATH environment variables.
33
+
34
+ set(EXTLIBS_PACKAGE_FOLDER "${CMAKE_SOURCE_DIR}/extlibs")
35
+
36
+ function(sibr_addlibrary)
37
+ if(NOT WIN32)
38
+ return()
39
+ endif()
40
+
41
+ file(MAKE_DIRECTORY ${EXTLIBS_PACKAGE_FOLDER})
42
+ cmake_parse_arguments(args "VCID" "VERBOSE;TIMEOUT;DEFAULT_USE;NAME;VERSION;MSVC11;MSVC12;MSVC14;MSVC17" "MULTI_SET;SET" ${ARGN})
43
+
44
+
45
+ if (NOT "${args_VERSION}" MATCHES "")
46
+ message(WARNING "VERSION is not implemented yet")
47
+ endif()
48
+
49
+ set(lcname "")
50
+ set(ucname "")
51
+ string(TOLOWER "${args_NAME}" lcname)
52
+ string(TOUPPER "${args_NAME}" ucname)
53
+
54
+ set(LIB_PACKAGE_FOLDER "${EXTLIBS_PACKAGE_FOLDER}/${lcname}")
55
+ win3rdParty(${ucname}
56
+ $<args_VCID:VCID>
57
+ VERBOSE ${args_VERBOSE}
58
+ TIMEOUT ${args_TIMEOUT}
59
+ DEFAULT_USE ${args_DEFAULT_USE}
60
+ MSVC11 "${LIB_PACKAGE_FOLDER}" "${args_MSVC11}"
61
+ MSVC12 "${LIB_PACKAGE_FOLDER}" "${args_MSVC12}"
62
+ MSVC14 "${LIB_PACKAGE_FOLDER}" "${args_MSVC14}" # TODO SV: make sure to build this library if required
63
+ MSVC17 "${LIB_PACKAGE_FOLDER}" "${args_MSVC17}"
64
+ SET ${args_SET}
65
+ MULTI_SET ${args_MULTI_SET}
66
+ )
67
+
68
+ # Add include/ directory
69
+ # and lib/ directories
70
+
71
+ # TODO SV: paths not matching with current hierarchy. example: libraw/libraw-0.17.1/include
72
+ # SR: The link directories will also be used to lookup for dependency DLLs to copy in the install directory.
73
+ # Some libraries put the DLLs in the bin/ directory, so we include those.
74
+ file(GLOB subdirs RELATIVE ${LIB_PACKAGE_FOLDER} ${LIB_PACKAGE_FOLDER}/*)
75
+ set(dirlist "")
76
+ foreach(dir ${subdirs})
77
+ if(IS_DIRECTORY ${LIB_PACKAGE_FOLDER}/${dir})
78
+ # message("adding ${LIB_PACKAGE_FOLDER}/${dir}/include/ to the include directories")
79
+ include_directories("${LIB_PACKAGE_FOLDER}/${dir}/include/")
80
+ # message("adding ${LIB_PACKAGE_FOLDER}/${dir}/lib[64] to the link directories")
81
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/")
82
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/lib/")
83
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/lib64/")
84
+ link_directories("${LIB_PACKAGE_FOLDER}/${dir}/bin/")
85
+ endif()
86
+ endforeach()
87
+
88
+ endfunction()
89
+
90
+ include(FetchContent)
91
+ include(git_describe)
92
+
93
+ function(sibr_gitlibrary)
94
+ cmake_parse_arguments(args "" "TARGET;GIT_REPOSITORY;GIT_TAG;ROOT_DIR;SOURCE_DIR" "INCLUDE_DIRS" ${ARGN})
95
+ if(NOT args_TARGET)
96
+ message(FATAL "Error on sibr_gitlibrary : please define your target name.")
97
+ return()
98
+ endif()
99
+
100
+ if(NOT args_ROOT_DIR)
101
+ set(args_ROOT_DIR ${args_TARGET})
102
+ endif()
103
+
104
+ if(NOT args_SOURCE_DIR)
105
+ set(args_SOURCE_DIR ${args_TARGET})
106
+ endif()
107
+
108
+ if(args_GIT_REPOSITORY AND args_GIT_TAG)
109
+ if(EXISTS ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}/.git)
110
+ git_describe(
111
+ PATH ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}
112
+ GIT_URL SIBR_GITLIBRARY_URL
113
+ GIT_BRANCH SIBR_GITLIBRARY_BRANCH
114
+ GIT_COMMIT_HASH SIBR_GITLIBRARY_COMMIT_HASH
115
+ GIT_TAG SIBR_GITLIBRARY_TAG
116
+ )
117
+
118
+ if((SIBR_GITLIBRARY_URL STREQUAL args_GIT_REPOSITORY) AND
119
+ ((SIBR_GITLIBRARY_BRANCH STREQUAL args_GIT_TAG) OR
120
+ (SIBR_GITLIBRARY_TAG STREQUAL args_GIT_TAG) OR
121
+ (SIBR_GITLIBRARY_COMMIT_HASH STREQUAL args_GIT_TAG)))
122
+ message(STATUS "Library ${args_TARGET} already available, skipping.")
123
+ set(SIBR_GITLIBRARY_DECLARED ON)
124
+ else()
125
+ message(STATUS "Adding library ${args_TARGET} from git...")
126
+ endif()
127
+ endif()
128
+
129
+ FetchContent_Declare(${args_TARGET}
130
+ GIT_REPOSITORY ${args_GIT_REPOSITORY}
131
+ GIT_TAG ${args_GIT_TAG}
132
+ GIT_SHALLOW ON
133
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}
134
+ SUBBUILD_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/subbuild
135
+ BINARY_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/build
136
+ )
137
+ FetchContent_GetProperties(${args_TARGET})
138
+ string(TOLOWER "<name>" lcTargetName)
139
+
140
+ if((NOT SIBR_GITLIBRARY_DECLARED) AND (NOT ${lcTargetName}_POPULATED))
141
+ message(STATUS "Populating library ${args_TARGET}...")
142
+ FetchContent_Populate(${args_TARGET} QUIET
143
+ GIT_REPOSITORY ${args_GIT_REPOSITORY}
144
+ GIT_TAG ${args_GIT_TAG}
145
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR}
146
+ SUBBUILD_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/subbuild
147
+ BINARY_DIR ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/build
148
+ )
149
+ endif()
150
+
151
+ add_subdirectory(${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/${args_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/extlibs/${args_ROOT_DIR}/build)
152
+
153
+ get_target_property(type ${args_TARGET} TYPE)
154
+ if(NOT (type STREQUAL "INTERFACE_LIBRARY"))
155
+ set_target_properties(${args_TARGET} PROPERTIES FOLDER "extlibs")
156
+ endif()
157
+
158
+ list(APPEND ${args_TARGET}_INCLUDE_DIRS ${EXTLIBS_PACKAGE_FOLDER}/${args_ROOT_DIR})
159
+ list(APPEND ${args_TARGET}_INCLUDE_DIRS ${EXTLIBS_PACKAGE_FOLDER}/${args_ROOT_DIR}/${args_SOURCE_DIR})
160
+
161
+ foreach(args_INCLUDE_DIR ${args_INCLUDE_DIRS})
162
+ list(APPEND ${args_TARGET}_INCLUDE_DIRS ${EXTLIBS_PACKAGE_FOLDER}/${args_ROOT_DIR}/${args_SOURCE_DIR}/${args_INCLUDE_DIR})
163
+ endforeach()
164
+
165
+ include_directories(${${args_TARGET}_INCLUDE_DIRS})
166
+ else()
167
+ message(FATAL "Error on sibr_gitlibrary for target ${args_TARGET}: missing git tag or git url.")
168
+ endif()
169
+ endfunction()
submodule/gaussian-splatting/SIBR_viewers/docs/CMakeLists.txt ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2020, Inria
2
+ # GRAPHDECO research group, https://team.inria.fr/graphdeco
3
+ # All rights reserved.
4
+ #
5
+ # This software is free for non-commercial, research and evaluation use
6
+ # under the terms of the LICENSE.md file.
7
+ #
8
+ # For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
9
+
10
+
11
+ #########################################################
12
+ # Include doxygen documentation target
13
+ #########################################################
14
+ option(BUILD_DOCUMENTATION "build doxygen documentation ('Build' DOCUMENTATION target, and find the compiled docs in install/docs/index.html)" OFF)
15
+ if(BUILD_DOCUMENTATION)
16
+ set(DOXYGEN_REQUIRED_VERSION "1.8.17")
17
+ find_package(Doxygen)
18
+ if(NOT DOXYGEN_FOUND)
19
+ message(FATAL_ERROR "Doxygen not found, unable to generate documentation.")
20
+ elseif(DOXYGEN_VERSION VERSION_LESS DOXYGEN_REQUIRED_VERSION)
21
+ message(FATAL_ERROR "Doxygen version is less than ${DOXYGEN_REQUIRED_VERSION} (Current version is ${DOXYGEN_VERSION}).")
22
+ else()
23
+ set(DOXY_DOC_DEST_DIR ${CMAKE_INSTALL_ROOT}/docs) ## used in the doxyfile.in
24
+
25
+ set(DOXY_DOC_INPUT_ROOT_DIRS "${CMAKE_HOME_DIRECTORY}/src ${CMAKE_HOME_DIRECTORY}/docs ${CMAKE_CURRENT_BINARY_DIR}/generated") ## used in the doxyfile.in
26
+ set(DOXY_DOC_EXCLUDE_PATTERNS_DIRS "${DOXY_DOC_EXCLUDE_PATTERNS_DIRS}") ## used in the doxyfile.in
27
+ set(DOXY_DOC_COMMON_IMG_PATH "${CMAKE_CURRENT_SOURCE_DIR}/img ${CMAKE_HOME_DIRECTORY}/src/projects")
28
+ set(DOXY_DOC_PAGES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/pages")
29
+ set(DOXY_DOC_GENERATED_DOC_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated")
30
+
31
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_SAMPLES_SUBPAGE_REF "${SIBR_PROJECTS_SAMPLES_SUBPAGE_REF}")
32
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_OURS_SUBPAGE_REF "${SIBR_PROJECTS_OURS_SUBPAGE_REF}")
33
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_TOOLBOX_SUBPAGE_REF "${SIBR_PROJECTS_TOOLBOX_SUBPAGE_REF}")
34
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_OTHERS_SUBPAGE_REF "${SIBR_PROJECTS_OTHERS_SUBPAGE_REF}")
35
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_SAMPLES_REF_REF "${SIBR_PROJECTS_SAMPLES_REF_REF}")
36
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_OURS_REF_REF "${SIBR_PROJECTS_OURS_REF_REF}")
37
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_TOOLBOX_REF_REF "${SIBR_PROJECTS_TOOLBOX_REF_REF}")
38
+ string(REPLACE "\\" "\\\\" SIBR_PROJECTS_OTHERS_REF_REF "${SIBR_PROJECTS_OTHERS_REF_REF}")
39
+
40
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_SAMPLES_SUBPAGE_REF "${SIBR_PROJECTS_SAMPLES_SUBPAGE_REF}")
41
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_OURS_SUBPAGE_REF "${SIBR_PROJECTS_OURS_SUBPAGE_REF}")
42
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_TOOLBOX_SUBPAGE_REF "${SIBR_PROJECTS_TOOLBOX_SUBPAGE_REF}")
43
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_OTHERS_SUBPAGE_REF "${SIBR_PROJECTS_OTHERS_SUBPAGE_REF}")
44
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_SAMPLES_REF_REF "${SIBR_PROJECTS_SAMPLES_REF_REF}")
45
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_OURS_REF_REF "${SIBR_PROJECTS_OURS_REF_REF}")
46
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_TOOLBOX_REF_REF "${SIBR_PROJECTS_TOOLBOX_REF_REF}")
47
+ string(REPLACE "\n" "\\n" SIBR_PROJECTS_OTHERS_REF_REF "${SIBR_PROJECTS_OTHERS_REF_REF}")
48
+
49
+ file(GLOB doxygen_config_files "*.in")
50
+ foreach(filename ${doxygen_config_files})
51
+ message(STATUS "Generating ${filename}...")
52
+ get_filename_component(output_filename ${filename} NAME_WLE)
53
+ message(STATUS "Output in ${CMAKE_CURRENT_BINARY_DIR}/${output_filename}...")
54
+ configure_file(${filename} ${CMAKE_CURRENT_BINARY_DIR}/${output_filename} @ONLY)
55
+ endforeach()
56
+
57
+ add_custom_target(DOCUMENTATION ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/doxygen_prebuild.cmake
58
+ COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doxyfile"
59
+ WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}
60
+ COMMENT "Building user's documentation into ${DOXY_DOC_DEST_DIR} dir..."
61
+ )
62
+ endif()
63
+ endif()
submodule/gaussian-splatting/SIBR_viewers/docs/doxyfile.in ADDED
The diff for this file is too large to render. See raw diff
 
submodule/gaussian-splatting/SIBR_viewers/docs/doxygen_prebuild.cmake.in ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(SIBR_PROJECTS_SAMPLES_SUBPAGE_REF "@SIBR_PROJECTS_SAMPLES_SUBPAGE_REF@")
2
+ set(SIBR_PROJECTS_OURS_SUBPAGE_REF "@SIBR_PROJECTS_OURS_SUBPAGE_REF@")
3
+ set(SIBR_PROJECTS_TOOLBOX_SUBPAGE_REF "@SIBR_PROJECTS_TOOLBOX_SUBPAGE_REF@")
4
+ set(SIBR_PROJECTS_OTHERS_SUBPAGE_REF "@SIBR_PROJECTS_OTHERS_SUBPAGE_REF@")
5
+ set(SIBR_PROJECTS_SAMPLES_REF_REF "@SIBR_PROJECTS_SAMPLES_REF_REF@")
6
+ set(SIBR_PROJECTS_OURS_REF_REF "@SIBR_PROJECTS_OURS_REF_REF@")
7
+ set(SIBR_PROJECTS_TOOLBOX_REF_REF "@SIBR_PROJECTS_TOOLBOX_REF_REF@")
8
+ set(SIBR_PROJECTS_OTHERS_REF_REF "@SIBR_PROJECTS_OTHERS_REF_REF@")
9
+ set(DOXY_DOC_DEST_DIR "@DOXY_DOC_DEST_DIR@")
10
+ set(DOXY_DOC_GENERATED_DOC_DIR "@DOXY_DOC_GENERATED_DOC_DIR@")
11
+ set(DOXY_DOC_PAGES_DIR "@DOXY_DOC_PAGES_DIR@")
12
+
13
+ ## Cleaning documentation folders
14
+ file(REMOVE_RECURSE "${DOXY_DOC_GENERATED_DOC_DIR}")
15
+ file(REMOVE_RECURSE "${DOXY_DOC_DEST_DIR}")
16
+
17
+ ## Generating documentation pages with variables
18
+ file(GLOB_RECURSE doc_files "${DOXY_DOC_PAGES_DIR}/*.in")
19
+ foreach(filename ${doc_files})
20
+ message(STATUS "Generating ${filename}...")
21
+ get_filename_component(output_filename ${filename} NAME_WLE)
22
+ message(STATUS "Output in ${DOXY_DOC_GENERATED_DOC_DIR}/${output_filename}...")
23
+ configure_file(${filename} ${DOXY_DOC_GENERATED_DOC_DIR}/${output_filename} @ONLY)
24
+ endforeach()
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealaddinputs.png ADDED
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealalignimages.png ADDED
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealcolorizesimplify.png ADDED
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealexportmodel.png ADDED
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealinputsonly.png ADDED

Git LFS Details

  • SHA256: 64dae1bade3362d70ce42d31f448adfd97dacb685118ad692454de55316e10c5
  • Pointer size: 131 Bytes
  • Size of remote file: 118 kB
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealmesh.png ADDED

Git LFS Details

  • SHA256: 3f9ea27918492696717875cdadfa1854c591456b3bfdfd10ae41fc9419151888
  • Pointer size: 131 Bytes
  • Size of remote file: 371 kB
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealmeshreconstruction.png ADDED
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealnew.png ADDED
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/caprealpointcloud.png ADDED

Git LFS Details

  • SHA256: 9e0673db0bcf142b50dba501cf9126620704a876ff383b3284fca8f0d792b938
  • Pointer size: 131 Bytes
  • Size of remote file: 276 kB
submodule/gaussian-splatting/SIBR_viewers/docs/img/capreal/meshlab.png ADDED

Git LFS Details

  • SHA256: dbfff276c63cb65d5fa64e477c413f5863c46b6b531aaf1ff4c09c3cdec5bf14
  • Pointer size: 131 Bytes
  • Size of remote file: 683 kB
submodule/gaussian-splatting/SIBR_viewers/docs/img/cmake.gif ADDED
submodule/gaussian-splatting/SIBR_viewers/docs/img/diagramas/class/sibr_classes_v2.png ADDED

Git LFS Details

  • SHA256: e3fed9ccdb41e7aa2ef20bece935985d1e94489bfdfdf41979aa74912892c543
  • Pointer size: 131 Bytes
  • Size of remote file: 213 kB