<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes this looks like an option. Thanks for the lead. It is not quite what I was expecting. <br><br>This seems specific to Boost Libraries. Which brings up 2 questions:<br><br>Is there a generic way do this for any third party source tree?<br> Is there going to be CMAKE variable name resolution clash potential without namespace resolution within CMake (or is there already this problem or have I missed something)?<br><br>What I would like to do is set (please bear with me as I am a complete nube to CMake)<br> <br>BUILD_PROJECTS=none<br><br>Then do<br><br>add_subdirectory(boost_source_dir)<br><br>project( my_exe )<br>add_executable( my_exe mysource.cpp )<br>add_library( boost_filesystem SHARED)<br>#An IMPORTED library target references a library file located outside the project. No rules are generated to build it. <- Too bad about this last statement<br> <br>or<br><br>add_dependencies( my_exe boost_filesystem )<br><br><br>Is there any mechanism for project level resolution of third party source targets such as in bjam boost//boost_filesystem<br><br>project<br> : requirements <library>../build//boost_filesystem<br> <library>/boost/system//boost_system<br> <hardcode-dll-paths>true<br> ;<br><br><br>project boost/filesystem<br> : source-location ../src<br> : usage-requirements # pass these requirement to dependents (i.e. users)<br> <link>shared:<define>BOOST_FILESYSTEM_DYN_LINK=1<br> <link>static:<define>BOOST_FILESYSTEM_STATIC_LINK=1<br> ;<br><br>And boost_filesystem's use:<br><br>project <br> : requirements<br> <library>/boost/filesystem//boost_filesystem<br> <toolset>msvc:<asynch-exceptions>on<br> ;<br><br>where some syntax like:<br><br>add_subdirectory(boost_source_dir PROJECT boost )<br><br>add_dependencies( my_exe boost//boost_filesystem )<br> <br>or<br><br>add_library( boost//boost_filesystem SHARED)<br><br><br>allowing the specification and namespace resolution of the 3rdParty (boost) library<br><br>I know above does not exist as my example question shows, but if it does in some other form what is it?<br> <br>Brian<br><br><div class="gmail_quote">On Sat, Dec 5, 2009 at 3:45 PM, Mike Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> I _think_ you _might_ be able to set the BUILD_PROJECTS to<br> "file_system;system" then do the "add_subdirectory()".<br> Give it a shot and see what happens.<br> <br> _________________________________________________________<br> Mike Jackson <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br> BlueQuartz Software <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br> Principal Software Engineer Dayton, Ohio<br> <div><div></div><div class="h5"><br> <br> <br> On Sat, Dec 5, 2009 at 4:15 PM, Brian Davis <<a href="mailto:bitminer@gmail.com">bitminer@gmail.com</a>> wrote:<br> ><br> > I have used boost jam before and there was a mechanism to build only what<br> > you need by specifying dependencies within the boost libraries. bjam would<br> > then run off calculate deps and build only what I needed. In CMake is there<br> > such a feature to specify a third party library and specify only the targets<br> > you need to build as dependencies of my build target?<br> ><br> > i.e. can I use<br> ><br> > add_subdirectory( lib/3rdParty/Win32/boost-cmake-1_41_0 ./boost )<br> ><br> > then create a target that only uses say boost_filesystem and only have that<br> > built? Or do I need to build the world to get a handful of needed dll's that<br> > are actually used in my project?<br> ><br> > --<br> > Brian J. Davis<br> ><br> ><br> </div></div>> _______________________________________________<br> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br> ><br> > Visit other Kitware open-source projects at<br> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> ><br> > Please keep messages on-topic and check the CMake FAQ at:<br> > <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br> ><br> > Follow this link to subscribe/unsubscribe:<br> > <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br> ><br> </blockquote></div><br><br clear="all"><br>-- <br>Brian J. Davis<br><br></body></html>