Hi,

I'm trying to solve the following the problem: I have a C++ application
and a dependency fetching script. I want to simplify the initial build
such that the following happens: On the first run of cmake, the compiler
ID and version is passed to an external script, which fetches some
pre-build binaries. It then writes a CMake file which contains basically
only set(FOO_INCLUDE_DIR /dep-dir), set(FOO_LIBRARY_DIR /dep-dir)
commands. CMake would then read this file and subsequent find_library
calls would pick up the values from this new CMake file. The idea is
that "actual" build is dependent on this first dependency step, but it's
already within the CMake framework so I can grab the compiler info and
other build info.

The obvious problem is that while I can easily run the external script
by using configure_file, and have a custom target that does the
dependency fetching and CMake configure file generation. But I don't see
an easy way to get CMake to make the "rest of the project" depend on
that configure file. How can I make such a "two-stage" build with CMake?

Cheers,
  Matthäus
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to