Files
rosetta/lib/libc/CMakeLists.txt
T
wash 1ec33767ab meta: replace cmake mono-build system with a custom build co-ordinator
every system component now has its own self-contained build system, and a
seed file describing the component and its build system and dependencies.

a new tool, meadow, collects and uses these seed files to build the
components into a full system. meadow also manages the target system root
and a host prefix where toolchain tools are installed to.

the build system has also been updated to use a new $ARCH-rosetta-gcc
compiler, and the patches files necessary to build it have been
added to toolchain/cross-compiler.
2026-07-19 13:34:32 +01:00

25 lines
890 B
CMake

cmake_minimum_required(VERSION 3.31)
project(libc C ASM)
set(source_dirs core malloc io exec)
set(LIBC_STANDALONE FALSE)
set(public_include_dirs
${CMAKE_CURRENT_SOURCE_DIR}/include)
foreach (dir ${source_dirs})
add_subdirectory(${dir})
set(sources ${sources} ${component_sources})
set(headers ${headers} ${component_headers})
set(public_include_dirs ${public_include_dirs} ${component_public_include_dirs})
endforeach (dir)
add_library(libc SHARED ${sources} ${headers})
target_include_directories(libc PUBLIC ${public_include_dirs})
target_link_libraries(libc PRIVATE rosetta libxpc.a liblaunch.a libmagenta.a)
target_compile_options(libc PRIVATE -ffreestanding -nostdlib)
target_link_options(libc PRIVATE -ffreestanding -nostdlib)
target_compile_definitions(libc PRIVATE ENABLE_GLOBAL_HEAP=1 BUILD_SHARED=1)
set_target_properties(libc PROPERTIES PREFIX "")
install(TARGETS libc)