summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-05 21:41:08 +1100
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-03-05 21:41:08 +1100
commitd92d5231ae094ae79d95463d54275a3527cf1c2d (patch)
treeac32863eed71dd6062ca88e20ffb376e7090f1eb
parent428765380da3e7fdb8122e440b5d4065620fc8fb (diff)
get us running on Mac again with our vendored GLFW
-rw-r--r--src/empty.c5
-rw-r--r--src/resources/obj.c1
-rw-r--r--src/std/str.h2
-rw-r--r--xmake.lua5
4 files changed, 13 insertions, 0 deletions
diff --git a/src/empty.c b/src/empty.c
new file mode 100644
index 0000000..d58a94f
--- /dev/null
+++ b/src/empty.c
@@ -0,0 +1,5 @@
+// For some reason on Mac we need an empty file so that 'ar' has something
+// to run.
+int add(int a, int b) {
+ return a + b;
+} \ No newline at end of file
diff --git a/src/resources/obj.c b/src/resources/obj.c
index 05aa96e..d56e212 100644
--- a/src/resources/obj.c
+++ b/src/resources/obj.c
@@ -11,6 +11,7 @@
#include <string.h>
#include "core.h"
+#include "file.h"
#include "darray.h"
#include "log.h"
#include "maths.h"
diff --git a/src/std/str.h b/src/std/str.h
index 9d30cba..518d508 100644
--- a/src/std/str.h
+++ b/src/std/str.h
@@ -10,6 +10,8 @@
*/
#pragma once
+#include <ctype.h>
+
#include "defines.h"
#include "mem.h"
diff --git a/xmake.lua b/xmake.lua
index 450b97d..10d6a80 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -24,6 +24,9 @@ elseif is_plat("windows") then
add_defines("CEL_PLATFORM_WINDOWS")
elseif is_plat("macosx") then
add_defines("CEL_PLATFORM_MAC")
+ add_frameworks("Cocoa", "IOKit", "CoreVideo", "OpenGL")
+ set_runenv("MTL_DEBUG_LAYER", "1")
+ -- add_syslinks("GL")
end
-- Compile GLFW from source
@@ -79,6 +82,8 @@ target("core_config")
target("core_static")
set_kind("static")
add_deps("core_config") -- inherit common configurations
+ set_policy("build.merge_archive", true)
+ add_files("src/empty.c")
target("core_shared")
set_kind("shared")