(This is really a continuation of a discussion from 25/26 January.) I'm still confused about ExternalProject_Add and libraries.
I'd like to get to the point where I (or more likely a process somewhere) can check out a project, then run cmake and ninja (or make or whatever) and have that build the project and its dependencies. Concretely, suppose I have a trivial project that uses libcrypto from OpenSSL and I have a local repository with OpenSSL with some patches to build it with cmake. One suggestion is that I can use ExternalProject_Add to download and build this openssl which can then export a FindOpenSSL.cmake script. But that happens too late, doesn't it? When I run cmake on my project it can't use find_library and things to find the right library files since those won't exist until I actually build the project? Hence hunter's approach of downloading and building projects during the cmake process, I imagine. Which feels a bit icky, but maybe it's really the most straightforward way to do it? I think I might resort to some trickery: build the various dependent things on the platforms I care about, and then have my main project just know about where the interesting targets are relative to BINARY_DIR for each of the external projects. (Or use the approach of hunter, or use some build script.) Am I missing something obvious? It feels like I must be somehow. -- 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