On Mon, Aug 17, 2015 at 10:17 AM, James Johnston
<jam...@motionview3d.com> wrote:
> Well, you'd do this in conjunction with ExternalProject_Add.  A well-written
> CMake external project will provide a <project>Config.cmake file which you
> will then find using find_package.

After toying around with this idea for a bit, I've found out that
ExternalProject_Add() actually builds the project from a custom target
within Visual Studio (I'm using VS as my generator). However,
find_package() works at CMake configure time, so this is a chicken &
egg problem. find_package() won't work because the external project
has not been built yet.

How do you solve this problem?

> A high-level CMake project that does nothing but call ExternalProject_Add;
> this is called a superbuild.  Your own CMake projects will be
> ExternalProjects to this high-level project and the superbuild would pass
> the location to your project via -D<project>_DIR=<location> so that
> find_package can locate the Config file.

I'm not sure I understand this. This smells related to my question
above, maybe an answer even. Can you clarify/go into more detail?
Thanks a bunch.
-- 

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