From ccb0dcea3c090e9d2e23e4343419977d7b8af661 Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 28 Aug 2025 21:35:59 +0200 Subject: [PATCH] Finally remember to add the build file! --- src/gui2/build.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/gui2/build.py diff --git a/src/gui2/build.py b/src/gui2/build.py new file mode 100644 index 00000000..f711f965 --- /dev/null +++ b/src/gui2/build.py @@ -0,0 +1,53 @@ +from build.c import cxxprogram, cxxlibrary +from glob import glob +from functools import reduce +import operator + +cxxlibrary( + name="imgui", + srcs=[], + hdrs={ + k: f"dep/imgui/{k}" + for k in glob("**/*.h", root_dir="dep/imgui", recursive=True) + }, +) + +cxxlibrary( + name="libwolv", + srcs=[], + hdrs=reduce( + operator.ior, + [ + { + k: f"dep/libwolv/libs/{d}/include/{k}" + for k in glob( + "**/*.hpp", root_dir=f"dep/libwolv/libs/{d}/include", recursive=True + ) + } + for d in ["types", "io", "utils"] + ], + ) + | {"types/uintwide_t.h": "dep/libwolv/libs/types/include/wolv/types/uintwide_t.h"}, +) + +cxxlibrary( + name="libimhex", + srcs=[], + hdrs={ + k: f"dep/imhex/lib/libimhex/include/{k}" + for k in glob( + "**/*.h*", root_dir="dep/imhex/lib/libimhex/include", recursive=True + ) + }, + deps=[".+libwolv", ".+imgui"], +) + +cxxprogram( + name="gui2", + srcs=[ + "dep/imhex/main/gui/include/window.hpp", + "dep/imhex/main/gui/source/main.cpp", + "dep/imhex/main/gui/source/crash_handlers.cpp", + ], + deps=[".+libimhex"], +)