diff options
author | Sharaf Zaman <sharafzaz121@gmail.com> | 2019-04-15 05:55:20 +0530 |
---|---|---|
committer | Sharaf Zaman <sharafzaz121@gmail.com> | 2019-04-17 21:26:52 +0530 |
commit | 307b36662ec9dcf125a589ca24dd69886698fd2b (patch) | |
tree | 4baf5142e3c9e13ee81ca17ba240152d9de8cc28 | |
parent | 24538afeaf610429726c28456ebd8c5bc8652f25 (diff) | |
download | extra-cmake-modules-5.58.0.tar.gz extra-cmake-modules-5.58.0.tar.bz2 |
Bug fix: find c++ stl using regexv5.58.0-rc1v5.58.0
Summary:
Find C++ shared lib path using regex. This change makes finding path
independent of the order in which it was added by cmake.
Reviewers: apol
Reviewed By: apol
Subscribers: kde-buildsystem, kde-frameworks-devel
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D20558
-rw-r--r-- | toolchain/ECMAndroidDeployQt.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toolchain/ECMAndroidDeployQt.cmake b/toolchain/ECMAndroidDeployQt.cmake index 25da4a23..41bc1499 100644 --- a/toolchain/ECMAndroidDeployQt.cmake +++ b/toolchain/ECMAndroidDeployQt.cmake @@ -1,3 +1,4 @@ +cmake_minimum_required (VERSION 3.7 FATAL_ERROR) find_package(Qt5Core REQUIRED) function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_PATH) @@ -38,10 +39,9 @@ function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_ function(havestl var access VALUE) if (NOT VALUE STREQUAL "") - string(FIND "${VALUE}" ".so\"" OUT) - math(EXPR OUT "${OUT}+4") - string(SUBSTRING "${VALUE}" 0 ${OUT} OUTSTR) - file(WRITE ${CMAKE_BINARY_DIR}/stl "${OUTSTR}") + # look for ++ and .so as in libc++.so + string (REGEX MATCH "\"[^ ]+\\+\\+[^ ]*\.so\"" OUT ${VALUE}) + file(WRITE ${CMAKE_BINARY_DIR}/stl "${OUT}") endif() endfunction() function(haveranlib var access VALUE) |