aboutsummaryrefslogtreecommitdiff
path: root/toolchain/specifydependencies.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/specifydependencies.cmake')
-rw-r--r--toolchain/specifydependencies.cmake15
1 files changed, 12 insertions, 3 deletions
diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake
index d21250c1..905b62c3 100644
--- a/toolchain/specifydependencies.cmake
+++ b/toolchain/specifydependencies.cmake
@@ -73,9 +73,18 @@ file(READ "stl" stl_contents)
file(READ "ranlib" ranlib_contents)
string(REGEX MATCH ".+/toolchains/(.+)-([^\\-]+)/prebuilt/.*/bin/(.*)-ranlib" x ${ranlib_contents})
-string(REPLACE "##ANDROID_TOOL_PREFIX##" "${CMAKE_MATCH_1}" NEWCONTENTS "${CONTENTS}")
-string(REPLACE "##ANDROID_TOOLCHAIN_VERSION##" "${CMAKE_MATCH_2}" NEWCONTENTS "${NEWCONTENTS}")
-string(REPLACE "##ANDROID_COMPILER_PREFIX##" "${CMAKE_MATCH_3}" NEWCONTENTS "${NEWCONTENTS}")
+if (USE_LLVM)
+ string(REPLACE "##ANDROID_TOOL_PREFIX##" "llvm" NEWCONTENTS "${CONTENTS}")
+ string(REPLACE "##ANDROID_COMPILER_PREFIX##" "llvm" NEWCONTENTS "${NEWCONTENTS}")
+ string(REPLACE "##USE_LLVM##" true NEWCONTENTS "${NEWCONTENTS}")
+else()
+ 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}")
+endif()
+
+string(REPLACE "##ANDROID_TOOLCHAIN_VERSION##" "${CMAKE_MATCH_2}" NEWCONTENTS "${NEWCONTENTS}") # not used when USE_LLVM is set
+
string(REPLACE "##EXTRALIBS##" "${extralibs}" NEWCONTENTS "${NEWCONTENTS}")
string(REPLACE "##EXTRAPLUGINS##" "${extraplugins}" NEWCONTENTS "${NEWCONTENTS}")
string(REPLACE "##CMAKE_CXX_STANDARD_LIBRARIES##" "${stl_contents}" NEWCONTENTS "${NEWCONTENTS}")