I’m trying to use “install(script …” correctly, but it seems to fail silently and I can’t work out why (precisely because its silent - there are no diagnostic or error messages being sent out).
This is the script I want to run (stored as scriptfile.cmake):
file(GLOB sofiles ${CMAKE_INSTALL_FULL_BINDIR}/../lib/python2.7/sil/*.so)
foreach (sofile ${sofiles})
message("Removing RPATH from ${sofile}")
execute_process(COMMAND chrpath -d ${sofile}
COMMAND_ECHO STDOUT)
endforeach()
And I’d like to run it from my main script like this:
install(SCRIPT ${CMAKE_CURRENT_LIST_DIR}/scriptfile.cmake)
I know that the script is being found, as I get an error message if I don’t put it there, or if I rename it: but I’m not seeing the messages and the files don’t get changed. What am I doing wrong?