[CMake] CPack ZIP error with NSIS on WinXP

Mike Jackson mike.jackson at imts.us
Tue Jul 1 14:30:06 EDT 2008


I am starting to dive into the CPack packaging system for my projects
and I have some basic questions that the wiki is not answering.

1. What "zip" program do I need to install or is recommended on
Windows XP to get the NSIS packager to run correctly. I am getting the
"CPack ERror: Cannot find a suitable zip program."

2. My project depends on some 3rd party libraries to run (expat, tiff,
hdf5, qt4). What variables do I need to set to have those copied into
the installation package? I currently have rolled my own for an
"installation". Here is what I use currently:

#------- Macro to find and install the proper dynamic libraries  
----------------
MACRO (MXA_INSTALL_SUPPORT_LIBRARY basename)
     IF (HAVE_${basename}_DLL)
       IF (WIN32)
         GET_FILENAME_COMPONENT(${basename}_LIB_DEBUG_NAME
${${basename}_LIBRARY_DEBUG} NAME_WE)
         GET_FILENAME_COMPONENT(${basename}_LIB_RELEASE_NAME
${${basename}_LIBRARY_RELEASE} NAME_WE)
      #   message (STATUS "basename: ${basename}")
      #   message (STATUS "${basename}_LIB_DEBUG_NAME:
${${basename}_LIB_DEBUG_NAME}")
         INSTALL(FILES
${${basename}_BIN_DIR}/${${basename}_LIB_DEBUG_NAME}.dll DESTINATION
${CMAKE_INSTALL_PREFIX}/bin CONFIGURATIONS Debug COMPONENT Runtime)
         INSTALL(FILES
${${basename}_BIN_DIR}/${${basename}_LIB_RELEASE_NAME}.dll DESTINATION
${CMAKE_INSTALL_PREFIX}/bin CONFIGURATIONS Release COMPONENT Runtime)
       ENDIF (WIN32)
     ENDIF (HAVE_${basename}_DLL)
ENDMACRO(MXA_INSTALL_SUPPORT_LIBRARY basename)

#-- Install the support libraries if needed
MXA_INSTALL_SUPPORT_LIBRARY(HDF5)
MXA_INSTALL_SUPPORT_LIBRARY(EXPAT)
MXA_INSTALL_SUPPORT_LIBRARY(TIFF)

# ---------- 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
${CMAKE_INSTALL_PREFIX}/bin CONFIGURATIONS Debug COMPONENT Runtime)
       INSTALL(FILES ${QT_DLL_PATH_tmp}/${qtlib}4.dll DESTINATION
${CMAKE_INSTALL_PREFIX}/bin CONFIGURATIONS Release COMPONENT Runtime)
     ENDIF (WIN32)
   ENDFOREACH(qtlib)
ENDIF(NOT Q_WS_MAC)

# -------------------------- Find the MinGW Runtime library  
--------------------
IF (MINGW)
     INCLUDE ( ${MXA_RESOURCES_DIR}/MXAFindMinGW.cmake )
     IF (MINGW_FOUND)
         INSTALL(FILES ${MINGW_LIBRARIES}
                 DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
                 COMPONENT Runtime)
     ENDIF (MINGW_FOUND)
ENDIF (MINGW)


Can I reuse any of this in order to copy all those libraries into the
installation package?

Thanks for any help.
-- 
Mike Jackson
imikejackson _at_ gee-mail dot com




More information about the CMake mailing list