2013/1/20 Ian Monroe <i...@monroe.nu> > On Sun, Jan 20, 2013 at 10:47 AM, Ian Monroe <i...@monroe.nu> wrote: > > Yea I guess I could do install(CODE...) and then a file(GLOB...) would > > actually work. > > Actually not so sure how to do it, since if I write something like this: > install( CODE "file(GLOB installedLibrares > ${CMAKE_INSTALL_PREFIX}/lib/*.so) > execute_process(COMMAND strip ${installedLibrares}) > ") > > It will only affect the files that were make installed, not the files > used by CPack, correct? Since I don't know how to access those files, > CMAKE_INSTALL_PREFIX doesn't change during CPack-time even though it > installs somewhere else. >
What do you mean by "It will only affect the files that were make installed not the files used by CPack" ? CPack does call "cmake -P cmake_install.cmake" so **all files** packaged by CPack are somehow **installed** previously. CMAKE_INSTALL_PREFIX has a CPack-time value which is set by CPack when installing file on the CPack-private location so you should escape it in order to prevent its evaluation at CMake-time, i.e. install( CODE "file(GLOB installedLibrares \${CMAKE_INSTALL_PREFIX}/lib/*.so) execute_process(COMMAND strip ${installedLibrares}) ") should work even if I'd rather create a script "strip-all-installed-file.cmake" and do install(SCRIPT strip-all-installed-files.cmake) then the content of "strip-all-installed-files.cmake" does not need escaping. -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake