28 lines
588 B
CMake
28 lines
588 B
CMake
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_NASM VERSION 0.1.0)
|
|
|
|
set(LUNA_ROOT ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
set(CMAKE_C_COMPILER x86_64-luna-gcc)
|
|
set(CMAKE_CXX_COMPILER x86_64-luna-g++)
|
|
|
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH ${LUNA_ROOT}/toolchain/x86-64-luna)
|
|
|
|
set(ARCH $ENV{ARCH})
|
|
|
|
if(NOT DEFINED $ENV{ARCH})
|
|
set(ARCH "x86_64")
|
|
endif()
|
|
|
|
message(STATUS "Configuring Luna for ${ARCH}")
|
|
|
|
add_subdirectory(luna)
|
|
add_subdirectory(kernel) |