Dmitry Marakasov wrote:
* Andreas Pakulat ([EMAIL PROTECTED]) wrote:
sdl-config --libs:
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -pthread
sdl-config --cflags:
-I/usr/local/include/SDL -I/usr/local/include -D_GNU_SOURCE=1 -D_REENTRANT
So I thought it would be safer to use sdl-config and let user specify
path to in if it's not in $PATH.
Not really, because you're basically just using CMake as "another" way
of passing arguments to the compiler.
True, but it's often convinient to use CMake this way. While I
understand that CMake's goal is to be cross-platform build tool,
support for just passing whatever (`foobar --args`, -Wl etc.) to
compiler/linker is still nice for local usage. I'm not aware on
official cmake team politics here though, as not permitting to do
this stuff also has it's beneits (i.e. to avoid breakages as in my
case).
The problem is that it will not work with all generators. For example
Xcode can not run stuff like that because it is not using the shell.
Same goes for Visual Studio and future IDE projects. Also injecting
stuff into the link process hides it from CMake, so it is not able to
process that information and do things like order link libraries and
modify flags for what ever reason might be needed. So, in some versions
of CMake this worked as a fluke, but it will not be supported in the
future. The big change that happened is that CMake now uses a link
file to be able to handle broken shells that have command line
limitations. So, the link line does not even get processed by the shell
anymore.
-Bill
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake