Add glfw, imgui and cmake metal dependencies

Signed-off-by: renderexpert <expert@renderconsulting.co.uk>
This commit is contained in:
renderexpert 2025-01-10 19:56:37 +00:00 committed by Konstantin Pastbin
parent a54f5268cd
commit 2bdf6763ce
9 changed files with 111 additions and 0 deletions

View file

@ -61,6 +61,10 @@ jobs:
libgl1-mesa-dev \
libglvnd-dev \
libharfbuzz-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
qt6-base-dev \
libqt6svg6-dev \
qt6-positioning-dev \
@ -128,6 +132,10 @@ jobs:
libgl1-mesa-dev \
libglvnd-dev \
libharfbuzz-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
qt6-base-dev \
libqt6svg6-dev \
qt6-positioning-dev \

9
.gitmodules vendored
View file

@ -56,3 +56,12 @@
[submodule "3party/utfcpp"]
path = 3party/utfcpp
url = https://github.com/nemtrif/utfcpp.git
[submodule "3party/glfw"]
path = 3party/glfw
url = https://github.com/glfw/glfw.git
[submodule "3party/CMake-MetalShaderSupport"]
path = 3party/CMake-MetalShaderSupport
url = https://github.com/dpogue/CMake-MetalShaderSupport.git
[submodule "3party/imgui/imgui"]
path = 3party/imgui/imgui
url = https://github.com/ocornut/imgui

@ -0,0 +1 @@
Subproject commit 989857d2e5e54869c35ad06fb21a67d12a2dbc67

View file

@ -66,4 +66,18 @@ add_subdirectory(vulkan_wrapper)
if (PLATFORM_DESKTOP)
add_subdirectory(libtess2)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "")
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "")
set(GLFW_BUILD_TESTS OFF CACHE BOOL "")
set(GLFW_INSTALL OFF CACHE BOOL "")
set(GLFW_VULKAN_STATIC OFF CACHE BOOL "")
set(GLFW_BUILD_WAYLAND OFF CACHE BOOL "")
# Disable ARC for glfw and re-enable after it because it's globally set in the root CMakeLists.txt
set(CMAKE_OBJC_FLAGS "")
add_subdirectory(glfw)
set_target_properties(glfw PROPERTIES UNITY_BUILD OFF)
set(CMAKE_OBJC_FLAGS -fobjc-arc)
add_subdirectory(imgui)
endif()

1
3party/glfw Submodule

@ -0,0 +1 @@
Subproject commit 21fea01161e0d6b70c0c5c1f52dc8e7a7df14a50

View file

@ -0,0 +1,16 @@
project(imgui)
set(SRC
imgui/imgui_draw.cpp
imgui/imgui_tables.cpp
imgui/imgui_widgets.cpp
imgui/imgui.cpp
imgui/backends/imgui_impl_glfw.cpp
)
add_library(${PROJECT_NAME} ${SRC})
target_include_directories(${PROJECT_NAME}
PRIVATE ${OMIM_ROOT}/3party/glfw/include
PUBLIC ${OMIM_ROOT}/3party/imgui/imgui
PUBLIC .
)

1
3party/imgui/imgui Submodule

@ -0,0 +1 @@
Subproject commit 6982ce43f5b143c5dce5fab0ce07dd4867b705ae

View file

@ -155,6 +155,12 @@
<li><a href="https://chromium.googlesource.com/chromium/src/courgette/">Chromium's Courgette</a>;
<a href="#bsd3-license" class="license">BSD License</a></li>
<li><a href="https://github.com/dpogue/CMake-MetalShaderSupport">CMake Metal support files</a><br>
&copy; 2024 Darryl Pogue and Contributors;<a href="#cmake-support-license" class="license">License</a></li>
<li><a href="https://github.com/ocornut/imgui">Dear ImGui</a><br>
&copy; 2014-2025 Omar Cornut; <a href="#mit-license" class="license">MIT License</a></li>
<li><a href="https://libexpat.github.io">Expat</a><br>&copy; 1998&ndash;2000 Thai Open Source Software Center Ltd and Clark Cooper,
&copy; 2001&ndash;2019 Expat maintainers; <a href="#mit-license" class="license">MIT License</a></li>
@ -164,6 +170,9 @@
<li><a href="http://www.freetype.org">FreeType</a><br>
&copy; 2013 The FreeType Project; <a href="#freetype-license" class="license">FTL</a></li>
<li><a href="https://www.glfw.org/">GLFW</a><br>
&copy; 2002-2006 Marcus Geelnard;2006-2019 Camilla Löwy; <a href="#zlib-license" class="license">Zlib License</a></li>
<li><a href="http://www.g-truc.net/project-0016.html">GLM</a><br>
&copy; 2005&ndash;2014 G-Truc Creation; <a href="#mit-license" class="license">MIT License</a></li>
@ -1058,6 +1067,54 @@ of the copyright holder.</p>
</div>
<div class="section">
<h2 id="cmake-support-license">CMake Metal support files</h2>
<p>Copyright 2024 Darryl Pogue and Contributors</p>
<p>All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p>
<p>* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</p>
<p>* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</p>
<p>* Neither the name of Kitware, Inc. nor the names of Contributors may be used to endorse or promote products derived from this software without specific prior written permission.</p>
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
<p>------------------------------------------------------------------------------</p>
<p>See version control history for details of individual contributions.</p>
<p>The above copyright and license notice applies to distributions of
CMake in source and binary form. Third-party software packages supplied
with CMake under compatible licenses provide their own copyright notices
documented in corresponding subdirectories or source files.</p>
<p>------------------------------------------------------------------------------</p>
<p>CMake was initially developed by Kitware with the following sponsorship:</p>
<p>* National Library of Medicine at the National Institutes of Health as part of the Insight Segmentation and Registration Toolkit (ITK).</p>
<p>* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel Visualization Initiative.</p>
<p>* National Alliance for Medical Image Computing (NAMIC) is funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.</p>
<p>* Kitware, Inc.</p>
</div>
<div class="section">
<h2 id="freetype-license">The FreeType Project License</h2>

View file

@ -115,6 +115,10 @@ sudo apt update && sudo apt install -y \
libqt6positioning6-plugins \
libqt6positioning6 \
libsqlite3-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
zlib1g-dev
```