Skip to content

Commit b567628

Browse files
committed
add mgl library
1 parent 181a0af commit b567628

File tree

7 files changed

+40
-0
lines changed

7 files changed

+40
-0
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,6 @@
121121
[submodule "externals/wamr/zydis"]
122122
path = externals/wamr/zydis
123123
url = https://github.com/zyantific/zydis.git
124+
[submodule "externals/mgl/mgl"]
125+
path = externals/mgl/mgl
126+
url = https://github.com/openglonmetal/MGL.git

cmake/cage_copy_redist.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function(cage_copy_redist)
2727
cage_copy_redist_license("${cage_copy_redist_current_list_dir}/../externals/hsluv/hsluv.h" "hsluv" COPYONLY)
2828
cage_copy_redist_license("${cage_copy_redist_current_list_dir}/../externals/jpeg/jpeg/LICENSE.md" "jpeg" COPYONLY)
2929
cage_copy_redist_license("${cage_copy_redist_current_list_dir}/../externals/mbedtls/mbedtls/LICENSE" "mbedtls" COPYONLY)
30+
cage_copy_redist_license("${cage_copy_redist_current_list_dir}/../externals/mgl/mgl/LICENSE" "mgl" COPYONLY)
3031
cage_copy_redist_license("${cage_copy_redist_current_list_dir}/../externals/msdfgen/msdfgen/LICENSE.txt" "msdfgen" COPYONLY)
3132
cage_copy_redist_license("${cage_copy_redist_current_list_dir}/../externals/ogg/ogg/COPYING" "ogg" COPYONLY)
3233
cage_copy_redist_license("${cage_copy_redist_current_list_dir}/../externals/openxr-sdk/OpenXR-SDK/LICENSE" "openxr-sdk" COPYONLY)

externals/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ add_subdirectory(fastnoise)
9696
add_subdirectory(glad)
9797
add_subdirectory(glfw)
9898
add_subdirectory(glm)
99+
add_subdirectory(mgl)
99100
add_subdirectory(openxr-sdk)
100101
add_subdirectory(plf)
101102
add_subdirectory(simplefilewatcher)
@@ -191,6 +192,7 @@ external_target_properties(libzstd_static)
191192
external_target_properties(mbedcrypto)
192193
external_target_properties(mbedtls)
193194
external_target_properties(mbedx509)
195+
external_target_properties(mgl)
194196
external_target_properties(ogg)
195197
external_target_properties(openxr_loader)
196198
external_target_properties(p256m)

externals/glfw/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ message(STATUS "----------------------------------------------------------------
22
message(STATUS "glfw")
33
message(STATUS "----------------------------------------------------------------")
44

5+
if(APPLE)
6+
message(STATUS "skipping on macos - it is provided with mgl")
7+
return()
8+
endif()
9+
510
set(GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "Build the GLFW example programs")
611
set(GLFW_BUILD_TESTS OFF CACHE INTERNAL "Build the GLFW test programs")
712
set(GLFW_BUILD_DOCS OFF CACHE INTERNAL "Build the GLFW documentation")

externals/glm/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ message(STATUS "----------------------------------------------------------------
22
message(STATUS "glm")
33
message(STATUS "----------------------------------------------------------------")
44

5+
if(APPLE)
6+
message(STATUS "skipping on macos - it is provided with mgl")
7+
return()
8+
endif()
9+
510
add_library(glm INTERFACE)
611
target_include_directories(glm INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/glm")
712

externals/mgl/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
message(STATUS "----------------------------------------------------------------")
2+
message(STATUS "mgl")
3+
message(STATUS "----------------------------------------------------------------")
4+
5+
if(NOT APPLE)
6+
message(STATUS "mgl is used on macos only - skipping")
7+
return()
8+
endif()
9+
10+
include(ExternalProject)
11+
12+
ExternalProject_Add(mgl
13+
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/mgl_build
14+
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mgl
15+
CONFIGURE_COMMAND "" # skip ./configure
16+
BUILD_COMMAND make
17+
INSTALL_COMMAND "" # skip installation
18+
)
19+
20+
add_library(glfw INTERFACE)
21+
add_library(glm INTERFACE)
22+
23+
add_dependencies(glfw mgl)

externals/mgl/mgl

Submodule mgl added at 792cbab

0 commit comments

Comments
 (0)