diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-27 11:47:02 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-27 11:47:02 +0100 |
commit | ac0247a610a5a2ffbb8419a5de02c49fac9b4265 (patch) | |
tree | 265d09ecb29c354b542735c1778af60b5866634a /thirdparty/glad.jam | |
parent | Mark main rule as always, so we can always launch it (diff) | |
download | ilt-ac0247a610a5a2ffbb8419a5de02c49fac9b4265.tar.bz2 ilt-ac0247a610a5a2ffbb8419a5de02c49fac9b4265.tar.xz ilt-ac0247a610a5a2ffbb8419a5de02c49fac9b4265.zip |
Add glad submodule and build a glad library
Slightly messy regarding file paths to get files generated by the glad generator into a place where
b2 will happily find them later... but it works.
Diffstat (limited to 'thirdparty/glad.jam')
-rw-r--r-- | thirdparty/glad.jam | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/thirdparty/glad.jam b/thirdparty/glad.jam new file mode 100644 index 0000000..f89750c --- /dev/null +++ b/thirdparty/glad.jam @@ -0,0 +1,20 @@ +import generators : register-standard ; +import feature : feature ; +import toolset : flags ; + +generators.register-standard glad.generate.c : XML : C(%) H(glad/%) XML ; +feature glad.pythonpath : thirdparty/glad : path ; +feature glad.profile : core compatibility ; +feature glad.version : 4.6 ; +flags glad.generate.c PYTHONPATH <glad.pythonpath> ; +flags glad.generate.c PROFILE <glad.profile> ; +flags glad.generate.c VERSION <glad.version> ; + +actions glad.generate.c +{ + rm -rf $(1:D) + PYTHONPATH=$(PYTHONPATH) python -m glad --api=$(2:B):$(PROFILE)=$(VERSION) --merge --out-path=$(1[3]:D) --reproducible --quiet c + mv $(1[3]:D)/src/$(1[1]:BS) $(1[1]) + mkdir -p $(1[2]:D) + mv $(1[3]:D)/include/glad/$(1[2]:BS) $(1[2]) +} |