[CMake] Invoking an script from the link command.
Bill Hoffman
bill.hoffman at kitware.com
Mon Aug 11 19:56:53 EDT 2008
Óscar Fuentes wrote:
> Óscar Fuentes <ofv at wanadoo.es> writes:
>
> [snip]
>
> Solved:
>
> target_link_libraries(myexe "`/path/to/script arg1 arg2`")
>
This is in general a non-portable way to write cmake files, and is not
guaranteed to work in any version of CMake. This is the same as a
pkg-config script. The way to do this is to use execute_process and
collect the output at cmake time, and then use target_link_libraries.
-Bill
More information about the CMake
mailing list