cmake_minimum_required(VERSION 3.8..3.22) set(CMAKE_C_COMPILER_WORKS 1) set(CMAKE_CXX_COMPILER_WORKS 1) set(CMAKE_CROSSCOMPILING true) project(Luna LANGUAGES C CXX ASM ASM_NASM VERSION 0.1.0) set(LUNA_ROOT ${CMAKE_CURRENT_LIST_DIR}) set(LUNA_BASE ${CMAKE_CURRENT_LIST_DIR}/base) set(LUNA_ARCH $ENV{LUNA_ARCH}) if(NOT DEFINED LUNA_ARCH) set(LUNA_ARCH "x86_64") endif() set(CMAKE_C_COMPILER ${LUNA_ARCH}-luna-gcc) set(CMAKE_CXX_COMPILER ${LUNA_ARCH}-luna-g++) set(CMAKE_ASM_COMPILER ${LUNA_ARCH}-luna-gcc) set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64) set(CMAKE_ASM_NASM_LINK_EXECUTABLE "${LUNA_ARCH}-luna-ld -o ") set(CMAKE_FIND_ROOT_PATH ${LUNA_ROOT}/toolchain/${LUNA_ARCH}-luna) message(STATUS "Configuring Luna for ${LUNA_ARCH}") add_subdirectory(libluna) add_subdirectory(libos) add_subdirectory(libc) add_subdirectory(kernel) add_subdirectory(apps)