[Cmake] Adding linker flags in CMakeLists.txt

Peter Vanroose Peter . Vanroose at esat . kuleuven . ac . be
Tue, 26 Aug 2003 09:17:35 +0200 (CEST)


> I've been trying to add a linker flag to a build on Solaris of a .so file.
> I don't see an option for adding linker flags in the documentation, just
> one for adding compiler flags.

Linker flags can be added as compiler flags as follows:

	gcc -Wl,***

(where "***" is the wanted linker flag; spaces replaced with commas).

E.g., for adding "-soname mylibrary" as linker option, use
"-Wl,-soname,mylibrary" as compiler option.


--	Peter.