Kees Bakker wrote: > On 23 Aug, 2010, at 20:00 , Martin Costabel wrote: [] >> Do you have a concrete example where the value "LAST" for >> CMAKE_FIND_FRAMEWORK leads to serious trouble? > > Yes, I have a program that I want to link against my own copy > of the SDL framework. It doesn't really matter where I put it, > it keeps finding the SDL library in /sw
I did some testing: Installing a SDL.framework in /Library/Frameworks(*) and a cmake package that has CMAKE_FIND_FRAMEWORK=FIRST, I tried to build at random one of Fink's game packages that use sdl, violetland-0.2.10-1002. It failed on linking the executable, with some undefined symbols. Without trying to go to the bottom of the failure, I strongly suspect that the reason is that it finds a mixture of the sdl framework with some other sdl parts from Fink: costabel% grep -i sdl /sw/src/fink.build/violetland-0.2.10-1002/violetland-v0.2.10/CMakeCache.txt SDLIMAGE_INCLUDE_DIR:PATH=/sw/include/SDL SDLIMAGE_LIBRARY:FILEPATH=/sw/lib/libSDL_image.dylib SDLMIXER_INCLUDE_DIR:PATH=/sw/include/SDL SDLMIXER_LIBRARY:FILEPATH=/sw/lib/libSDL_mixer.dylib SDLTTF_INCLUDE_DIR:PATH=/sw/include/SDL SDLTTF_LIBRARY:FILEPATH=/sw/lib/libSDL_ttf.dylib SDL_INCLUDE_DIR:PATH=/Library/Frameworks/SDL.framework/Headers //Where the SDL Library can be found SDL_LIBRARY:STRING=/Library/Frameworks/SDL.framework;-framework Cocoa SDL_LIBRARY_TEMP:INTERNAL=/Library/Frameworks/SDL.framework;-framework Cocoa With the cmake package that has CMAKE_FIND_FRAMEWORK=LAST, it builds without any problem. I suspect the same problems will arise with other Fink packages. Thus the question is whether we want to protect all cmake-using Fink packages individually against stuff that might or might not be installed in /Library/Frameworks (and system stuff in /System/Library/Frameworks that we might not want to link against) or have a slightly non-standard default that does this protection globally. In your case, I suppose setting some cmake flags, like SDL_INCLUDE_DIR and SDL_LIBRARY, to point to the framework in ~/Library/Frameworks should do the trick. (*) Placing the framework in ~/Library/Frameworks does not expose it to cmake during Fink builds, because then the $HOME environment variable is set differently, so "~" does not expand to /Users/costabel, but to something like /var/folders/I5/I5XYEUYz2RWfpk+8ZKtEU++++TI/-Tmp-/fink-build-HOME.gm9A4gNcfa -- Martin ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Fink-devel mailing list Fink-devel@lists.sourceforge.net http://news.gmane.org/gmane.os.apple.fink.devel Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-devel