diff --git a/libluna/CMakeLists.txt b/libluna/CMakeLists.txt index cb1e3b85..de882d57 100644 --- a/libluna/CMakeLists.txt +++ b/libluna/CMakeLists.txt @@ -55,3 +55,8 @@ target_compile_options(luna-freestanding PRIVATE -mno-80387 -mno-mmx -mno-sse -m target_compile_definitions(luna-freestanding PUBLIC ARCH_X86_64) target_compile_definitions(luna PUBLIC ARCH_X86_64) endif() + +add_custom_command( + TARGET luna + COMMAND "${CMAKE_COMMAND}" -E copy ${CMAKE_CURRENT_BINARY_DIR}/libluna.a ${LUNA_BASE}/usr/lib/libluna.a +) diff --git a/libos/CMakeLists.txt b/libos/CMakeLists.txt index 52dd7525..df35f48a 100644 --- a/libos/CMakeLists.txt +++ b/libos/CMakeLists.txt @@ -24,3 +24,8 @@ target_include_directories(os PUBLIC ${LUNA_BASE}/usr/include) if("${LUNA_ARCH}" MATCHES "x86_64") target_compile_definitions(os PUBLIC ARCH_X86_64) endif() + +add_custom_command( + TARGET os + COMMAND "${CMAKE_COMMAND}" -E copy ${CMAKE_CURRENT_BINARY_DIR}/libos.a ${LUNA_BASE}/usr/lib/libos.a +)