diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-08-24 12:49:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-24 12:49:35 -0700 |
| commit | bf594d63fce3e581a0f36404788946515e88f2de (patch) | |
| tree | d341c2c470b30ee0b16f3ac39ff3e9599a0e290f /ports | |
| parent | 02bfa2961ad0bc06efd2540b14f14659ad158177 (diff) | |
| download | vcpkg-bf594d63fce3e581a0f36404788946515e88f2de.tar.gz vcpkg-bf594d63fce3e581a0f36404788946515e88f2de.zip | |
[libigl] fix imgui feature (#12691)
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/imgui/CONTROL | 5 | ||||
| -rw-r--r-- | ports/imgui/portfile.cmake | 15 | ||||
| -rw-r--r-- | ports/libigl/CONTROL | 4 | ||||
| -rw-r--r-- | ports/libigl/fix-dependency.patch | 11 | ||||
| -rw-r--r-- | ports/libigl/fix-imgui-set-cond.patch | 26 | ||||
| -rw-r--r-- | ports/libigl/portfile.cmake | 8 |
6 files changed, 55 insertions, 14 deletions
diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 38dc6775c..bee67cc00 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,6 +1,6 @@ Source: imgui Version: 1.78 -Port-Version: 1 +Port-Version: 2 Homepage: https://github.com/ocornut/imgui Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. @@ -70,3 +70,6 @@ Description: Make available Win32 binding Feature: freetype Description: Build font atlases using FreeType instead of stb_truetype Build-Depends: freetype + +Feature: libigl-imgui +Description: Install the libigl-imgui headers diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 0290b4fff..1da67c911 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -36,6 +36,19 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS freetype IMGUI_FREETYPE ) +if ("libigl-imgui" IN_LIST FEATURES) + vcpkg_download_distfile( + IMGUI_FONTS_DROID_SANS_H + URLS + https://raw.githubusercontent.com/libigl/libigl-imgui/c3efb9b62780f55f9bba34561f79a3087e057fc0/imgui_fonts_droid_sans.h + FILENAME "imgui_fonts_droid_sans.h" + SHA512 + abe9250c9a5989e0a3f2285bbcc83696ff8e38c1f5657c358e6fe616ff792d3c6e5ff2fa23c2eeae7d7b307392e0dc798a95d14f6d10f8e9bfbd7768d36d8b31 + ) + + file(INSTALL ${IMGUI_FONTS_DROID_SANS_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -50,4 +63,4 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() -file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
\ No newline at end of file +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libigl/CONTROL b/ports/libigl/CONTROL index 496f73570..3b2304002 100644 --- a/ports/libigl/CONTROL +++ b/ports/libigl/CONTROL @@ -15,11 +15,11 @@ Build-Depends: opengl, glad Feature: glfw Description: Build with glfw -Build-Depends: glfw3 +Build-Depends: libigl[opengl], glfw3 Feature: imgui Description: Build with imgui -Build-Depends: imgui[bindings] +Build-Depends: libigl[glfw], imgui[glfw-binding, opengl3-glew-binding, libigl-imgui] Feature: xml Description: Build with libxml diff --git a/ports/libigl/fix-dependency.patch b/ports/libigl/fix-dependency.patch index e891e341e..fad85af0a 100644 --- a/ports/libigl/fix-dependency.patch +++ b/ports/libigl/fix-dependency.patch @@ -146,18 +146,15 @@ diff --git a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp b/include/igl/opengl/gl index 47de487..6c607de 100644 --- a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +++ b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp -@@ -9,10 +9,10 @@ +@@ -9,9 +9,9 @@ #include "ImGuiMenu.h" #include "ImGuiHelpers.h" #include <igl/project.h> -#include <imgui/imgui.h> --#include <imgui_impl_glfw.h> --#include <imgui_impl_opengl3.h> --#include <imgui_fonts_droid_sans.h> +#include <imgui.h> -+#include <bindings/imgui_impl_glfw.h> -+#include <bindings/imgui_impl_opengl3.h> -+#include <bindings/imgui_fonts_droid_sans.h> + #include <imgui_impl_glfw.h> + #include <imgui_impl_opengl3.h> + #include <imgui_fonts_droid_sans.h> #include <GLFW/glfw3.h> #include <iostream> //////////////////////////////////////////////////////////////////////////////// diff --git a/ports/libigl/fix-imgui-set-cond.patch b/ports/libigl/fix-imgui-set-cond.patch new file mode 100644 index 000000000..964f6f3f4 --- /dev/null +++ b/ports/libigl/fix-imgui-set-cond.patch @@ -0,0 +1,26 @@ +diff --git a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp
+index 47de4870..7e6f13a8 100644
+--- a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp
++++ b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp
+@@ -167,8 +167,8 @@ IGL_INLINE void ImGuiMenu::draw_menu()
+ IGL_INLINE void ImGuiMenu::draw_viewer_window()
+ {
+ float menu_width = 180.f * menu_scaling();
+- ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver);
+- ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver);
++ ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver);
++ ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver);
+ ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f), ImVec2(menu_width, -1.0f));
+ bool _viewer_menu_visible = true;
+ ImGui::Begin(
+@@ -310,8 +310,8 @@ IGL_INLINE void ImGuiMenu::draw_viewer_menu()
+ IGL_INLINE void ImGuiMenu::draw_labels_window()
+ {
+ // Text labels
+- ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiSetCond_Always);
+- ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiSetCond_Always);
++ ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiCond_Always);
++ ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiCond_Always);
+ bool visible = true;
+ ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0,0,0,0));
+ ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0);
diff --git a/ports/libigl/portfile.cmake b/ports/libigl/portfile.cmake index d3e342b5b..063f5a723 100644 --- a/ports/libigl/portfile.cmake +++ b/ports/libigl/portfile.cmake @@ -8,7 +8,9 @@ vcpkg_from_github( REF 3cb4894eaf8ea4610467189ca292be349425d44b #2.2.0 SHA512 339f96e36b6a99ae8301ec2e234e18cecba7b7c42289ed68a26c20b279dce3135405f9b49e292c321fba962d56c083ae61831057bec9a19ad1495e2afa379b8b HEAD_REF master - PATCHES fix-dependency.patch + PATCHES + fix-dependency.patch + fix-imgui-set-cond.patch ) set(LIBIGL_BUILD_STATIC OFF) @@ -16,9 +18,9 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) set(LIBIGL_BUILD_STATIC ON) endif() -if ("imgui" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL static) +if ("imgui" IN_LIST FEATURES AND NOT VCPKG_LIBRARY_LINKAGE STREQUAL static) # Remove this after add port libigl-imgui - message(FATAL_ERROR "Feature imgui does not support static build currentlly") + message(FATAL_ERROR "Feature imgui does not support non-static build currently") endif() if ("test" IN_LIST FEATURES AND NOT EXISTS ${SOURCE_PATH}/tests/data) |
