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

Root CMakeLists.txt:
add_subdirectory(external_project_a)
add_subdirectory(external_project_b)

External Project A CMakeLists.txt:
ExternalProject_Add(projectA ...)

External Project B CMakeLists.txt:
find_package(LibraryA)
ExternalProject_Add(projectB ...)


When I configure CMake, it finds an old, locally installed version of
LibraryA. When cross-compiling, I want External Project B's
find_package(LibraryA) to find the newly cross-compiled LibraryA.

It feels like I need to somehow "run find_package again" at that point so
it finds the right one. Right now I can manually make it work by
building/installing External Project A then manually clearing my build
folder and re-running CMake.

How do I get External Project B to see the new cross-compiled LibraryA?

Thanks
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to