diff options
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/specifydependencies.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake index 453a7721..fac7c71d 100644 --- a/toolchain/specifydependencies.cmake +++ b/toolchain/specifydependencies.cmake @@ -83,13 +83,16 @@ file(READ "${INPUT_FILE}" CONTENTS) file(READ "stl" stl_contents) file(READ "ranlib" ranlib_contents) -string(REGEX MATCH ".+/toolchains/(.+)-([^\\-]+)/prebuilt/.*/bin/(.*)-ranlib" x ${ranlib_contents}) - +string(REGEX MATCH ".+/toolchains/llvm/prebuilt/.+/bin/(.+)-ranlib" USE_LLVM ${ranlib_contents}) if (USE_LLVM) string(REPLACE "##ANDROID_TOOL_PREFIX##" "llvm" NEWCONTENTS "${CONTENTS}") - string(REPLACE "##ANDROID_COMPILER_PREFIX##" "llvm" NEWCONTENTS "${NEWCONTENTS}") + string(REPLACE "##ANDROID_COMPILER_PREFIX##" "${CMAKE_MATCH_1}" NEWCONTENTS "${NEWCONTENTS}") string(REPLACE "##USE_LLVM##" true NEWCONTENTS "${NEWCONTENTS}") else() + string(REGEX MATCH ".+/toolchains/(.+)-([^\\-]+)/prebuilt/.+/bin/(.+)-ranlib" RANLIB_PATH_MATCH ${ranlib_contents}) + if (NOT RANLIB_PATH_MATCH) + message(FATAL_ERROR "Couldn't parse the components of the path to ${ranlib_contents}") + endif() string(REPLACE "##ANDROID_TOOL_PREFIX##" "${CMAKE_MATCH_1}" NEWCONTENTS "${CONTENTS}") string(REPLACE "##ANDROID_COMPILER_PREFIX##" "${CMAKE_MATCH_3}" NEWCONTENTS "${NEWCONTENTS}") string(REPLACE "##USE_LLVM##" false NEWCONTENTS "${NEWCONTENTS}") |