mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
6fe7d4d7b8
the vanilla versions might not handle all things, that gcc can do; For example is lto not really supported by the vanilla versions source: https://gcc.gnu.org/wiki/LinkTimeOptimizationFAQ
33 lines
1.1 KiB
Text
33 lines
1.1 KiB
Text
set(CMAKE_SYSTEM_NAME SerenityOS)
|
|
|
|
if (NOT DEFINED ENV{SERENITY_ARCH})
|
|
message(FATAL_ERROR "SERENITY_ARCH not set.")
|
|
endif()
|
|
|
|
if (NOT DEFINED ENV{SERENITY_SOURCE_DIR})
|
|
message(FATAL_ERROR "SERENITY_SOURCE_DIR not set.")
|
|
endif()
|
|
|
|
set(SERENITYOS 1)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR "$ENV{SERENITY_ARCH}")
|
|
|
|
set(SERENITY_BUILD_DIR $ENV{SERENITY_SOURCE_DIR}/Build/$ENV{SERENITY_ARCH})
|
|
|
|
# where to read from/write to
|
|
set(CMAKE_SYSROOT ${SERENITY_BUILD_DIR}/Root)
|
|
set(CMAKE_STAGING_PREFIX ${SERENITY_BUILD_DIR}/Root/usr/local)
|
|
set(CMAKE_INSTALL_PREFIX ${SERENITY_BUILD_DIR}/Root/usr/local)
|
|
set(CMAKE_INSTALL_DATAROOTDIR ${SERENITY_BUILD_DIR}/Root/usr/local/share)
|
|
|
|
set(CMAKE_AR $ENV{SERENITY_ARCH}-pc-serenity-gcc-ar)
|
|
set(CMAKE_RANLIB $ENV{SERENITY_ARCH}-pc-serenity-gcc-ranlib)
|
|
set(CMAKE_C_COMPILER $ENV{SERENITY_ARCH}-pc-serenity-gcc)
|
|
set(CMAKE_CXX_COMPILER $ENV{SERENITY_ARCH}-pc-serenity-g++)
|
|
|
|
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 ONLY)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "$ENV{SERENITY_SOURCE_DIR}/Toolchain/CMake")
|