[CMake] How to integrate 3rd-party software into cmake system

Brandon Van Every bvanevery at gmail.com
Sat Jun 9 02:27:17 EDT 2007


On 6/9/07, Clark J. Wang <dearvoid at gmail.com> wrote:
> ADD_CUSTOM_COMMAND(
>     OUTPUT ${hellolib} ${helloexe}
>     COMMAND make -C ${hellodir}
>     COMMAND cp ${hellodir}/libhello.so ${hellolib}
>     COMMAND cp ${hellodir}/hello ${helloexe}
> )

Unfortunately you've discovered the difference between file level
dependencies and target level dependencies.  You're going to need an
ADD_CUSTOM_TARGET and an ADD_DEPENDENCIES.  Unfortunately the FAQ
doesn't have an entry for this, and I'm too tired to write one.


Cheers,
Brandon Van Every


More information about the CMake mailing list