2023-10-23 13:27:23 +03:00
|
|
|
if (NOT DEFINED ENV{BANAN_ARCH})
|
|
|
|
message(FATAL_ERROR "environment variable BANAN_ARCH not defined")
|
|
|
|
endif ()
|
|
|
|
set(BANAN_ARCH $ENV{BANAN_ARCH})
|
|
|
|
|
2023-11-04 17:50:43 +02:00
|
|
|
if (NOT DEFINED ENV{BANAN_SYSROOT})
|
|
|
|
message(FATAL_ERROR "environment variable BANAN_SYSROOT not defined")
|
|
|
|
endif ()
|
|
|
|
set(BANAN_SYSROOT $ENV{BANAN_SYSROOT})
|
|
|
|
|
|
|
|
if (NOT DEFINED ENV{BANAN_SYSROOT_TAR})
|
|
|
|
message(FATAL_ERROR "environment variable BANAN_SYSROOT_TAR not defined")
|
|
|
|
endif ()
|
|
|
|
set(BANAN_SYSROOT_TAR $ENV{BANAN_SYSROOT_TAR})
|
|
|
|
|
2024-12-03 20:18:24 +02:00
|
|
|
if (NOT DEFINED ENV{BANAN_ROOT_DIR})
|
|
|
|
message(FATAL_ERROR "environment variable BANAN_ROOT_DIR not defined")
|
|
|
|
endif ()
|
|
|
|
set(TOOLCHAIN_PREFIX $ENV{BANAN_ROOT_DIR}/toolchain/local)
|
2023-10-23 13:27:23 +03:00
|
|
|
|
|
|
|
set(CMAKE_SYSTEM_NAME banan-os)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
|
|
|
|
2024-12-03 20:18:24 +02:00
|
|
|
set(CMAKE_SYSROOT ${BANAN_SYSROOT})
|
|
|
|
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
|
|
|
|
|
2023-10-23 13:27:23 +03:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
|
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}/bin/${BANAN_ARCH}-banan_os-g++)
|
|
|
|
set(CMAKE_CXX_COMPILER_WORKS True)
|
|
|
|
|
|
|
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}/bin/${BANAN_ARCH}-banan_os-gcc)
|
|
|
|
set(CMAKE_C_COMPILER_WORKS True)
|