I'm trying to use CPack to create a .tar.gz package on linux. I use fixup_bundle from the bundle utility to copy and fix Qt libraries to the bundle. <div><br></div><div>When I use simple 'make install', everything is installed properly in directory specified by CMAKE_INSTALL_PREFIX. When I use CPack, the Qt libraries are still copied to the CMAKE_INSTALL_PREFIX directory and not the package's directory. Here's the code:</div>
<div><br></div><div><meta name="qrichtext" content="1"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<table style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
<tbody><tr>
<td style="border: none;">
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;"># install executable(s)</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">install</span>( TARGETS <span style=" color:#800000;">${exec_name}</span> DESTINATION . )</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font class="Apple-style-span" color="#008000"><br></font></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;"># fixup the bundle</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( APPS <span style=" color:#800000;">${CMAKE_INSTALL_PREFIX}</span>/<span style=" color:#800000;">${exec_name}</span> )</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">list</span>( APPEND libSearchDirs <span style=" color:#800000;">${QT_LIBRARY_DIR}</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( additionalLib <span style=" color:#800000;">${qtsvgiconplugin}</span> )</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">INSTALL</span>(CODE <span style=" color:#008000;">"include(BundleUtilities)</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;"> fixup_bundle(\"</span><span style=" color:#800000;">${APPS}</span><span style=" color:#008000;">\" \"</span><span style=" color:#800000;">${additionalLib}</span><span style=" color:#008000;">\" \"</span><span style=" color:#800000;">${libSearchDirs}</span><span style=" color:#008000;">\")"</span> COMPONENT Runtime)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">#================================</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;"># Packaging</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#008000;">#================================</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_DESCRIPTION_SUMMARY <span style=" color:#008000;">"My test package"</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_NAME <span style=" color:#800000;">${exec_name}</span> )</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_CONTACT <span style=" color:#008000;">"John Smith"</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_VENDOR <span style=" color:#008000;">"Company inc."</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_VERSION_MAJOR <span style=" color:#800000;">${PROG_MAJOR_VERSION}</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_VERSION_MINOR <span style=" color:#800000;">${PROG</span><span style=" color:#800000;">_MINOR_VERSION}</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_VERSION_PATCH <span style=" color:#800000;">${PROG</span><span style=" color:#800000;">_PATCH_VERSION}</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_GENERATOR <span style=" color:#008000;">"TGZ"</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">set</span>( CPACK_PACKAGE_FILE_NAME <span style=" color:#008000;">"</span><span style=" color:#800000;">${CPACK_PACKAGE_NAME}</span><span style=" color:#008000;">-</span><span style=" color:#800000;">${CPACK_PACKAGE_VERSION_MAJOR}</span><span style=" color:#008000;">.</span><span style=" color:#800000;">${CPACK_PACKAGE_VERSION_MINOR}</span><span style=" color:#008000;">.</span><span style=" color:#800000;">${CPACK_PACKAGE_VERSION_PATCH}</span><span style=" color:#008000;">-</span><span style=" color:#800000;">${CMAKE_SYSTEM_PROCESSOR}</span><span style=" color:#008000;">"</span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">include</span>(CPack)</pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br></pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Am I missing something?</pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
<br></pre><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">s.</pre></td></tr></tbody></table></div><meta http-equiv="content-type" content="text/html; charset=utf-8">