Hi Eric, David,<br><br>Thanks for your valuable suggestions. I am right now copying Qt libraries (libQtCore, libQtGui, libQtOpenGL) manually using INSTALL( FILE ... ) command.<br><br>I installed latest version of CMake which enables DeployQt4 facility. It will be very helpful if you give a small 4-5 lines of example which copies the required Qt libraries by default to my install directory.<br>

<br>I looked at the example link Eric provided, but could not succeed implementing it.<br><br>Thanks to both of you.<br><br>--<br>regards,<br>Manoj<br><br><div class="gmail_quote">On Fri, Nov 9, 2012 at 6:10 PM, David Cole <span dir="ltr">&lt;<a href="mailto:david.cole@kitware.com" target="_blank">david.cole@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You should really take Eric&#39;s previous advice if you&#39;re building a Qt<br>
application:<br>
<div class="im HOEnZb"><br>
&quot;A good starting point may be Mike&#39;s blog entry on DeployQt4 as well:<br>
<a href="http://mikemcquaid.com/2012/01/04/deploying-qt-applications-with-deployqt4/" target="_blank">http://mikemcquaid.com/2012/01/04/deploying-qt-applications-with-deployqt4/</a>&quot;<br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">On Fri, Nov 9, 2012 at 4:25 AM, Manoj Vaghela &lt;<a href="mailto:manoj.vaghela@gmail.com">manoj.vaghela@gmail.com</a>&gt; wrote:<br>
&gt; Dear Eric,<br>
&gt;<br>
&gt; Thank you very much for your quick reply.<br>
&gt;<br>
&gt; INSTALL( PROGRAMS ... ) worked fine.<br>
&gt; If I am using this, I also do not need to specify any IMPORTED related<br>
&gt; stuff.<br>
&gt;<br>
&gt; As my understanding now, the following lines are sufficient for creating<br>
&gt; pack.<br>
&gt;<br>
&gt; INSTALL( TARGETS ${EXECUTABLE_NAME} DESTINATION ${INSTALL_DIR} ) // For<br>
&gt; Executable from the current CMakeLists.txt<br>
&gt;<br>
&gt; INSTALL( PROGRAMS ${EXTERNAL_EXE} DESTINATION ${INSTALL_DIR} ) // For<br>
&gt; including external executable in the archive<br>
&gt;<br>
&gt; INSTALL( FILES LIB1 LIB2 DESTINATION ${INSTALL_DIR} ) // For libraries<br>
&gt; (current or external) or any other files<br>
&gt;<br>
&gt; A few clarifications required:<br>
&gt;<br>
&gt; For an application using Qt libraries, should I pack the related Qt<br>
&gt; libraries (QtCore, QtGui, QtOpenGL) ?? or not ?? If I am giving this to<br>
&gt; somebody, I should include them or ask them to install on their machine ?<br>
&gt;<br>
&gt; Also, what is the preferred path or tree for installing package? When RPM is<br>
&gt; installed, will it automatically be included in the $PATH or I have to do it<br>
&gt; someway?<br>
&gt;<br>
&gt; Thanks once again.<br>
&gt;<br>
&gt; --<br>
&gt; regards,<br>
&gt; Manoj<br>
&gt;<br>
&gt; On Fri, Nov 9, 2012 at 2:24 PM, Eric Noulard &lt;<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; 2012/11/9 Manoj Vaghela &lt;<a href="mailto:manoj.vaghela@gmail.com">manoj.vaghela@gmail.com</a>&gt;:<br>
&gt;&gt; &gt; Dear Eric,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks for your reply.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; When I am using INSTALL (FILES... ) for adding external executable to my<br>
&gt;&gt; &gt; CMakeLists.txt file, it shows the executable file in the RPM archive.<br>
&gt;&gt; &gt; But<br>
&gt;&gt; &gt; it&#39;s execute permission is lost. What should I have to do for that?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Also, ADD_EXECUTABLE( ... IMPORTED) did not work for me. I added this<br>
&gt;&gt; &gt; line<br>
&gt;&gt; &gt; but when archive is created, it did not include my executable in it.<br>
&gt;&gt;<br>
&gt;&gt; See my comment below:<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This is sample of my CMakeLists.txt<br>
&gt;&gt; &gt; -----------------------------------------------<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; SET( CPACK_GENERATOR &quot;RPM&quot; )<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; ##### MAIN EXE<br>
&gt;&gt; &gt; SET( MAIN_EXE myExe)<br>
&gt;&gt; &gt; ADD_EXECUTABLE(${MAIN_EXE} SOME_SOURCE_FILES )<br>
&gt;&gt; &gt; SET( INSTALL_DIR &quot;$ENV{HOME}/MANOJ&quot; )<br>
&gt;&gt; &gt; INSTALL( TARGETS ${MAIN_EXEC} DESTINATION ${INSTALL_DIR} )<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; ##### EXTERNAL EXE<br>
&gt;&gt; &gt; SET( EXTERNAL_EXE &quot;/home/manoj/EXTERNAL/a.out.exe&quot; )<br>
&gt;&gt; &gt; SET( IMPORTED_LOCATION ${EXTERNAL_EXE} )<br>
&gt;&gt; &gt; ADD_EXECUTABLE( ${EXTERNAL_EXE} IMPORTED) // This does not pack the<br>
&gt;&gt; &gt; executable<br>
&gt;&gt;<br>
&gt;&gt; Once the external executable is imported as a TARGET<br>
&gt;&gt; you have to install it:<br>
&gt;&gt; INSTALL( TARGETS  ${EXTERNAL_EXE}  DESTINATION ${INSTALL_DIR} )<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; #INSTALL( FILES ${EXTERNAL_EXE} DESTINATION ${INSTALL_DIR}) // This<br>
&gt;&gt; &gt; packs,<br>
&gt;&gt; &gt; but permissions lost<br>
&gt;&gt;<br>
&gt;&gt; My mistake for executable you should be using<br>
&gt;&gt; install(PROGRAMS files... DESTINATION &lt;dir&gt;<br>
&gt;&gt;                  [PERMISSIONS permissions...]<br>
&gt;&gt;                  [CONFIGURATIONS [Debug|Release|...]]<br>
&gt;&gt;                  [COMPONENT &lt;component&gt;]<br>
&gt;&gt;                  [RENAME &lt;name&gt;] [OPTIONAL])<br>
&gt;&gt;<br>
&gt;&gt; signature.<br>
&gt;&gt; --<br>
&gt;&gt; Erk<br>
&gt;&gt; Le gouvernement représentatif n&#39;est pas la démocratie --<br>
&gt;&gt; <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div><span class="HOEnZb"><font color="#888888">&gt; --<br>
&gt;<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</font></span></blockquote></div><br>