Luna/libos/CMakeLists.txt
apio 7c0ff8c75a
All checks were successful
Build and test / build (push) Successful in 1m50s
libos+init: Add a standard API for config file access
2024-09-01 12:40:37 +02:00

39 lines
1002 B
CMake

# The C++ standard library for OS operations (userspace only), so most things that have to do with calling the kernel, or functions that the kernel has no use for.
file(GLOB HEADERS include/os/*.h)
set(SOURCES
${HEADERS}
src/ArgumentParser.cpp
src/EventLoop.cpp
src/File.cpp
src/FileSystem.cpp
src/Process.cpp
src/Directory.cpp
src/Main.cpp
src/Path.cpp
src/Mode.cpp
src/Prompt.cpp
src/Security.cpp
src/LocalServer.cpp
src/LocalClient.cpp
src/IPC.cpp
src/SharedMemory.cpp
src/Timer.cpp
src/Config.cpp
)
add_library(os ${SOURCES})
target_compile_options(os PRIVATE ${COMMON_FLAGS})
target_include_directories(os PUBLIC include/)
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
)