The following is what I use. There may be better methods or methods that are now built into CMake 2.6.x that I am unaware of.

# ------------------------------------------------------------------------------ # This CMake code installs the needed support libraries on NON OSX platforms # ------------------------------------------------------------------------------

INCLUDE (InstallRequiredSystemLibraries)

# ---------- Find/Install the needed Qt4 libraries.
SET (QTLIBLIST QtCore QtGui)
IF(NOT Q_WS_MAC)
  FOREACH(qtlib ${QTLIBLIST})
    IF (WIN32)
GET_FILENAME_COMPONENT(QT_DLL_PATH_tmp ${QT_QMAKE_EXECUTABLE} PATH)
      INSTALL(FILES ${QT_DLL_PATH_tmp}/${qtlib}d4.dll
          DESTINATION bin
          CONFIGURATIONS Debug
          COMPONENT Runtime)
      INSTALL(FILES ${QT_DLL_PATH_tmp}/${qtlib}4.dll
          DESTINATION bin
          CONFIGURATIONS Release
          COMPONENT Runtime)
    ENDIF (WIN32)
  ENDFOREACH(qtlib)
ENDIF(NOT Q_WS_MAC)




On Sep 25, 2008, at 6:10 AM, Mehdi Rabah wrote:

Hi,

I need my qt project to be standalone when installing (cpack is taking care of the packaging). Can you tell me how to make a static link or how to copy the Qt dll? I'm using FintQt4.

I tried to set the QT_CONFIG (found in FindQt4) to "static", it doesn't seem to do what I expected.I also tried installing $QT_LIBRARIES but it seem this variable contain directory paths, not dll paths.

Any idea? Thanks in advance,
--
Mehdi
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to