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