diff options
author | wsnipex <wsnipex@a1.net> | 2016-09-25 20:32:49 +0200 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2016-10-09 10:53:39 +0200 |
commit | 9245339d5b1da59860152821cd34b29fbd76a177 (patch) | |
tree | 3d95c684fe1d68c10001acb176827c44da5903d0 /project/cmake/scripts | |
parent | 1ca348fcbc2a1becf600e2bd2102b80d70f350e9 (diff) |
[cmake] android: resolve symlinks when copying libs to install dir
Diffstat (limited to 'project/cmake/scripts')
-rw-r--r-- | project/cmake/scripts/android/Install.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/project/cmake/scripts/android/Install.cmake b/project/cmake/scripts/android/Install.cmake index d8c8ba2466..d95ba94c81 100644 --- a/project/cmake/scripts/android/Install.cmake +++ b/project/cmake/scripts/android/Install.cmake @@ -61,9 +61,16 @@ function(add_bundle_file file destination relative) endif() string(REPLACE "${relative}/" "" outfile ${file}) + get_filename_component(file ${file} REALPATH) get_filename_component(outdir ${outfile} DIRECTORY) file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/BundleFiles.cmake "file(COPY \"${file}\" DESTINATION \"${destination}/${outdir}\")\n") + if(file MATCHES "\.so\..+$") + get_filename_component(srcfile "${file}" NAME) + string(REGEX REPLACE "\.so\..+$" "\.so" destfile ${srcfile}) + file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/BundleFiles.cmake + "file(RENAME \"${destination}/${outdir}/${srcfile}\" \"${destination}/${destfile}\")\n") + endif() endfunction() # Copy files into prefix |