Fennix/Userspace/libc/runtime/CMakeLists.txt
EnderIce2 201ace7eec
refactor(userspace): build using cmake
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
2025-03-15 23:05:17 +00:00

19 lines
468 B
CMake

cmake_minimum_required(VERSION 3.10)
project(FennixRuntime)
if(NOT DEFINED TARGET_OS)
message(FATAL_ERROR "TARGET_OS is not set")
endif()
if(NOT DEFINED TARGET_ARCH)
message(FATAL_ERROR "TARGET_ARCH is not set")
endif()
set(RUNTIME_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_OS}/${TARGET_ARCH}")
if(NOT EXISTS "${RUNTIME_DIR}/CMakeLists.txt")
message(FATAL_ERROR "No runtime support for ${TARGET_OS}/${TARGET_ARCH}")
endif()
add_subdirectory(${RUNTIME_DIR})