-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
47 lines (37 loc) · 994 Bytes
/
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
41
42
43
44
45
46
47
# This file is stolen from vcpkg
# https://github.com/Microsoft/vcpkg/blob/master/ports/imgui/CMakeLists.txt
cmake_minimum_required(VERSION 3.8)
project(imgui CXX)
set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
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
)
add_library(${PROJECT_NAME}
${IMGUI_INCLUDES_PUBLIC}
${IMGUI_INCLUDES_PRIVATE}
${IMGUI_SOURCES}
)
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
install(TARGETS ${PROJECT_NAME}
EXPORT IMGUIExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(EXPORT IMGUIExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION share/${PROJECT_NAME})
if(NOT IMGUI_SKIP_HEADERS)
install(
FILES ${IMGUI_INCLUDES_PUBLIC}
DESTINATION include
)
endif()