Skip to content

Commit 8f12a69

Browse files
committed
absorb metal cpp
1 parent 33ede26 commit 8f12a69

File tree

5 files changed

+4
-211
lines changed

5 files changed

+4
-211
lines changed

extern/metal-cpp/LICENSE.txt

-202
This file was deleted.

src/CMakeLists.txt

+2-7
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ target_sources(libultraship PRIVATE ${Source_Files__Resource} ${Source_Files__Re
134134

135135
#=================== Graphic ===================
136136

137-
file(GLOB Source_Files__Graphic RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "graphic/Fast3D/*.h" "graphic/Fast3D/*.cpp" "graphic/Fast3D/*.c")
137+
file(GLOB Source_Files__Graphic RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "graphic/Fast3D/*.h" "graphic/Fast3D/*.hpp" "graphic/Fast3D/*.cpp" "graphic/Fast3D/*.c")
138138

139139
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
140140
list(FILTER Source_Files__Graphic EXCLUDE REGEX "graphic/Fast3D/gfx_dxgi*")
@@ -144,6 +144,7 @@ endif()
144144

145145
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
146146
list(FILTER Source_Files__Graphic EXCLUDE REGEX "graphic/Fast3D/gfx_metal*")
147+
list(FILTER Source_Files__Graphic EXCLUDE REGEX "graphic/Fast3D/metal-cpp/*")
147148
endif()
148149

149150
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
@@ -153,12 +154,6 @@ endif()
153154
source_group("graphic" FILES ${Source_Files__Graphic})
154155
target_sources(libultraship PRIVATE ${Source_Files__Graphic})
155156

156-
#=================== metal-cpp ===================
157-
158-
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
159-
target_include_directories(libultraship PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../extern/metal-cpp)
160-
endif()
161-
162157
#=================== Packages & Includes ===================
163158

164159
target_include_directories(libultraship

src/graphic/Fast3D/gfx_metal.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define NS_PRIVATE_IMPLEMENTATION
2727
#define CA_PRIVATE_IMPLEMENTATION
2828
#define MTL_PRIVATE_IMPLEMENTATION
29-
#include <Metal/Metal.hpp>
29+
#include "metal-cpp/Metal.hpp"
3030
#include <SDL_render.h>
3131
#include <imgui_impl_metal.h>
3232
#include <spdlog/spdlog.h>

src/graphic/Fast3D/gfx_metal_shader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#ifdef __APPLE__
99

10-
#include <Metal/Metal.hpp>
10+
#include "metal-cpp/Metal.hpp"
1111

1212
#include "gfx_metal_shader.h"
1313

File renamed without changes.

0 commit comments

Comments
 (0)