summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStevenWdV <stevenwdv@gmail.com>2022-02-10 13:23:18 +0100
committerStevenWdV <stevenwdv@gmail.com>2022-02-10 13:36:25 +0100
commitc5a67a71d3c32e0d5c127d2fe2928f3457f98d9b (patch)
tree6d7588fa6750c20c87acf8c2af9a58bb27af00f1
parent054bf059c737703e5abb36875df6822c89904150 (diff)
Fix Swift wrapper on macOS
-rw-r--r--exports/common.mk5
-rw-r--r--wrappers/swift/Makefile3
2 files changed, 5 insertions, 3 deletions
diff --git a/exports/common.mk b/exports/common.mk
index 1059e63..c1e2a7e 100644
--- a/exports/common.mk
+++ b/exports/common.mk
@@ -1,10 +1,10 @@
# Prevent executing `go env ...` multiple times for the same property
# export is needed for this and also to pass the values on to the Go compiler
ifndef GOOS
-export GOOS != go env GOHOSTOS
+export GOOS := $(shell go env GOHOSTOS)
endif
ifndef GOARCH
-export GOARCH != go env GOHOSTARCH
+export GOARCH := $(shell go env GOHOSTARCH)
endif
ifeq (windows,$(GOOS))
@@ -34,6 +34,7 @@ ifeq (Windows_NT,$(OS))
export PATH := $(abspath $(EXPORTS_LIB_SUBFOLDER_PATH)):$(PATH)
else
export LD_LIBRARY_PATH := $(abspath $(EXPORTS_LIB_SUBFOLDER_PATH)):$(LD_LIBRARY_PATH)
+export DYLD_FALLBACK_LIBRARY_PATH := $(abspath $(EXPORTS_LIB_SUBFOLDER_PATH)):$(DYLD_FALLBACK_LIBRARY_PATH)
endif
.try-build-lib:
diff --git a/wrappers/swift/Makefile b/wrappers/swift/Makefile
index 08171b6..659b51f 100644
--- a/wrappers/swift/Makefile
+++ b/wrappers/swift/Makefile
@@ -16,7 +16,8 @@ test: install-header
$(SWIFT) test --parallel -Xlinker -L"$(EXPORTS_LIB_SUBFOLDER_PATH)"
install-header: .try-build-lib
- install "$(EXPORTS_LIB_SUBFOLDER_PATH)/$(LIB_NAME).h" -Dt CEduVpnCommon/Sources/CEduVpnCommon/Headers # Copy header for modulemap
+ mkdir -p CEduVpnCommon/Sources/CEduVpnCommon/Headers
+ cp "$(EXPORTS_LIB_SUBFOLDER_PATH)/$(LIB_NAME).h" CEduVpnCommon/Sources/CEduVpnCommon/Headers/ # Copy header for modulemap
clean:
rm -rf .build/ CEduVpnCommon/Sources/CEduVpnCommon/Headers/*.h