Re: [AD] Is this a misconfiguration on OS X? |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
On 2010-02-14, Trent Gamblin <trent@xxxxxxxxxx> wrote:First hit on Google: http://blog.onesadcookie.com/2008/01/installname-magic.html
> On Sun, 2010-02-14 at 9:06am, "Evert Glebbeek" <eglebbk@xxxxxxxxxx> wrote:
> > On 13 Feb 2010, at 17:56 , Trent Gamblin wrote:
> >> Here's a patch. Maybe Evert can verify if this is actually correct
> >> behaviour
> >> on OS X.
> >
> > I guess.
> > What does the added INSTALL_NAME_DIR line do and why is it needed?
In short, the install_name of any library you link with is copied into
the executable. At load time that is where the dynamic linker will look
for the library. (Pretty stupid, IMHO.)
Allegro 4.4 does this:
+function(set_our_framework_properties target nm)
+ if(WANT_FRAMEWORKS)
+ if(WANT_EMBED)
+ set(install_name_dir "@executable_path/../Frameworks")
+ else()
+ set(install_name_dir "${FRAMEWORK_INSTALL_PREFIX}")
+ endif(WANT_EMBED)
+ set_target_properties(${target}
+ PROPERTIES
+ FRAMEWORK on
+ OUTPUT_NAME ${nm}
+ INSTALL_NAME_DIR "${install_name_dir}"
+ )
+ endif(WANT_FRAMEWORKS)
+endfunction(set_our_framework_properties)
So INSTALL_NAME_DIR depends if the user is building an embeddable
framework or not. But the dynamic linker falls back to
/Library/Frameworks if the embedded framework isn't found anyway, so I
don't know why you would need an explicitly non-embeddable framework.
Anyway, Allegro 4.4 has the details. I just have to get around to
making the same changes for 4.9.
http://p.sf.net/sfu/intel-sw-dev
Peter
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |