[CMake] Force configure step to build and install depends before completing.

Micha Hergarden micha.hergarden at gmail.com
Fri Feb 21 01:54:44 EST 2014


On 02/20/2014 11:54 PM, Jack Smith wrote:
> I think I've have an epiphany.
>
> I've been really struggling to understand how to get my build to work,
> and it seems the problem is with the configure step of cmake.
>
> I would like to see some mechanism whereby I can delay the completion
> of the configure step of a target until the build (and install into an
> install-prefix, I suspect) of its dependencies is complete. 
>
> I think this would also require some automatic generation of
> FindXXX.cmake functionality to find that installed target in
> install-prefix.
>
> Is that possible ?
>
> As usual, what am I missing if not ?
>
> Thanks,
> Jack
>
>
Hello Jack,

At my project we also make use of some external packages that need to be
crosscompiled before our application. I use the externalproject and
manipulate the install step so that it installs the libraries in a known
directory inside the binary directory. This way you can add that
directory as hardcoded path during the configure phase of your main
project. By depending on the external project, the libraries always get
installed before the main project.
The find modules also make use of a setting called CMAKE_FIND_ROOT_PATH,
which you can set in your toolchain file. Using this setting you can let
the find modules search for Python in a specific location as well.

This approach works for me (and I build a kernel in my project as well).
Note: the above works for our project as it is not distributed to a
large number of users. If you want to distribute your project then your
needs may differ.

HTH,
Micha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140221/a436c11a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140221/a436c11a/attachment-0001.sig>


More information about the CMake mailing list