From 71908495f20bc49fad8803045cc7892c5bd83a9b Mon Sep 17 00:00:00 2001 From: Max Wash Date: Thu, 14 Nov 2024 18:33:51 +0000 Subject: [PATCH] cmake: store all build artifacts in top-level bin/ and lib/ directories --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b27ce99..e2ee496 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,10 @@ string(TOLOWER ${b_system_name} b_system_name) message(STATUS "System name: ${b_system_name}") +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) + foreach (module ${b_modules}) add_subdirectory(${module}) if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${module}-test)