GetPrerequisites
: GetPrerequisites.cmake
This script provides functions to list the .dll, .dylib or .so files that an executable or shared library file depends on. (Its prerequisites.)
It uses various tools to obtain the list of required shared library files:
dumpbin (Windows)
ldd (Linux/Unix)
otool (Mac OSX)
The following functions are provided by this script:
gp_append_unique
gp_file_type
is_file_executable
gp_item_default_embedded_path
(projects can override with gp_item_default_embedded_path_override)
gp_resolve_item
(projects can override with gp_resolve_item_override)
get_prerequisites
list_prerequisites
list_prerequisites_by_glob
Requires CMake 2.6 or greater because it uses function, break, return and PARENT_SCOPE.