diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index 6190abed1..309fce310 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -101,7 +101,7 @@ function(resolve_qt4_paths paths_var) if(${executable_path}) list(APPEND paths_resolved "${executable_path}/${path}") else() - list(APPEND paths_resolved "\${CMAKE_INSTALL_PREFIX}/${path}") + list(APPEND paths_resolved "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${path}") endif() endif() endforeach() @@ -295,7 +295,7 @@ function(install_qt4_executable executable) install(CODE "include(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\") set(BU_CHMOD_BUNDLE_ITEMS TRUE) - FIXUP_QT4_EXECUTABLE(\"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")" + FIXUP_QT4_EXECUTABLE(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")" ${component} ) endfunction()