-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
40 lines (36 loc) · 1.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.18)
project(hello-metal)
set(CMAKE_CXX_STANDARD 20)
add_subdirectory(dependencies/glfw)
# glcume
add_executable(hello-metal
"src/metal.mm"
"src/hello-metal.cpp"
# imgui
"dependencies/imgui/imgui.cpp"
"dependencies/imgui/backends/imgui_impl_glfw.cpp"
"dependencies/imgui/backends/imgui_impl_metal.mm"
"dependencies/imgui/imgui_draw.cpp"
"dependencies/imgui/imgui_tables.cpp"
"dependencies/imgui/imgui_widgets.cpp"
)
target_link_libraries(hello-metal
"-framework AppKit"
"-framework QuartzCore"
"-framework Metal"
"-framework GameController"
)
target_include_directories(hello-metal PUBLIC
"include"
"dependencies"
"dependencies/imgui"
"dependencies/glm"
"dependencies/glfw/include"
"dependencies/metal-cpp/include"
)
target_compile_definitions(hello-metal PUBLIC IMGUI_IMPL_METAL_CPP)
target_link_libraries(hello-metal glfw)
set_target_properties(hello-metal PROPERTIES
LINK_FLAGS "-ObjC"
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")