mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Add port for imgui library
This commit is contained in:
parent
d7c60c2048
commit
3e4b7edb79
45
ports/imgui/CMakeLists.txt
Normal file
45
ports/imgui/CMakeLists.txt
Normal file
@ -0,0 +1,45 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(imgui CXX)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
add_library(imgui STATIC
|
||||
${IMGUI_INCLUDES_PUBLIC}
|
||||
${IMGUI_INCLUDES_PRIVATE}
|
||||
${IMGUI_SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(imgui
|
||||
PRIVATE
|
||||
${IMGUI_INCLUDES_PRIVATE}
|
||||
${STB_INCLUDE_DIR}
|
||||
|
||||
PUBLIC
|
||||
${IMGUI_INCLUDES_PUBLIC}
|
||||
)
|
||||
|
||||
install(TARGETS imgui
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
if(NOT IMGUI_SKIP_HEADERS)
|
||||
install(
|
||||
FILES ${IMGUI_INCLUDES_PUBLIC}
|
||||
DESTINATION include
|
||||
)
|
||||
endif()
|
4
ports/imgui/CONTROL
Normal file
4
ports/imgui/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: imgui
|
||||
Version: 1.51
|
||||
Build-Depends: stb (windows)
|
||||
Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.
|
23
ports/imgui/portfile.cmake
Normal file
23
ports/imgui/portfile.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/imgui-1.51)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/ocornut/imgui/archive/v1.51.zip"
|
||||
FILENAME "imgui-1.51.zip"
|
||||
SHA512 a3c77887396991f8371c0cf5b42d781d758877cdb194a7c6ea8b34939f4b300f55f176d601dd0e167ea2a20bd8a47b958ad1bca16864a19c1cc9b2c7a889ab29
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DIMGUI_SKIP_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/imgui)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/imgui/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright)
|
Loading…
x
Reference in New Issue
Block a user