1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:37:45 +00:00

Toolchain: Allow building using CMake on macOS

This commit is contained in:
Stefano Cristiano 2020-07-08 23:57:51 +02:00 committed by Andreas Kling
parent 617655db0d
commit a1e1aa96fb
3 changed files with 32 additions and 5 deletions

View file

@ -54,10 +54,15 @@ set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/i386/plt_trampoline.S)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSERENITY_LIBC_BUILD")
find_program(INSTALL_COMMAND ginstall)
if(NOT INSTALL_COMMAND)
set(INSTALL_COMMAND install)
endif()
add_library(crt0 STATIC crt0.cpp)
add_custom_command(
TARGET crt0
COMMAND install -D $<TARGET_OBJECTS:crt0> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0.o
COMMAND ${INSTALL_COMMAND} -D $<TARGET_OBJECTS:crt0> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0.o
)
set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES})