Hello,<br><br>I am using cmake in my project and i want the install script to automatically find and install all the DLL that I need to run this program (I'm using Qt and i need QtCore.dll QtGui.dll and QtSql.dll).<br>
I have found reading the <a href="http://www.mail-archive.com/cmake@cmake.org/msg14476.html">mailing list</a> that it exist a GetPrerequisites.cmake that contains few functions to do so. <br>The bad thing is that I did not found any exemple on how to use it!<br>
<br>I've try with a simple using Qt in my project (See below): My question are:<br><br>1 - Someone have an exemple of get_prerequisites() function?<br>2 - the result works well but I obtain only the name of the DLL not the full path? (I don't want to use find_program() after this call)<br>
3 - I want this function to only run when I do a make install (is it possible)?<br>4 - How to add the target in an easier way?<br>5 - I have a warning that: "run in install tree instead of build tree?". what does that mean?<br>
<br><br><br>set(EXECNAME Server)<br>add_executable(${EXECNAME} ${CPP_FILES} ${QM_FILES} ${UI_FILES} ...)<br><br>include(InstallRequiredSystemLibraries)<br>install(TARGETS ${EXECNAME} DESTINATION bin COMPONENT Server)<br>
<br>
if(WIN32)<br><br>set(TARGET_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug) <br>set(PREREQ "")<br>get_prerequisites(${TARGET_DIR}/${EXECNAME}.exe" PREREQ 0 1 ${TARGET_DIR} "")<br>message(STATUS "PREREQ=${PREREQ}")<br>
<br>endif(WIN32)<br><br><br>Thanks,<br clear="all"><br>--<br>Benoit RAT<br><a href="http://www.neub.co.nr">www.neub.co.nr</a><br>