Rework the merged library to more easily work on osx.

This commit is contained in:
Relintai 2024-01-18 22:26:48 +01:00
parent 8976ed252c
commit e1961b6547
4 changed files with 18 additions and 3 deletions

View File

@ -12,7 +12,7 @@ python tools/merger/join.py --template tools/merger/sfw_core.cpp.inl --path . --
python tools/merger/join.py --template tools/merger/sfw_full.h.inl --path . --output tools/merger/out/full/sfw.h
python tools/merger/join.py --template tools/merger/sfw_full.cpp.inl --path . --output tools/merger/out/full/sfw.cpp
python tools/merger/join.py --template tools/merger/sfw_3rd_full.x.inl --path . --output tools/merger/out/full/sfw_3rd.h
python tools/merger/join.py --template tools/merger/sfw_3rd_full.x.inl --path . --output tools/merger/out/full/sfw_3rd.m
echo "Running clang format!"

View File

@ -4,6 +4,16 @@
{{FILEINLINE:tools/merger/sfw_linceses_core.inl.h}}
{{FILEINLINE:tools/merger/sfw_linceses_render_core.inl.h}}
// On OSX you need to compile this file separately with an objective c compiler
#ifdef __APPLE__
#ifndef SFW_3RD_IMPL
#define SFW_3RD_IMPL
#endif
#endif //__APPLE__
#ifdef SFW_3RD_IMPL
#define GLAD_GL_IMPLEMENTATION // glad
#endif

View File

@ -20,6 +20,9 @@
#include "sfw.h"
#endif
// On OSX sfw_3rd.m has to be compiled manually on Objective C Mode.
#ifndef __APPLE__
#ifndef SFW_3RD_IMPL
#define SFW_3RD_IMPL
@ -28,7 +31,7 @@
#define Font The_Font_I_dont_care
#endif
#include "sfw_3rd.h"
#include "sfw_3rd.m"
#undef CursorShape
@ -192,6 +195,8 @@
#endif
#endif // #ifndef __APPLE__
//=================== CORE SECTION ===================
{{FILE:sfw/core/ucaps.h}}

View File

@ -818,7 +818,7 @@
#endif
#ifndef GLAD_GL_H_
#include "sfw_3rd.h"
#include "sfw_3rd.m"
#endif
#endif