CMakeLists improvements
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7952d1d8a0
commit
8e59a0a79f
@ -9,21 +9,21 @@ project(Luna LANGUAGES C CXX ASM_NASM VERSION 0.1.0)
|
|||||||
|
|
||||||
set(LUNA_ROOT ${CMAKE_CURRENT_LIST_DIR})
|
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_ASM_NASM_LINK_EXECUTABLE "x86_64-luna-ld <FLAGS> <CMAKE_ASM_NASM_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH ${LUNA_ROOT}/toolchain/x86-64-luna)
|
|
||||||
|
|
||||||
set(ARCH $ENV{ARCH})
|
set(ARCH $ENV{ARCH})
|
||||||
|
|
||||||
if(NOT DEFINED $ENV{ARCH})
|
if(NOT DEFINED $ENV{ARCH})
|
||||||
set(ARCH "x86_64")
|
set(ARCH "x86_64")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER ${ARCH}-luna-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER ${ARCH}-luna-g++)
|
||||||
|
|
||||||
|
set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
|
||||||
|
|
||||||
|
set(CMAKE_ASM_NASM_LINK_EXECUTABLE "${ARCH}-luna-ld <FLAGS> <CMAKE_ASM_NASM_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH ${LUNA_ROOT}/toolchain/x86-64-luna)
|
||||||
|
|
||||||
message(STATUS "Configuring Luna for ${ARCH}")
|
message(STATUS "Configuring Luna for ${ARCH}")
|
||||||
|
|
||||||
add_subdirectory(luna)
|
add_subdirectory(luna)
|
||||||
|
Loading…
Reference in New Issue
Block a user