From c5a67a71d3c32e0d5c127d2fe2928f3457f98d9b Mon Sep 17 00:00:00 2001 From: StevenWdV Date: Thu, 10 Feb 2022 13:23:18 +0100 Subject: Fix Swift wrapper on macOS --- exports/common.mk | 5 +++-- wrappers/swift/Makefile | 3 ++- 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 -- cgit v1.2.3