[CMake] CPack doesn't recognize custom templates

Eric Noulard eric.noulard at gmail.com
Wed May 9 14:31:11 EDT 2012


2012/5/9  <norulez at me.com>:
>>> Is it the case? Is there any file in _CPack_Packages\win32\NSIS\MyProject
>>> ?
> No, there aren't any files
>
>
>>> Could you copy/paste the exact message you get and may be running cpack
>>> on the command line with ---verbose and --debug.
> Sure, but I can only do so tomorrow
>
>
>>> Nope normally you don't but what are you doing in your
>>> "CPackConfig.cmake.in" ?
> I only set the CPACK variables and additional variables which are used in
> the NSIS.template.in file.
> Because if I don't use the custom CPackConfig.cmake.in file then the
> variables in the NSIS.template.in files aren't resolved.

Please send us those files.
As usual the devil may be in the details.

>>> And do you have any INSTALL(CODE or INSTALL(SCRIPTS in your project?
> Yes, i use this for the BundleUtilities like in the BundleUtilities example
>
> INSTALL(CODE "
>     file(GLOB_RECURSE SHARED_LIBS
>       \"\${CMAKE_INSTALL_PREFIX}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
>     include(BundleUtilities)
>     fixup_bundle(\"${APPS}\" \"\${SHARED_LIBS}\" \"${DIRS}\")
>     " COMPONENT Runtime)

I'm not a BundleUtilities user but code like that may break with CPack because
CPack may internally use DESTDIR to do its local installation so that
one should usually write:

$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}
rather than
${CMAKE_INSTALL_PREFIX}

however since you have NO file at all in the local CPack install dir,
the problem is elsewhere.

By the way could you try 2.8.8 instead of 2.8.7 ?

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list