diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-05-01 13:57:38 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-30 22:57:38 -0700 |
| commit | 7db2ffa0b0aa36113a8c72f2e1815f540f4c2b92 (patch) | |
| tree | fb05af72186a2f284fbd66bba7eeda8bb0fa28b6 /ports/azure-kinect-sensor-sdk | |
| parent | 28fc76e7332db04e253d861fb3e4f0e27949d9b1 (diff) | |
| download | vcpkg-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/azure-kinect-sensor-sdk')
| -rw-r--r-- | ports/azure-kinect-sensor-sdk/CONTROL | 2 | ||||
| -rw-r--r-- | ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch | 45 | ||||
| -rw-r--r-- | ports/azure-kinect-sensor-sdk/portfile.cmake | 14 |
3 files changed, 60 insertions, 1 deletions
diff --git a/ports/azure-kinect-sensor-sdk/CONTROL b/ports/azure-kinect-sensor-sdk/CONTROL index e062cbebf..0979028e7 100644 --- a/ports/azure-kinect-sensor-sdk/CONTROL +++ b/ports/azure-kinect-sensor-sdk/CONTROL @@ -9,4 +9,4 @@ Description: Build K4A doxygen documentation. Feature: tool Description: Build tools. -Build-Depends: gl3w, imgui[example]
\ No newline at end of file +Build-Depends: gl3w, glew, imgui[bindings]
\ No newline at end of file diff --git a/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch b/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch new file mode 100644 index 000000000..f997e71b5 --- /dev/null +++ b/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch @@ -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 + // diff --git a/ports/azure-kinect-sensor-sdk/portfile.cmake b/ports/azure-kinect-sensor-sdk/portfile.cmake index d09d133d9..de279be39 100644 --- a/ports/azure-kinect-sensor-sdk/portfile.cmake +++ b/ports/azure-kinect-sensor-sdk/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES fix-builds.patch disable-c4275.patch + fix-dependency-imgui.patch ) vcpkg_find_acquire_program(PYTHON3) @@ -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() @@ -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() |
