mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-07 23:15:52 +01:00
20 lines
532 B
CMake
20 lines
532 B
CMake
if (APPLE)
|
|
add_library (imgui-metal OBJECT
|
|
"${CMAKE_CURRENT_LIST_DIR}/imgui_impl_metal.mm"
|
|
)
|
|
|
|
target_link_libraries (imgui-metal PUBLIC
|
|
imgui
|
|
"-framework Cocoa" "-framework Metal" "-framework QuartzCore"
|
|
)
|
|
|
|
target_include_directories (imgui-metal PUBLIC "${CMAKE_CURRENT_LIST_DIR}")
|
|
|
|
set_property (
|
|
TARGET imgui-metal
|
|
APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc"
|
|
)
|
|
else ()
|
|
message (WARNING "IMGUI_IMPL_METAL set to ON but platform is not Apple")
|
|
endif ()
|