Toolchain: Use dynamic paths for cross-compile CMake toolchains

`CMAKE_INSTALL_PREFIX` is supposed to be the in-system installation
path. The sysroot path on the host doesn't belong there, since other
applications will duplicate that path when applying their respective
sysroot.
This commit is contained in:
Tim Schumacher 2021-10-18 16:08:37 +02:00 committed by Andreas Kling
parent 9a4e125468
commit 8f060bed17
Notes: sideshowbarker 2024-07-18 01:42:58 +09:00
2 changed files with 4 additions and 4 deletions

View file

@ -11,8 +11,8 @@ set(TOOLCHAIN_PATH ${TOOLCHAIN_ROOT}/bin)
# 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_INSTALL_PREFIX /usr/local)
set(CMAKE_INSTALL_DATAROOTDIR share)
set(CMAKE_C_COMPILER ${TOOLCHAIN_PATH}/clang)
set(CMAKE_C_COMPILER_TARGET ${triple})

View file

@ -11,8 +11,8 @@ set(TOOLCHAIN_PREFIX ${TOOLCHAIN_PATH}/${triple}-)
# 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_INSTALL_PREFIX /usr/local)
set(CMAKE_INSTALL_DATAROOTDIR share)
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)