[CMake] OS X Framework testing
Brad King
brad.king at kitware.com
Thu Dec 29 14:39:57 EST 2005
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