aboutsummaryrefslogtreecommitdiff
path: root/toolchain/specifydependencies.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/specifydependencies.cmake')
-rw-r--r--toolchain/specifydependencies.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/toolchain/specifydependencies.cmake b/toolchain/specifydependencies.cmake
index 9cab3f2d..942e88e2 100644
--- a/toolchain/specifydependencies.cmake
+++ b/toolchain/specifydependencies.cmake
@@ -51,7 +51,13 @@ endif()
file(READ "${INPUT_FILE}" CONTENTS)
file(READ "stl" stl_contents)
-string(REPLACE "##EXTRALIBS##" "${extralibs}" NEWCONTENTS "${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}")
+string(REPLACE "##EXTRALIBS##" "${extralibs}" NEWCONTENTS "${NEWCONTENTS}")
string(REPLACE "##EXTRAPLUGINS##" "${extraplugins}" NEWCONTENTS "${NEWCONTENTS}")
string(REPLACE "##CMAKE_CXX_STANDARD_LIBRARIES##" "${stl_contents}" NEWCONTENTS "${NEWCONTENTS}")
file(WRITE "${OUTPUT_FILE}" ${NEWCONTENTS})