aboutsummaryrefslogtreecommitdiff
path: root/ports/imgui
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2020-05-01 13:57:38 +0800
committerGitHub <noreply@github.com>2020-04-30 22:57:38 -0700
commit7db2ffa0b0aa36113a8c72f2e1815f540f4c2b92 (patch)
treefb05af72186a2f284fbd66bba7eeda8bb0fa28b6 /ports/imgui
parent28fc76e7332db04e253d861fb3e4f0e27949d9b1 (diff)
downloadvcpkg-7db2ffa0b0aa36113a8c72f2e1815f540f4c2b92.tar.gz
vcpkg-7db2ffa0b0aa36113a8c72f2e1815f540f4c2b92.zip
[imgui] Add feature bindings and remove feature example (#10253)
* [imgui] Separate feature tools from feature example * [imgui] Separate feature tools from feature example Co-authored-by: JackBoosY <yuzaiyang@microsoft.com>
Diffstat (limited to 'ports/imgui')
-rw-r--r--ports/imgui/CMakeLists.txt14
-rw-r--r--ports/imgui/CONTROL8
-rw-r--r--ports/imgui/portfile.cmake29
3 files changed, 26 insertions, 25 deletions
diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt
index 4a2ce7628..a67aa5474 100644
--- a/ports/imgui/CMakeLists.txt
+++ b/ports/imgui/CMakeLists.txt
@@ -10,6 +10,7 @@ set(IMGUI_INCLUDES_PUBLIC
set(IMGUI_INCLUDES_PRIVATE
imgui_internal.h
+ imstb_textedit.h
)
set(IMGUI_SOURCES
@@ -25,6 +26,8 @@ add_library(${PROJECT_NAME}
${IMGUI_SOURCES}
)
+file(GLOB IMGUI_BINDINGS ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_* )
+
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
install(TARGETS ${PROJECT_NAME}
@@ -42,3 +45,14 @@ if(NOT IMGUI_SKIP_HEADERS)
DESTINATION include
)
endif()
+
+if(IMGUI_COPY_BINDINGS)
+ install(
+ FILES ${IMGUI_INCLUDES_PRIVATE}
+ DESTINATION include
+ )
+ install(
+ FILES ${IMGUI_BINDINGS}
+ DESTINATION include/bindings
+ )
+endif() \ No newline at end of file
diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL
index c1484ec8b..a4ffede60 100644
--- a/ports/imgui/CONTROL
+++ b/ports/imgui/CONTROL
@@ -1,8 +1,8 @@
Source: imgui
-Version: 1.74
+Version: 1.74-1
Homepage: https://github.com/ocornut/imgui
Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies.
-Feature: example
-Description: build with examples
-Build-Depends: glfw3, freeglut, opengl, sdl1
+Feature: bindings
+Description: make available bindings header and source files for supported implementations
+Build-Depends: glfw3, freeglut, opengl, sdl1, allegro5 \ No newline at end of file
diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake
index b9cb4eda3..04916ff23 100644
--- a/ports/imgui/portfile.cmake
+++ b/ports/imgui/portfile.cmake
@@ -1,5 +1,3 @@
-include(vcpkg_common_functions)
-
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
@@ -12,34 +10,23 @@ vcpkg_from_github(
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ bindings IMGUI_COPY_BINDINGS # should only be copied once, at most
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
+ OPTIONS_RELEASE
+ ${FEATURE_OPTIONS}
OPTIONS_DEBUG
+ -DIMGUI_COPY_BINDINGS=OFF
-DIMGUI_SKIP_HEADERS=ON
)
vcpkg_install_cmake()
-if ("example" IN_LIST FEATURES)
- if (NOT VCPKG_TARGET_IS_WINDOWS)
- message(FATAL_ERROR "Feature example only support windows.")
- endif()
- vcpkg_build_msbuild(
- USE_VCPKG_INTEGRATION
- PROJECT_PATH ${SOURCE_PATH}/examples/imgui_examples.sln
- )
-
- # Install headers
- file(GLOB IMGUI_EXAMPLE_INCLUDES ${SOURCE_PATH}/examples/*.h)
- file(INSTALL ${IMGUI_EXAMPLE_INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-
- # Install tools
- file(GLOB_RECURSE IMGUI_EXAMPLE_BINARIES ${SOURCE_PATH}/examples/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
- file(INSTALL ${IMGUI_EXAMPLE_BINARIES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
-endif()
-
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
-configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/imgui/copyright COPYONLY)
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)