[CMake] TARGET_LINK_LIBRARIES with full path libraries

Andreas Naumann Andreas-Naumann at gmx.net
Thu Sep 18 02:29:15 EDT 2014


Am 17.09.2014 22:00, schrieb Alexander Neundorf:
> On Wednesday, September 17, 2014 14:50:40 Volker Pilipp wrote:
> ...
>> I suppose it is the line
>> LIBRARY_PATH=/opt/XXX/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/:/opt/XXX/lib/g
>> cc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib64/:/lib/../lib64/:/usr/lib
>> /../lib64/:/opt/XXX/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../:/lib/:/
>> usr/lib/
> yes, cmake checks $LIBRARY_PATH and uses -l for the libraries located in these
> directories.
> I stumbled about that behaviour last year or so, I guess it's a feature.
>
> Alex
>
It less a feature of cmake, much more a feature of gcc. It interprets 
every directory in LIBRARY_PATH as system directory and reports this to 
cmake, so it assumes, that those directories are system directories.

Andreas


More information about the CMake mailing list