aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Romero <romerosanchezv@gmail.com>2019-10-15 21:52:33 -0700
committerGitHub <noreply@github.com>2019-10-15 21:52:33 -0700
commit7fe358bba19a469af911473577e46af03572b7b5 (patch)
treebc90e7fa7af13d519eef5de28d1bb583e2bf3ab3
parentcec3e0a0904bcb963ba80c34651adc1b776d1702 (diff)
parentbda01dae98babfae59d2805e6980fed808561db7 (diff)
downloadvcpkg-7fe358bba19a469af911473577e46af03572b7b5.tar.gz
vcpkg-7fe358bba19a469af911473577e46af03572b7b5.zip
Merge pull request #8605 from JackBoosY/dev/jack/imgui_add_example
[imgui]Add feature example in windows.
-rw-r--r--ports/imgui/CONTROL6
-rw-r--r--ports/imgui/portfile.cmake19
2 files changed, 24 insertions, 1 deletions
diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL
index fed08d80d..6484a925a 100644
--- a/ports/imgui/CONTROL
+++ b/ports/imgui/CONTROL
@@ -1,4 +1,8 @@
Source: imgui
-Version: 1.73
+Version: 1.73-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
diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake
index 14217b778..62d674353 100644
--- a/ports/imgui/portfile.cmake
+++ b/ports/imgui/portfile.cmake
@@ -20,6 +20,25 @@ vcpkg_configure_cmake(
)
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()