[CMake] Re: OS X Framework testing
E. Wing
ewmailing at gmail.com
Sat Dec 31 07:11:43 EST 2005
Thanks, that seemed to do the trick. I think I introduced the
semi-colon (list) originally to get around a problem with this call.
But the new changes seem to break that. I guess I should go back and
reconsider that semicolon in the other file.
Thanks,
Eric
On 12/29/05, Brad King <brad.king at kitware.com> wrote:
> E. Wing wrote:
> > TARGET_LINK_LIBRARIES(DetermineSoundLibs
> > \"${SDL_SOUND_LIBRARY} ${SDL_LIBRARY}\")"
> > )
> [snip]
> > SDL_SOUND_LIBRARIES is /Library/Frameworks/SDL_sound.framework
> > SDL_LIBRARY is /Library/Frameworks/SDL.framework;-framework Cocoa
> [snip]
> > I'm thinking that TARGET_LINK_LIBRARIES (and probably
> > INCLUDE_DIRECTORIES) needs to be able to split the string/list and
> > invoke the correct actions on each piece.
>
> The CMake language is responsible for passing the proper arguments to
> commands. You need to write the proper code into the listfile to get
> the arguments parsed properly. You probably want this:
>
> SET(SDL_TRY_LIBS)
> FOREACH(lib ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY})
> SET(SDL_TRY_LIBS "${SDL_TRY_LIBS} \"${lib}\"")
> ENDFOREACH(lib)
> FILE(WRITE ... "...
> TARGET_LINK_LIBRARIES(DetermineSoundLibs${SDL_TRY_LIBS})
> ")
>
> -Brad
>
More information about the CMake
mailing list