Pau Garcia i Quiles wrote: > CMake should wrap every variable defined under the directory added with > add_subdirectory(QtZeroConf NAMESPACE QTZEROCONF)
So, CMake needs to first determine what variables are used in the QtZeroConf directory (presumably without executing the cmake code there) and then wrap the variables, then execute the cmake code? I must be missing something. I don't think that's possible. > 3rdparty/CMakeLists.txt contains ExternalProject_Add(QtZeroConf ...) > > and > > server/CMakeLists.txt contains find_package(QtZeroConf) I think you need: ExternalProject_Add(3rdparty/Whatever ...) ExternalProject_Add(3rdparty/QtZeroConf ...) ExternalProject_Add(server ...) and pass appropriate args to the latter, including where to look for dependencies etc (and dependencies among the ExternalProjects). You might not like this solution, but as far as I know it is the only correct solution built into CMake. Thanks, Steve. -- 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