Browse Source

Set ar and ranlib for cross-compilation and cmake usage

Signed-off-by: falkTX <falktx@falktx.com>
pull/28/head
falkTX 2 years ago
parent
commit
2f0e475cc6
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 12 additions and 5 deletions
  1. +1
    -1
      .github/workflows/bootstrap.yml
  2. +11
    -4
      setup/functions.sh

+ 1
- 1
.github/workflows/bootstrap.yml View File

@@ -8,7 +8,7 @@ on:
branches:
- '*'
env:
CACHE_VERSION: 13
CACHE_VERSION: 14
DEBIAN_FRONTEND: noninteractive
HOMEBREW_NO_AUTO_UPDATE: 1



+ 11
- 4
setup/functions.sh View File

@@ -305,10 +305,17 @@ function build_cmake() {

if [ "${WASM}" -eq 1 ]; then
CMAKE_EXE_WRAPPER="emcmake"
fi

if [ "${CROSS_COMPILING}" -eq 1 ]; then
extraconfrules+=" -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DCMAKE_CROSSCOMPILING=ON"
elif [ "${CROSS_COMPILING}" -eq 1 ]; then
local CMAKE_AR=$(which ${TARGET_AR})
local CMAKE_RANLIB=$(which ${TARGET_RANLIB})
extraconfrules+=" -DCMAKE_CROSSCOMPILING=ON"
extraconfrules+=" -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}"
extraconfrules+=" -DCMAKE_AR=${CMAKE_AR}"
extraconfrules+=" -DCMAKE_C_COMPILER_AR=${CMAKE_AR}"
extraconfrules+=" -DCMAKE_CXX_COMPILER_AR=${CMAKE_AR}"
extraconfrules+=" -DCMAKE_RANLIB=${CMAKE_RANLIB}"
extraconfrules+=" -DCMAKE_C_COMPILER_RANLIB=${CMAKE_RANLIB}"
extraconfrules+=" -DCMAKE_CXX_COMPILER_RANLIB=${CMAKE_RANLIB}"
fi

if [ "${MACOS}" -eq 1 ]; then


Loading…
Cancel
Save