25 lines
723 B
CMake
25 lines
723 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
|
|
)
|
|
|
|
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()
|
|
|
|
if(LUNA_DEBUG_SYMBOLS)
|
|
message(STATUS "Building libOS with debug symbols")
|
|
target_compile_options(os PRIVATE -ggdb)
|
|
else()
|
|
target_compile_options(os PRIVATE -Os)
|
|
endif()
|