From 06061b0e3ce4342b5cbb1c0e6c8d285b524e30f0 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 16 Nov 2018 19:17:45 +0100 Subject: Android: improve clang support Summary: Infer the toolchain we are using through cmake's detection of ranlib instead of asking the user to fill it. It's only used in androiddeployqt and cmake expects it to be version "clang" for clang builds while androiddeployqt expects it to be "4.9". Reviewers: #build_system, #android, vkrause Reviewed By: #android, vkrause Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D16930 --- toolchain/ECMAndroidDeployQt.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'toolchain/ECMAndroidDeployQt.cmake') diff --git a/toolchain/ECMAndroidDeployQt.cmake b/toolchain/ECMAndroidDeployQt.cmake index 66dbbd6e..25da4a23 100644 --- a/toolchain/ECMAndroidDeployQt.cmake +++ b/toolchain/ECMAndroidDeployQt.cmake @@ -44,7 +44,13 @@ function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_ file(WRITE ${CMAKE_BINARY_DIR}/stl "${OUTSTR}") endif() endfunction() + function(haveranlib var access VALUE) + if (NOT VALUE STREQUAL "") + file(WRITE ${CMAKE_BINARY_DIR}/ranlib "${VALUE}") + endif() + endfunction() variable_watch(CMAKE_CXX_STANDARD_LIBRARIES havestl) + variable_watch(CMAKE_RANLIB haveranlib) if (NOT TARGET create-apk) add_custom_target(create-apk) -- cgit v1.2.1