[CMake] Packaging issues

Volker Enderlein volker.enderlein at ifm-chemnitz.de
Mon Apr 3 07:10:59 EDT 2017


Am 03/04/2017 um 12:54 schrieb Domen Vrankar:
> 2017-04-03 12:30 GMT+02:00 Volker Enderlein 
> <volker.enderlein at ifm-chemnitz.de 
> <mailto:volker.enderlein at ifm-chemnitz.de>>:
>
>     But when I checked the CPack*Config.cmake files none of the
>     entries above are referenced. After running the `cmake -G "Visual
>     Studio 14 2015 Win64" ..\TestProject` a second time everything is
>     fine; the entries are referenced in CPack*Config.cmake files and
>     all three installers can be built.
>
>     So I really get stuck at this point.
>
>
>     Any ideas what could be the issue and how to avoid it?
>
>
> From what you have described my best guess would be that "include( 
> CPack )" is called before the variables are set and that second 
> configure step then sets variables in CPack.cmake script correctly 
> since their values are already cached by the first configure step. If 
> I'm correct then calling "include( CPack )" at the end - this is the 
> intended use - of the script would solve your problem.
>
> Regards,
> Domen
Hi Domen,

pardon for not responding to the list.

Thanks for helping, I'm already including  CPack at the last possible 
position before any components are defined.

BTW. I'm using CMake 3.7.2

< all variables have been defined before this point>

     include(CPack)
     include(CPackWIX)
     include(CPackIFW)

     cpack_add_component(AppBinaries DISPLAY_NAME "MyAppBinaries" 
DESCRIPTION "My Application Binaries")
     cpack_ifw_configure_component(AppBinaries VERSION 
${CPACK_PACKAGE_VERSION} SCRIPT 
"${CMAKE_SOURCE_DIR}/cpack/installscript.qs")
     cpack_add_component(AppDocs DISPLAY_NAME "MyAppDocs" DESCRIPTION 
"My Application Docs")
     cpack_add_component(AppData DISPLAY_NAME "MyAppData" DESCRIPTION 
"My Application Data")

Cheers Volker


More information about the CMake mailing list