Hi Owen, Sorry to jump into the discussion, but what you're talking is something I was thinking of just recently...
I think the choice between this: On Thu, Dec 10, 2015 at 3:48 PM, Owen Alanzo Hogarth <gurenc...@gmail.com> wrote: > set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) > set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) > set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) and this: > it seems like this line in your reply above > install( TARGETS lib1 lib2 DESTINATION lib ) > install( FILES lib1/headers/lib1.h lib2/headers/lib2.h DESTINATION include ) comes down to whether you want to compile other programs with these libraries. If you will not, then you can set the paths to CMAKE_BINARY_DIR, which is the path to the top of the build tree. As far as I know, after you compile your program, you can/should delete the build tree (i.e., assuming an out-of-source build). So, most likely, you'd want to pick the second option if you need the header files and archives to build something else. This is because when you run cmake, you can set the prefix to install files to (i.e., using "make install"). In my case, I only need header files and archives to build something within a single build (i.e., various inter-related subdirectories, all under one CMakeLists.txt). So, I do something similar to the first option. I did toy with the second option a bit but, in the end, realized that much of what I wrote won't be reused by another project of mine. At least, that's my understanding of the two options above... Ray -- 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