file(GET_RUNTIME_DEPENDENCIES...) does not handle linker scripts from TBB
Encountered in the context of a VTK app using the common superbuild on linux.
TBB binary distributions on linux are distributed with several libraries where libtbb.so.2
is the real library, and libtbb.so
is a text file with the contents
INPUT (libtbb.so.2)
If I pass this file to file(GET_RUNTIME_DEPENDENCIES
like so:
# Construct a list of libraries already in the application bundle
file(GLOB_RECURSE missing_libs "${CMAKE_INSTALL_PREFIX}/${lib_dest_dir}/*${suffix}")
# Construct a list of the application's runtime dependencies
file(GET_RUNTIME_DEPENDENCIES
....
LIBRARIES ${qt_plugins} ${missing_libs}
)
I get a cryptic error:
CMake Error at cmake_install.cmake:132 (file):
file Failed to run objdump on:
/home/aron.helser/projects/xxx/sb/build/install/lib/libtbb.so
libtbb.so.2
exists in that directory, so it could be handled. Or a more informative error message, perhaps.