vcpkg/ports/imgui/CMakeLists.txt

58 lines
1.1 KiB
CMake
Raw Normal View History

2017-10-09 18:48:44 +08:00
cmake_minimum_required(VERSION 3.8)
project(imgui CXX)
set(CMAKE_DEBUG_POSTFIX d)
2017-10-09 18:48:44 +08:00
set(IMGUI_INCLUDES_PUBLIC
imgui.h
imconfig.h
)
set(IMGUI_INCLUDES_PRIVATE
imgui_internal.h
imstb_textedit.h
2017-10-09 18:48:44 +08:00
)
set(IMGUI_SOURCES
imgui.cpp
imgui_demo.cpp
imgui_draw.cpp
2018-09-06 21:40:22 +08:00
imgui_widgets.cpp
2017-10-09 18:48:44 +08:00
)
2018-01-04 19:46:21 +08:00
add_library(${PROJECT_NAME}
2017-10-09 18:48:44 +08:00
${IMGUI_INCLUDES_PUBLIC}
${IMGUI_INCLUDES_PRIVATE}
${IMGUI_SOURCES}
)
file(GLOB IMGUI_BINDINGS ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_* )
2018-01-04 19:46:21 +08:00
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
install(TARGETS ${PROJECT_NAME}
EXPORT IMGUIExport
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
2017-10-09 18:48:44 +08:00
ARCHIVE DESTINATION lib
)
2018-01-04 19:46:21 +08:00
install(EXPORT IMGUIExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION share/${PROJECT_NAME})
2017-10-09 18:48:44 +08:00
if(NOT IMGUI_SKIP_HEADERS)
install(
FILES ${IMGUI_INCLUDES_PUBLIC}
DESTINATION include
)
endif()
if(IMGUI_COPY_BINDINGS)
install(
FILES ${IMGUI_INCLUDES_PRIVATE}
DESTINATION include
)
install(
FILES ${IMGUI_BINDINGS}
DESTINATION include/bindings
)
endif()