[CMake] Running find_package after dependencies are built

Richard Shaw hobbes1069 at gmail.com
Fri Oct 18 08:44:19 EDT 2013


On Fri, Oct 18, 2013 at 6:34 AM, Olaf Ryder <devbits01 at gmail.com> wrote:

> Here's the problem I'm trying to solve:
>
> * External Project A has no dependencies and generates LibraryA
> * External Project B is dependent on LibraryA
>

I worked around a similar issue to this with a project that required
wxWidgets, which using a binary to build the compile and linker flags
rathern than pkgconfig or other method.

I wrapped my whole main project in a "if(NOT BOOTSTRAP_WXWIDGETS)" build
the project. If BOOTSTRAP_WXWIDGETS it true, then it skips the main build
and builds wxWidgets instead. You still have to run cmake and make twice,
but it works.

http://sourceforge.net/p/freetel/code/HEAD/tree/fdmdv2/CMakeLists.txt

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131018/80d917d3/attachment.htm>


More information about the CMake mailing list