diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2012-01-20 01:10:01 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2012-01-20 01:10:01 (GMT) |
commit | 880139a6421649b9b3ff8048418cd556e7ddf2c1 (patch) | |
tree | 3cb036ba7d672d76686cf773085392aa8feba091 /Modules/GetPrerequisites.cmake | |
parent | 9a6b102205045e457db24bd00777ef000c30e242 (diff) | |
download | CMake-880139a6421649b9b3ff8048418cd556e7ddf2c1.zip CMake-880139a6421649b9b3ff8048418cd556e7ddf2c1.tar.gz CMake-880139a6421649b9b3ff8048418cd556e7ddf2c1.tar.bz2 |
GetPrerequisites: Add support for @rpath on Mac OS X.
Change to consider a library embedded if it is found in a subdirectory relative to the
using executable/library. Previous commit considered them local.
This case is encountered when @rpath is used with framework libraries, which are inside a directory tree.
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index fbbaf9c..8761f40 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -478,12 +478,17 @@ function(gp_resolved_file_type original_file file exepath dirs type_var) if(NOT is_system) get_filename_component(original_path "${original_lower}" PATH) - string(LENGTH "${original_path}/" original_length) - string(LENGTH "${lower}" path_length) - if(${path_length} GREATER ${original_length}) - string(SUBSTRING "${lower}" 0 ${original_length} path) - if("${original_path}/" STREQUAL "${path}") - set(is_local 1) + get_filename_component(path "${lower}" PATH) + if("${original_path}" STREQUAL "${path}") + set(is_local 1) + else() + string(LENGTH "${original_path}/" original_length) + string(LENGTH "${lower}" path_length) + if(${path_length} GREATER ${original_length}) + string(SUBSTRING "${lower}" 0 ${original_length} path) + if("${original_path}/" STREQUAL "${path}") + set(is_embedded 1) + endif() endif() endif() endif() |