Merge pull request #1065

1855213 Attempt to fix broken compilation on some systems caused by #1074 (iDunk5400)
This commit is contained in:
Riccardo Spagni 2016-09-15 15:18:21 +02:00
commit 23d99930b8
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 9 additions and 6 deletions

View File

@ -502,12 +502,15 @@ else()
# -DCHOST=... or -DCMAKE_AR=... and -DCMAKE_RANLIB=...
if (DEFINED CHOST)
set(CHOST_PREFIX "${CHOST}-")
endif()
if (NOT DEFINED CMAKE_AR)
set(CMAKE_AR "${CHOST_PREFIX}gcc-ar")
endif()
if (NOT DEFINED CMAKE_RANLIB)
set(CMAKE_RANLIB "${CHOST_PREFIX}gcc-ranlib")
if (NOT DEFINED CMAKE_AR)
set(CMAKE_AR "${CHOST_PREFIX}gcc-ar")
endif()
if (NOT DEFINED CMAKE_RANLIB)
set(CMAKE_RANLIB "${CHOST_PREFIX}gcc-ranlib")
endif()
else()
set(CMAKE_AR "gcc-ar")
set(CMAKE_RANLIB "gcc-ranlib")
endif()
endif()
endif()