From 30ff704342ea9f82c8d4e088ca7473a2b6b5dce3 Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 21 Aug 2023 14:06:32 +0200 Subject: [PATCH] libluna+libos: Install built libraries into the system root This is less important for libluna, as it is built into libc, but is needed to link programs compiled inside Luna with libos. --- libluna/CMakeLists.txt | 5 +++++ libos/CMakeLists.txt | 5 +++++ 2 files changed, 10 insertions(+) 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 +)