Great to see these examples with pros and cons. I believe the staticlibs-include example [0] pattern, though mentioned in Mastering CMake [1], generally is deprecated in favor of add_subdirectory with CMakeLists.txt at each level for self-contained projects.
[0] https://github.com/toomuchatonce/cmake-examples/tree/master/staticlibs-include [1] Mastering CMake, 6th Edition, Chapter 7: Converting Existing Systems to CMake, Source Code Directory Structures, page 116 On Mon, Jun 2, 2014 at 5:23 PM, Adam Boseley <adam707b...@gmail.com> wrote: > > There's a lot of legacy examples around the web but not too many using the > newer features. What is the current best practise? > > Here's some simple examples > https://github.com/toomuchatonce/cmake-examples/wiki/cmake-patterns-and-examples > > Are these patterns or anti-patterns? > > Regards, > Adam > > -- > > 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 -- 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