discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Copying native library into app bundle and linking from there


From: Graham Lee
Subject: Copying native library into app bundle and linking from there
Date: Thu, 4 Jul 2013 04:12:45 -0700

Hi,

I have the following project structure:

MyApp/GNUmakefile: defines a GSW app target that depends on NativeLib, and an aggregate that builds NativeLib as a subproject
MyApp/NativeLib/GNUmakefile: defines the native library target used by the app

Currently, typing "make" at the MyApp level builds the library, and then the app. However the app will only launch if the native library is installed. What I'd like to do is deploy the native library into the app bundle and link the app binary to it from there. The only way I know to do that is a bit of a hack:

 - on OS X, add NativeLib/NativeLib.framework as a component and link it as Contents/Resources/NativeLib.framework/NativeLib
 - on others, add NativeLib/NativeLib.so as a component and link it as Resources/NativeLib.so

This seems like a duplication of effort, and I'm likely to get it wrong or make it brittle to change. Is there already a way to do this that works across platforms in gnustep-make?

Thanks,
Graham.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]