[CMake] cpack, nsis and visual studio 9

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Sep 4 08:58:18 EDT 2008


Boudewihn,

  I cannot see the following line in your code:

INCLUDE(${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake)

What option did you set ?

On Thu, Sep 4, 2008 at 1:54 PM, Boudewijn Rempt <boud at valdyas.org> wrote:
> Hi,
>
> We're using Qt4, Visual Studio 9 and cmake 2.6 to create binaries and cpack
> with the nsis installer generator to create an installer. cpack/nsis
> add thes following to our installer package:
>
> msvcm90.dll
> msvcr90.dll
> msvcp90.dll
>
> and a manifest file describing these files, all four files to the bin
> directory next to our executable. However, installing on another computer
> doesn't give us a working installation, it leads to side-by-side errors.
>
> We don't do anything special in our CMakeLists.txt file, so I'm suspecting
> that something is buggy either in the cpack nsis generator or in nsis
> itself -- has anyone managed to get this to work, or would we be better off
> using mingw (or, $DEITY forbid, msi instead of nsis)?
>
> This is the installation section of our CMakeListst.txt file:
>
> #
> # Install definition
> #
> IF (WIN32)
>    set(_add_executable_param WIN32)
>
>    INSTALL(TARGETS HyvesDesktop
>        DESTINATION bin
>    )
>    INSTALL(FILES
>        "${QT_LIBRARY_DIR}/QtCore${QT_VERSION_MAJOR}.dll"
>        "${QT_LIBRARY_DIR}/QtXml${QT_VERSION_MAJOR}.dll"
>        "${QT_LIBRARY_DIR}/QtTest${QT_VERSION_MAJOR}.dll"
>        "${QT_LIBRARY_DIR}/QtWebKit${QT_VERSION_MAJOR}.dll"
>        "${QT_LIBRARY_DIR}/QtGui${QT_VERSION_MAJOR}.dll"
>        "${QT_LIBRARY_DIR}/QtNetwork${QT_VERSION_MAJOR}.dll"
>        DESTINATION bin
>    )
>    # for windows, use nsis
>    SET(CPACK_GENERATOR NSIS)
>
> ENDIF(WIN32)
>
> IF(WIN32 AND NOT UNIX)
>  # There is a bug in NSI that does not handle full unix paths properly. Make
>  # sure there is at least one set of four (4) backlasshes.
>  SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/windows\\\\InstallIcon.bmp")
>  SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/windows\\\\InstallIcon.ico")
>  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Hyves Desktop")
>  SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Hyves Desktop ${CPACK_PACKAGE_VERSION}")
>  SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\HyvesDesktop.exe")
>  SET(CPACK_NSIS_DISPLAY_NAME "Hyves Desktop")
>  SET(CPACK_NSIS_HELP_LINK "http://www.hyves.nl")
>  SET(CPACK_NSIS_URL_INFO_ABOUT "http://www.hyves.nl")
>  SET(CPACK_NSIS_CONTACT "support at hyves.nl")
>  SET(CPACK_NSIS_MODIFY_PATH ON)
> ELSE(WIN32 AND NOT UNIX)
>  SET(CPACK_STRIP_FILES "bin/HyvesDesktop")
>  SET(CPACK_SOURCE_STRIP_FILES "")
>  SET(CPACK_PACKAGE_EXECUTABLES "bin/HyvesDesktop.sh" "startup script")
> ENDIF(WIN32 AND NOT UNIX)
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Mathieu


More information about the CMake mailing list