Hello, 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). I have found reading the mailing list<http://www.mail-archive.com/cmake@cmake.org/msg14476.html>that it exist a GetPrerequisites.cmake that contains few functions to do so.
The bad thing is that I did not found any exemple on how to use it! I've try with a simple using Qt in my project (See below): My question are: 1 - Someone have an exemple of get_prerequisites() function? 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) 3 - I want this function to only run when I do a make install (is it possible)? 4 - How to add the target in an easier way? 5 - I have a warning that: "run in install tree instead of build tree?". what does that mean? set(EXECNAME Server) add_executable(${EXECNAME} ${CPP_FILES} ${QM_FILES} ${UI_FILES} ...) include(InstallRequiredSystemLibraries) install(TARGETS ${EXECNAME} DESTINATION bin COMPONENT Server) if(WIN32) set(TARGET_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug) set(PREREQ "") get_prerequisites(${TARGET_DIR}/${EXECNAME}.exe" PREREQ 0 1 ${TARGET_DIR} "") message(STATUS "PREREQ=${PREREQ}") endif(WIN32) Thanks, -- Benoit RAT www.neub.co.nr
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake