[CMake] linking: absolute path vs -l<libname>

Nico Schlömer nico.schloemer at gmail.com
Wed Sep 2 18:12:39 EDT 2015


Indeed,
```
get_target_property(out ${netCDF_LIBRARIES} LOCATION)
message(${out})
```
gives
```
/usr/lib/x86_64-linux-gnu/libnetcdf.so.7.3.0
```
This value appears to be set in the CMake export file
```
/usr/lib/x86_64-linux-gnu/cmake/netCDF/netCDFTargets-none.cmake
```
What does this mean?

--Nico

On Wed, Sep 2, 2015 at 10:46 PM Alexander Neundorf <a.neundorf-work at gmx.net>
wrote:

> On Wednesday, September 02, 2015 20:28:35 Nico Schlömer wrote:
> > Curiously,
> > ```
> > message(${ZLIB_LIBRARIES})
> > message(${netCDF_LIBRARIES})
> > ```
> > yields
> > ```
> > /usr/lib/x86_64-linux-gnu/libz.so
> > netcdf
> > ```
> > Hm, I would have expected it the other way around. :)
>
>
> maybe "netcdf" is the name of an imported target.
> Can you check that (e.g. by trying to get a target property from it and if
> so
> , figure out the attached location ?
>
> Alex
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150902/f33a47c3/attachment.html>


More information about the CMake mailing list