Skip to content

Commit

Permalink
Add vsgImGui
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongseok-meta committed Jan 24, 2025
1 parent 13e7ae3 commit c320667
Show file tree
Hide file tree
Showing 8 changed files with 5,747 additions and 0 deletions.
14 changes: 14 additions & 0 deletions recipes/vsgImGui/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo on

cmake %SRC_DIR% ^
%CMAKE_ARGS% ^
-B build ^
-DBUILD_SHARED_LIBS=ON ^
-DVSG_IMGUI_USE_SYSTEM_IMGUI=ON ^
-DVSG_IMGUI_USE_SYSTEM_IMPLOT=ON

cmake --build build --parallel --config Release
if errorlevel 1 exit 1

cmake --install build --config Release
if errorlevel 1 exit 1
16 changes: 16 additions & 0 deletions recipes/vsgImGui/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -exo pipefail

cmake $SRC_DIR \
${CMAKE_ARGS} \
-G Ninja \
-B build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DVSG_IMGUI_USE_SYSTEM_IMGUI=ON \
-DVSG_IMGUI_USE_SYSTEM_IMPLOT=ON

cmake --build build --parallel

cmake --install build --strip
64 changes: 64 additions & 0 deletions recipes/vsgImGui/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{% set name = "vsgImGui" %}
{% set version = "0.6.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
- url: https://github.com/vsg-dev/vsgImGui/archive/v{{ version }}.tar.gz
sha256: 1697d53c4d4a91b90837c16196d891ecff20bb0469e1947caccada03e6dca864
patches:
- patches/use-system-deps.patch

build:
number: 0
run_exports:
- {{ pin_subpackage('vsgimgui', max_pin='x.x') }}

requirements:
build:
- {{ compiler('cxx') }}
- {{ stdlib('c') }}
- cmake
- ninja # [not win]
- pkgconfig # [linux]
host:
- imgui
- implot
- libvulkan-headers
- libvulkan-loader
- vulkanscenegraph
run:
- libvulkan-loader
- vulkanscenegraph

test:
commands:
- test -f $PREFIX/include/vsgImGui/Export.h # [not win]
- test -f $PREFIX/lib/libvsgImGui${SHLIB_EXT} # [not win]
- test -f $PREFIX/lib/cmake/vsgImGui/vsgImGuiConfig.cmake # [not win]
- if not exist %PREFIX%\\Library\\include\\vsgImGui\\Export.h exit 1 # [win]
- if not exist %PREFIX%\\Library\\lib\\vsgImGui.lib exit 1 # [win]
- if not exist %PREFIX%\\Library\\bin\\vsgImGui.dll exit 1 # [win]
- if not exist %PREFIX%\\Library\\lib\\cmake\\vsgImGui\\vsgImGuiConfig.cmake exit 1 # [win]
requires:
- {{ compiler("c") }}
- {{ compiler("cxx") }}
- cmake
- ninja # [not win]
- pkgconfig # [linux]
- vsgXchange
files:
- tests/

about:
home: https://vsg-dev.github.io/vsg-dev.io/
summary: Integration of VulkanSceneGraph with ImGui
license: MIT
license_file: LICENSE.md
dev_url: https://github.com/vsg-dev/vsgImGui

extra:
recipe-maintainers:
- jeongseok-meta
5,278 changes: 5,278 additions & 0 deletions recipes/vsgImGui/patches/use-system-deps.patch

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions recipes/vsgImGui/run_test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo on

cmake tests ^
%CMAKE_ARGS% ^
-B tests/build ^
-DBUILD_SHARED_LIBS=ON
if errorlevel 1 exit 1

cmake --build tests/build --parallel --config Release
if errorlevel 1 exit 1
12 changes: 12 additions & 0 deletions recipes/vsgImGui/run_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -exo pipefail

cmake tests \
${CMAKE_ARGS} \
-G Ninja \
-B tests/build \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release

cmake --build tests/build --parallel
14 changes: 14 additions & 0 deletions recipes/vsgImGui/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.7)

project(vsghelloworld)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

find_package(vsg CONFIG REQUIRED)
find_package(vsgXchange CONFIG REQUIRED)
find_package(vsgImGui CONFIG REQUIRED)

add_executable(vsghelloworld main.cpp)
target_link_libraries(vsghelloworld PRIVATE vsg::vsg vsgXchange::vsgXchange vsgImGui::vsgImGui)
Loading

0 comments on commit c320667

Please sign in to comment.