<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 6, 2013 at 10:13 PM, Pau Garcia i Quiles <span dir="ltr">&lt;<a href="mailto:pgquiles@elpauer.org" target="_blank">pgquiles@elpauer.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I am using CMake 2.8.11.2 on Windows to build and package some software. If I do this, it works fine:</div>
<div><br></div><div><div>   set(CPACK_PACKAGE_DESCRIPTION_SUMMARY &quot;Wt binary build&quot;)</div>

<div>   set(CPACK_PACKAGE_VENDOR &quot;emweb bvba&quot;)</div><div>   set(CPACK_PACKAGE_DESCRIPTION_FILE &quot;${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt&quot;)</div><div>   set(CPACK_RESOURCE_FILE_LICENSE &quot;${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt&quot;)</div>


<div>   set(CPACK_PACKAGE_VERSION_MAJOR &quot;3&quot;)</div><div>   set(CPACK_PACKAGE_VERSION_MINOR &quot;3&quot;)</div><div>   set(CPACK_PACKAGE_VERSION_PATCH &quot;1&quot;)</div><div>   set(CPACK_PACKAGE_INSTALL_DIRECTORY &quot;Wt ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}&quot;)</div>


<div>   set(CPACK_GENERATOR &quot;ZIP;NSIS&quot;)</div><div>   include(CPack)</div><div><br></div><div>But if I add this line before include(CPack):</div><div><br></div><div>  set(CPACK_PACKAGE_FILE_NAME &quot;${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}&quot;)<br>


</div><div><br></div><div>then CPACK_PACKAGE_NAME, CPACK_PACKAGE_VERSION and CPACK_SYSTEM_NAME are empty and the file is generated as &quot;---.zip&quot; / &quot;---.exe&quot;. Am I doing something wrong? (I want to add a couple more variables in the CPACK_PACKAGE_FILE_NAME variable to specify compiler and compiler version, that&#39;s why I&#39;m composing CPACK_PACKAGE_FILE_NAME)</div>
</div></div></blockquote><div><br></div><div>I ran into this myself. IIRC the docs are not that clear on this, but the CPACK_* variables are only set inside the CPackConfig file, i.e. they are empty before your include(CPack). Thats the reason you end up with an empty name.</div>
<div><br></div><div>However the docs on the CPACK_* variables are rather clear on where they get their default value from if they&#39;re not set, so you should be able to look that up and replace CPACK_* with whatever they use as default (for example CMAKE_SYSTEM_NAME instead of CPACK_SYSTEM_NAME).</div>
<div><br></div><div>What I ended up to include the bitness is to set CPACK_SYSTEM_NAME myself and let the defaults of the rest be filled in, I&#39;m using CMAKE_SYSTEM_NAME and simply append the 32/64 value with an additional variable. I&#39;d probably do the same if I needed to have &#39;msvcXY&#39; in the final package name (or something similar).</div>
<div><br></div><div>Andreas<br></div></div></div></div>