[CMake] Adding additional libraries at configuration or building time

Alberto Luaces aluaces at udc.es
Wed May 27 03:06:05 EDT 2009


Hello,

is there any way of appending additonal libraries to a CMake project without 
touching the CMakeLists.txt file? Something like

cmake EXTRA_LIBS=-lfoo .

or 

make EXTRA_LIBS=-lfoo

My problem is that I have a system where some additonal system libraries are 
required at the end of the linking command line and, since the project is from 
a 3rd party, I don't want to modify the CMakeLists.txt file unless absolutely 
necessary.

Thanks in advance,

Alberto


More information about the CMake mailing list