aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-09-29 09:25:33 +0100
committergingerBill <bill@gingerbill.org>2019-09-29 09:25:33 +0100
commit218d1131e84c4c45da8b9796f46d52094df2962e (patch)
treeb35f97389a10cd86db4fa29444e07828c2b0764f /src
parentf4f6e9ad49d6992712815bc7b2e94c8333f33523 (diff)
Change how foreign imports work for mac
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
-rw-r--r--src/unicode.cpp1
-rw-r--r--src/utf8proc/utf8proc.c1
3 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index e6af04a3a..b294e7f96 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1242,12 +1242,18 @@ int main(int arg_count, char **arg_ptr) {
if (lib.len > 2 && lib[0] == '-' && lib[1] == 'f') {
// framework thingie
lib_str = gb_string_append_fmt(lib_str, " -framework %.*s ", (int)(lib.len) - 2, lib.text + 2);
+ } else if (string_ends_with(lib, str_lit(".framework"))) {
+ // framework thingie
+ String lib_name = lib;
+ lib_name = remove_extension_from_path(lib_name);
+ lib_str = gb_string_append_fmt(lib_str, " -framework %.*s ", LIT(lib_name));
} else if (string_ends_with(lib, str_lit(".a"))) {
// static libs, absolute full path relative to the file in which the lib was imported from
lib_str = gb_string_append_fmt(lib_str, " %.*s ", LIT(lib));
} else if (string_ends_with(lib, str_lit(".dylib"))) {
// dynamic lib, relative path to executable
- lib_str = gb_string_append_fmt(lib_str, " -l:%s/%.*s ", cwd, LIT(lib));
+ // lib_str = gb_string_append_fmt(lib_str, " -l:%s/%.*s ", cwd, LIT(lib));
+ lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));
} else {
// dynamic or static system lib, just link regularly searching system library paths
lib_str = gb_string_append_fmt(lib_str, " -l%.*s ", LIT(lib));
diff --git a/src/unicode.cpp b/src/unicode.cpp
index 0ad658806..679d56365 100644
--- a/src/unicode.cpp
+++ b/src/unicode.cpp
@@ -2,7 +2,6 @@
#pragma warning(disable: 4245)
extern "C" {
-#include "utf8proc/utf8proc.h"
#include "utf8proc/utf8proc.c"
}
#pragma warning(pop)
diff --git a/src/utf8proc/utf8proc.c b/src/utf8proc/utf8proc.c
index e821889c6..29fc250fc 100644
--- a/src/utf8proc/utf8proc.c
+++ b/src/utf8proc/utf8proc.c
@@ -40,7 +40,6 @@
* Implementation of libutf8proc.
*/
-
#include "utf8proc.h"
#include "utf8proc_data.c"