Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ports/azure-kinect-sensor-sdk/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: azure-kinect-sensor-sdk
Version: 1.4.0-alpha.0-2
Version: 1.4.0-alpha.0-3
Homepage: https://github.com/microsoft/Azure-Kinect-Sensor-SDK
Description: Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.
Build-Depends: azure-c-shared-utility, glfw3, gtest, imgui, libusb, spdlog, cjson, ebml, libjpeg-turbo, matroska, libsoundio, libyuv
Expand All @@ -9,4 +9,4 @@ Description: Build K4A doxygen documentation.

Feature: tool
Description: Build tools.
Build-Depends: gl3w, imgui[example]
Build-Depends: gl3w, glew, imgui[bindings]
45 changes: 45 additions & 0 deletions ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt
index 6ab38d9..e0c5bad 100644
--- a/tools/k4aviewer/CMakeLists.txt
+++ b/tools/k4aviewer/CMakeLists.txt
@@ -35,6 +35,8 @@ set(SOURCE_FILES
k4awindowset.cpp
perfcounter.cpp
${CMAKE_CURRENT_BINARY_DIR}/version.rc
+ ${IMGUI_EXTERNAL_PATH}/imgui_impl_glfw.cpp
+ ${IMGUI_EXTERNAL_PATH}/imgui_impl_opengl3.cpp
)

# Include ${CMAKE_CURRENT_BINARY_DIR}/version.rc in the target's sources
@@ -54,6 +56,8 @@ include_directories(
${CMAKE_CURRENT_LIST_DIR}
)

+find_package(GLEW REQUIRED)
+
set(EXTERNAL_LIBRARIES
k4a::k4a
k4a::k4arecord
@@ -65,6 +69,7 @@ set(EXTERNAL_LIBRARIES
glfw
${OPENGL_LIBRARIES}
unofficial::gl3w::gl3w
+ GLEW::GLEW
)

# On Windows, we need to call into setupapi to get USB container ID information
diff --git a/tools/k4aviewer/k4aimgui_all.h b/tools/k4aviewer/k4aimgui_all.h
index e40ccfb..756fb09 100644
--- a/tools/k4aviewer/k4aimgui_all.h
+++ b/tools/k4aviewer/k4aimgui_all.h
@@ -34,8 +34,8 @@
#include <GL/gl3w.h>
#include <GLFW/glfw3.h>
#include <imgui.h>
-#include <imgui_impl_glfw.h>
-#include <imgui_impl_opengl3.h>
+#include <bindings/imgui_impl_glfw.h>
+#include <bindings/imgui_impl_opengl3.h>

// For disabling buttons, which has not yet been promoted to the public API
//
14 changes: 14 additions & 0 deletions ports/azure-kinect-sensor-sdk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
fix-builds.patch
disable-c4275.patch
fix-dependency-imgui.patch
)

vcpkg_find_acquire_program(PYTHON3)
Expand All @@ -26,6 +27,7 @@ vcpkg_configure_cmake(
-DK4A_MTE_VERSION=ON
-DBUILD_EXAMPLES=OFF
-DWITH_TEST=OFF
-DIMGUI_EXTERNAL_PATH=${CURRENT_INSTALLED_DIR}/include/bindings
)

vcpkg_install_cmake()
Expand All @@ -40,6 +42,18 @@ vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

if ("tool" IN_LIST FEATURES)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
file(COPY ${AZURE_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${AZURE_TOOLS})
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
file(REMOVE ${AZURE_TOOLS})
endif()
endif()

if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
Expand Down
14 changes: 14 additions & 0 deletions ports/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(IMGUI_INCLUDES_PUBLIC

set(IMGUI_INCLUDES_PRIVATE
imgui_internal.h
imstb_textedit.h
)

set(IMGUI_SOURCES
Expand All @@ -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}
Expand All @@ -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()
8 changes: 4 additions & 4 deletions ports/imgui/CONTROL
Original file line number Diff line number Diff line change
@@ -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
29 changes: 8 additions & 21 deletions ports/imgui/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include(vcpkg_common_functions)

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
Expand All @@ -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)
4 changes: 2 additions & 2 deletions ports/libigl/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: libigl
Version: 2.1.0-1
Version: 2.1.0-2
Homepage: https://github.com/libigl/libigl
Description: libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB.
Build-Depends: eigen3
Expand All @@ -18,7 +18,7 @@ Build-Depends: glfw3

Feature: imgui
Description: Build with imgui
Build-Depends: imgui[example]
Build-Depends: imgui[bindings]

Feature: png
Description: Build with libpng
Expand Down