[CMake] CPack and SWIG module on Windows

Nicholas Yue yue.nicholas at gmail.com
Sun Jan 24 23:51:11 EST 2010


Hi,

    I am attempting to use CPack to package up a SWIG module I am 
distributing.

    I have no problem with CPack on Linux but on Windows, I have some 
difficulty.

    CMAKE CONFIG
    =============

        SWIG_ADD_MODULE ( ribclient python RIBClient.i ParameterList.cpp )
        SWIG_LINK_LIBRARIES ( ribclient ${RIBCLIENT_LIBRARIES} utils
        ${PYTHON_LIBRARIES} )

        IF (WIN32)
          SET_TARGET_PROPERTIES ( _ribclient PROPERTIES SUFFIX ".pyd")
        ENDIF (WIN32)

        INSTALL ( TARGETS _ribclient
          LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX})

        INSTALL ( FILES ${CMAKE_BINARY_DIR}/python/ribclient.py
          DESTINATION ${CMAKE_INSTALL_PREFIX})

        INCLUDE (CPack)
        SET ( CPACK_GENERATOR "ZIP" )


    ERROR OUTPUT
    =============

        SetOutPath: "$INSTDIR"
        File: Returning to:
        "C:/nicholas/projects/ribclient_googlecode_svn/build/_CPack_Packages/win32/NSIS/ribclients-0.1.1-win32"
        File:
        "C:/nicholas/projects/ribclient_googlecode_svn/build/_CPack_Packages/win32/NSIS/ribclients-0.1.1-win32\*.*"
        -> no files found.
        Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec
        [...] |
           /oname=outfile one_file_only)
        Error in script
        "C:/nicholas/projects/ribclient_googlecode_svn/build/_CPack_Packages/win32/NSIS/project.nsi"
        on line 630 -- aborting creation process


    Anyone with ideas on the problem?

Regards



More information about the CMake mailing list