Skip to content

Commit 890042f

Browse files
committed
fixing builds
1 parent 0cea2b2 commit 890042f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CMakeLists.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ endif()
180180

181181
# set(HELLOIMGUI_USE_GLFW_METAL ON)
182182
set(HELLOIMGUI_USE_GLFW_OPENGL3 ON)
183-
CPMAddPackage("gh:pthom/hello_imgui#0c8e5e848738dd7160485d96da3aa9e9033c62ad")
183+
CPMAddPackage("gh:pthom/hello_imgui#8abe2c98dbf99e3a098eb5548b0a079c9f4c8a8f")
184184
if(hello_imgui_ADDED)
185185
message(STATUS "hello_imgui library added")
186186
endif()
@@ -331,17 +331,20 @@ set(HELLO_IMGUI_BUNDLE_VERSION ${VERSION})
331331
set(HELLO_IMGUI_BUNDLE_SHORT_VERSION ${VERSION})
332332
set(HELLO_IMGUI_BUNDLE_ICON_FILE icon.icns)
333333

334+
if(APPLE AND (HELLOIMGUI_USE_GLFW_METAL OR HELLOIMGUI_USE_SDL_METAL))
335+
list(APPEND EXTRA_SOURCES src/renderpass_metal.mm src/shader_metal.mm)
336+
endif()
337+
334338
hello_imgui_add_app(
335339
SamplinSafari
336340
src/app.cpp
337341
${CMAKE_CURRENT_BINARY_DIR}/src/common.cpp
338342
src/opengl_check.cpp
339343
src/shader.cpp
340344
src/shader_gl.cpp
341-
src/shader_metal.mm
342345
src/export_to_file.cpp
343346
src/renderpass_gl.cpp
344-
src/renderpass_metal.mm
347+
${EXTRA_SOURCES}
345348
ASSETS_LOCATION
346349
${CMAKE_CURRENT_BINARY_DIR}/assets
347350
)

src/renderpass_gl.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "renderpass.h"
66

77
#include <fmt/core.h>
8+
#include <stdexcept>
89

910
RenderPass::RenderPass(bool write_depth, bool clear) :
1011
m_clear(clear), m_clear_color(0, 0, 0, 0), m_clear_depth(1.f), m_viewport_offset(0), m_viewport_size(0),

0 commit comments

Comments
 (0)