summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2023-12-21 18:48:23 +0100
committerGitHub <noreply@github.com>2023-12-21 18:48:23 +0100
commit724910c73483cc85016bfaa37ffd0b7c9ad2f8dd (patch)
tree998bf3f252e6e94d3cc2f1f8f66ab778538c9dc7 /SConstruct
parentd768508435cfb0b940486b4fec54339f5d9c096f (diff)
parent7a4e27e5f054f418f4aa08c6c0c3c22c50bf0c97 (diff)
downloadfork-godot-webrtc-native-724910c73483cc85016bfaa37ffd0b7c9ad2f8dd.tar.gz
fork-godot-webrtc-native-724910c73483cc85016bfaa37ffd0b7c9ad2f8dd.tar.bz2
fork-godot-webrtc-native-724910c73483cc85016bfaa37ffd0b7c9ad2f8dd.zip
Merge pull request #130 from Faless/spike/macos_framework
[MacOS] Use framekwork to package GDExtension
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct14
1 files changed, 13 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 9080be6..6d012ff 100644
--- a/SConstruct
+++ b/SConstruct
@@ -177,7 +177,19 @@ env.Depends(sources, ssl + rtc)
# Make the shared library
result_name = "libwebrtc_native{}{}".format(env["suffix"], env["SHLIBSUFFIX"])
-library = env.SharedLibrary(target=os.path.join(result_path, "lib", result_name), source=sources)
+if env["godot_version"] != "3" and env["platform"] == "macos":
+ framework_path = os.path.join(
+ result_path, "lib", "libwebrtc_native.macos.{}.{}.framework".format(env["target"], env["arch"])
+ )
+ library_file = env.SharedLibrary(target=os.path.join(framework_path, result_name), source=sources)
+ plist_file = env.Substfile(
+ os.path.join(framework_path, "Resources", "Info.plist"),
+ "misc/dist/macos/Info.plist",
+ SUBST_DICT={"{LIBRARY_NAME}": result_name, "{DISPLAY_NAME}": "libwebrtc_native" + env["suffix"]},
+ )
+ library = [library_file, plist_file]
+else:
+ library = env.SharedLibrary(target=os.path.join(result_path, "lib", result_name), source=sources)
Default(library)
# GDNativeLibrary