Am Dienstag, 29. August 2017, 11:21:42 schrieb Robert Dailey: > Ok I debugged find_path() code in CMake and I determined the problem. > First, let me explain what I'm doing a little more... > > I build third party libraries on demand during configure step in > CMake. I do so via execute_process() to invoke another CMake instance, > that builds and installs a library. This is similar to how > ExternalProject_Add() works, but forces it to happen at configure time > so I can use find_package() afterwards to find the library I just > built.
The trick with ExternalProject_Add is to also build your project with it, and not with add_subdirectory, i.e. the CMakeLists.txt that drives the build needs to be one level above your actual project. This way all things are done in order, so the dependencies are build before your main project. Eike --
signature.asc
Description: This is a digitally signed message part.
-- 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-developers