Skip to content

Commit

Permalink
absorb metal cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
briaguya-ai committed May 2, 2024
1 parent 33ede26 commit 702467a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 212 deletions.
202 changes: 0 additions & 202 deletions extern/metal-cpp/LICENSE.txt

This file was deleted.

9 changes: 2 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ target_sources(libultraship PRIVATE ${Source_Files__Resource} ${Source_Files__Re

#=================== Graphic ===================

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

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

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

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

#=================== metal-cpp ===================

if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
target_include_directories(libultraship PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../extern/metal-cpp)
endif()

#=================== Packages & Includes ===================

target_include_directories(libultraship
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/Fast3D/gfx_metal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define NS_PRIVATE_IMPLEMENTATION
#define CA_PRIVATE_IMPLEMENTATION
#define MTL_PRIVATE_IMPLEMENTATION
#include <Metal/Metal.hpp>
#include "metal-cpp/Metal.hpp"
#include <SDL_render.h>
#include <imgui_impl_metal.h>
#include <spdlog/spdlog.h>
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/Fast3D/gfx_metal_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#ifdef __APPLE__

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

#include "gfx_metal_shader.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19556,4 +19556,3 @@ _MTL_INLINE void MTL::VisibleFunctionTable::setFunctions(const MTL::FunctionHand
((major < METALCPP_VERSION_MAJOR) || \
(major == METALCPP_VERSION_MAJOR && minor < METALCPP_VERSION_MINOR) || \
(major == METALCPP_VERSION_MAJOR && minor == METALCPP_VERSION_MINOR && patch <= METALCPP_VERSION_PATCH))

0 comments on commit 702467a

Please sign in to comment.