-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
32 lines (28 loc) · 1.14 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
cmake_minimum_required(VERSION 3.17)
project(imgui-clap-support C CXX)
if (NOT IMGUI_SOURCE_DIR)
message(FATAL "You must define IMGUI_SOURCE_DIR before including these extensions")
endif()
add_library(${PROJECT_NAME} STATIC
${IMGUI_SOURCE_DIR}/imgui.cpp
${IMGUI_SOURCE_DIR}/imgui_tables.cpp
${IMGUI_SOURCE_DIR}/imgui_widgets.cpp
${IMGUI_SOURCE_DIR}/imgui_draw.cpp
)
target_include_directories(${PROJECT_NAME} PUBLIC include)
target_include_directories(${PROJECT_NAME} PUBLIC ${IMGUI_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} PUBLIC clap-core)
if (APPLE)
target_sources(${PROJECT_NAME} PRIVATE
src/macos-osxnative-metal.mm
${IMGUI_SOURCE_DIR}/backends/imgui_impl_metal.mm
)
target_link_libraries(${PROJECT_NAME} PUBLIC "-framework CoreFoundation" "-framework GameController" "-framework Cocoa" "-framework Metal" "-framework MetalKit")
endif()
if(WIN32)
target_sources(${PROJECT_NAME} PRIVATE
src/win-dx12.cpp
${IMGUI_SOURCE_DIR}/backends/imgui_impl_win32.cpp
${IMGUI_SOURCE_DIR}/backends/imgui_impl_dx12.cpp
)
endif()