[CMake] [CPack] Empty package while using component with NSIS on Win64 platform.
Eric Noulard
eric.noulard at gmail.com
Mon May 14 10:28:25 EDT 2012
2012/5/14 Alexandre Fournier <alexandre.fournier at zimmercas.com>:
> Hello,
>
>
>
> I am trying to create a package for our project. The package contains
> several components, one for each application. I followed the instruction
> from the book “Mastering CMake” and the package is created but has no
> components. Our solution runs entirely on CMake including continuous
> integration with CTest and CDash. The only thing which is not working
> properly is the packaging of the software.
>
This one SHOULD NOT be set for a NSIS/WIndows package
> SET(CPACK_SET_DESTDIR ON)
in fact beginning with CMake 2.8.6 it is seldom useful to set
CPACK_SET_DESTDIR to ON
in any case.
> INSTALL(TARGETS Adjustment RUNTIME DESTINATION ${BUILD_ROOT}/bin/install COMPONENT AdjustmentApp)
> INSTALL(TARGETS triage RUNTIME DESTINATION ${BUILD_ROOT}/bin/install COMPONENT triageApp)
if ${BUILD_ROOT} is an absolute path this won't work.
> I read on forum that setting CPACK_SET_DESTDIR to ON could cause problem
> but it does not change anything in my case. Whether or not this variable is
> on or off or using absolute or relative path is always ending with an empty
> installer.
Trust me you don't want to set CPACK_SET_DESTDIR to ON.
In the same way "absolute DESTINATION install path" will NOT work on Windows.
> I even try to run the example from the cmake wiki : http://www.cmake.org/Wiki/File:ComponentExampleStart.zip.
Did you use the "Start" archive or did you use the "final":
http://www.cmake.org/Wiki/File:ComponentExample.zip
> The example is not working at all, NSIS got errors:
May be the example is not up to date, but using
http://www.cmake.org/Wiki/File:ComponentExample.zip
I can build an NSIS installer using CMake 2.8.8 and NSIS 2.46.
(on Linux with some crosstools but concerning the generated
NSIS project and NSIS processing it looks just fine).
> I am using CMake 2.8.7, NSIS 2.46 and Windows 7 64 bit edition.
>
> Is there any incompatibility with the version of the software used?
Are you using some custom build of NSIS ?
Like 64 bits
http://public.kitware.com/Bug/view.php?id=13203
or svn trunk?
http://public.kitware.com/Bug/view.php?id=13202
if not it should work.
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list