Skip to content

Commit

Permalink
add a zimgui.cpp/.h file without prefix (as preparation for more idio…
Browse files Browse the repository at this point in the history
…matic zig bindings)
  • Loading branch information
floooh committed Dec 7, 2024
1 parent 4a483bf commit e58cd9b
Show file tree
Hide file tree
Showing 5 changed files with 7,487 additions and 2 deletions.
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
# builds a combined C and C++ library called 'imgui'
if (FIPS_IMPORT)
fips_begin_lib(imgui)
fips_src(src)
fips_files(
src/cimgui.cpp
src/imgui_demo.cpp
src/imgui_draw.cpp
src/imgui_tables.cpp
src/imgui_widgets.cpp
src/imgui.cpp)
fips_end_lib()
fips_begin_lib(imgui-docking)
fips_src(src-docking)
fips_files(
src-docking/cimgui.cpp
src-docking/imgui_demo.cpp
src-docking/imgui_draw.cpp
src-docking/imgui_tables.cpp
src-docking/imgui_widgets.cpp
src-docking/imgui.cpp)
fips_end_lib()
else()
cmake_minimum_required(VERSION 3.20)
Expand Down
3 changes: 3 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// FIXME: switch to zimgui.cpp/zimgui.h (those don't have a function name prefix)
// but this needs support in sokol_imgui.h (currently sokol_imgui.h expects the
// ig prefix when compiled in C mode)
const std = @import("std");
const builtin = @import("builtin");

Expand Down
1 change: 1 addition & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ python3 -m pip install -r dear_bindings/requirements.txt

mkdir -p src
python3 dear_bindings/dear_bindings.py -o src/cimgui --custom-namespace-prefix ig imgui/imgui.h
python3 dear_bindings/dear_bindings.py -o src/zimgui --custom-namespace-prefix "" imgui/imgui.h
cp imgui/*.h imgui/*.cpp imgui/LICENSE.txt src/

# docking branch
Expand Down
Loading

0 comments on commit e58cd9b

Please sign in to comment.