[CMake] fftw library in cmake

Nils Gladitz nilsgladitz at gmail.com
Fri Apr 21 09:49:52 EDT 2017


On 04/21/2017 03:40 PM, aishwarya selvaraj wrote:

> add_library(fftw STATIC IMPORTED)
[...]
> TARGET_LINK_LIBRARIES(prose fftw  )
[...]
> make[2]: *** No rule to make target `fftw-NOTFOUND', needed by 
> `prose'. Stop.

You are creating an IMPORTED target "fftw" but you aren't populating its 
IMPORTED_LOCATION [1] (or IMPORTED_LOCATION_<CONFIG> [2]) target property.
Without it CMake does not know what on disk library file to link to.

You can set target properties with set_property() or 
set_target_properties().

Nils

[1] https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_LOCATION.html
[2] 
https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_LOCATION_CONFIG.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170421/4a40efef/attachment.html>


More information about the CMake mailing list