2017-10-09 18:48:44 +08:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
|
|
|
project(imgui CXX)
|
|
|
|
|
2017-10-15 13:26:06 +08:00
|
|
|
set(CMAKE_DEBUG_POSTFIX d)
|
|
|
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
|
|
|
2017-10-09 18:48:44 +08:00
|
|
|
find_path(STB_INCLUDE_DIR stb_rect_pack.h stb_textedit.h stb_truetype.h)
|
|
|
|
|
|
|
|
set(IMGUI_INCLUDES_PUBLIC
|
|
|
|
imgui.h
|
|
|
|
imconfig.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(IMGUI_INCLUDES_PRIVATE
|
|
|
|
imgui_internal.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(IMGUI_SOURCES
|
|
|
|
imgui.cpp
|
|
|
|
imgui_demo.cpp
|
|
|
|
imgui_draw.cpp
|
|
|
|
)
|
|
|
|
|
2017-10-15 13:26:06 +08:00
|
|
|
add_library(imgui
|
2017-10-09 18:48:44 +08:00
|
|
|
${IMGUI_INCLUDES_PUBLIC}
|
|
|
|
${IMGUI_INCLUDES_PRIVATE}
|
|
|
|
${IMGUI_SOURCES}
|
|
|
|
)
|
|
|
|
|
2017-10-15 13:26:06 +08:00
|
|
|
target_include_directories(imgui PUBLIC ${STB_INCLUDE_DIR})
|
2017-10-09 18:48:44 +08:00
|
|
|
|
|
|
|
install(TARGETS imgui
|
2017-10-15 13:26:06 +08:00
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
2017-10-09 18:48:44 +08:00
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT IMGUI_SKIP_HEADERS)
|
|
|
|
install(
|
|
|
|
FILES ${IMGUI_INCLUDES_PUBLIC}
|
|
|
|
DESTINATION include
|
|
|
|
)
|
|
|
|
endif()
|