[CMake] CPack and SWIG module on Windows

Eric Noulard eric.noulard at gmail.com
Mon Jan 25 02:49:50 EST 2010


2010/1/25 Nicholas Yue <yue.nicholas at gmail.com>:
> 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
>   =============

[...]

>       INCLUDE (CPack)
>       SET ( CPACK_GENERATOR "ZIP" )


You should define CPACK_GENERATOR   **BEFORE** including CPack i.e.

SET ( CPACK_GENERATOR "ZIP" )
INCLUDE (CPack)

otherwise you'll inherot the "default cpack generator' fro the
concerned platform
which should be NSIS on Windows.


>   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?

Reverse the two line as suggested and retry.
May be you'll have problem but it shoumd at least be with the ZIP
generator and not NSIS.
I think the error you get comes from missing definition of some:
CPACK_xxxx
CPACK_NSIS_xxxx

variables, not all generator do check they exists but some use them.

If this is the case it is worth a bug report for at least NSIS generator.
You should specify the version of cmake/cpack you use.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list