Skip to content

Commit 8c686c2

Browse files
committed
Add support for .dylib dependencies on MacOS
1 parent f0dc0aa commit 8c686c2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/platforms/MacPlatform.hx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,15 @@ class MacPlatform extends PlatformTarget
180180

181181
System.mkdir(targetDirectory);
182182

183+
for (dependency in project.dependencies)
184+
{
185+
if (StringTools.endsWith(dependency.path, ".dylib"))
186+
{
187+
var fileName = Path.withoutDirectory(dependency.path);
188+
copyIfNewer(dependency.path, executableDirectory + "/" + fileName);
189+
}
190+
}
191+
183192
if (!project.targetFlags.exists("static") || targetType != "cpp")
184193
{
185194
var targetSuffix = (targetType == "hl") ? ".hdll" : null;

0 commit comments

Comments
 (0)