On Friday 13 April 2012 20:21:39 Daniel Franke wrote: > Consider: > include (GNUInstallDirs) > set (PREFIX $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}) > file (GLOB PLUGINS "${QT_PLUGINS_DIR}/imageformats/*.dll") > install (CODE "include(DeployQt4) > FIXUP_QT4_EXECUTABLE (\"${PREFIX}/${ARGV0}.exe\" > \"${PLUGINS}\" > \"\" > \"${PREFIX}\" > \"${PREFIX}/plugins\")") > > This installs the dependencies is in the install location. Ok. But how do I > need to change this so that PREFIX points to the correct path in > _CPackPackages/.../bin as one has to pass the actual location of the binary?
The simple solution is: set PREFIX within the INSTALL(CODE) and that's it: install (CODE "include(DeployQt4) set (PREFIX \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}) FIXUP_QT4_EXECUTABLE (\"\${PREFIX}/${ARGV0}.exe\" \"${PLUGINS}\" \"\" \"\${PREFIX}\" \"\${PREFIX}/plugins\")") Note the additional '\' to evaluate the PREFIX variable at runtime, not configure time. Meh. Cheers Daniel -- 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