Commit 8f0cbf0 1 parent 33ede26 commit 8f0cbf0 Copy full SHA for 8f0cbf0
File tree 3 files changed +20
-8
lines changed
3 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,22 @@ if (NOT ${libzip_FOUND})
69
69
list (APPEND ADDITIONAL_LIB_INCLUDES ${libzip_SOURCE_DIR} /lib ${libzip_BINARY_DIR} )
70
70
endif ()
71
71
72
+ #=================== Metal-cpp ===================
73
+ FetchContent_Declare(
74
+ metalcpp
75
+ GIT_REPOSITORY https://github.com/briaguya-ai/single-header-metal-cpp.git
76
+ GIT_TAG origin/metal-cpp_macOS12_iOS15
77
+ )
78
+ FetchContent_MakeAvailable(metalcpp)
79
+ list (APPEND ADDITIONAL_LIB_INCLUDES ${metalcpp_SOURCE_DIR} )
80
+
72
81
#=================== ImGui ===================
73
82
target_sources (ImGui
74
83
PRIVATE
75
84
${imgui_SOURCE_DIR} /backends/imgui_impl_metal.mm
76
85
)
77
86
78
- target_include_directories (ImGui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /extern/metal-cpp )
87
+ target_include_directories (ImGui PRIVATE ${metalcpp_SOURCE_DIR} )
79
88
target_compile_definitions (ImGui PUBLIC IMGUI_IMPL_METAL_CPP)
80
89
81
90
target_link_libraries (ImGui PUBLIC SDL2::SDL2-static SDL2::SDL2main)
Original file line number Diff line number Diff line change @@ -14,13 +14,22 @@ if (NOT ${spdlog_FOUND})
14
14
FetchContent_MakeAvailable(spdlog)
15
15
endif ()
16
16
17
+ #=================== Metal-cpp ===================
18
+ FetchContent_Declare(
19
+ metalcpp
20
+ GIT_REPOSITORY https://github.com/briaguya-ai/single-header-metal-cpp.git
21
+ GIT_TAG origin/metal-cpp_macOS12_iOS15
22
+ )
23
+ FetchContent_MakeAvailable(metalcpp)
24
+ list (APPEND ADDITIONAL_LIB_INCLUDES ${metalcpp_SOURCE_DIR} )
25
+
17
26
#=================== ImGui ===================
18
27
target_sources (ImGui
19
28
PRIVATE
20
29
${imgui_SOURCE_DIR} /backends/imgui_impl_metal.mm
21
30
)
22
31
23
- target_include_directories (ImGui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} /extern/metal-cpp )
32
+ target_include_directories (ImGui PRIVATE ${metalcpp_SOURCE_DIR} )
24
33
target_compile_definitions (ImGui PUBLIC IMGUI_IMPL_METAL_CPP)
25
34
26
35
find_package (SDL2 REQUIRED)
Original file line number Diff line number Diff line change @@ -153,12 +153,6 @@ endif()
153
153
source_group ("graphic" FILES ${Source_Files__Graphic} )
154
154
target_sources (libultraship PRIVATE ${Source_Files__Graphic} )
155
155
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
-
162
156
#=================== Packages & Includes ===================
163
157
164
158
target_include_directories (libultraship
You can’t perform that action at this time.
0 commit comments