<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2014-10-14 9:24 GMT+02:00 Jörg Kreuzberger <span dir="ltr"><<a href="mailto:j.kreuzberger@procitec.de" target="_blank">j.kreuzberger@procitec.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ok, found it: i must set CPACK_SOURCE_TZ to off to avoid the source to be packaged as tz.<br>
its a little bit different as for the binary package, but ok.<br></blockquote><div class="h5"><br></div><div class="h5">This is a another way to select CPack generator but you can always specify the list explicitely <br>in your CMakeLists.txt **before** include(CPack).<br><br></div><div class="h5">You may have some "logic" depending on the target platform e.g;<br><br></div><div class="h5">if(WIN32)<br>    set(CPACK_SOURCE_GENERATOR "ZIP")<br>    set(CPACK_GENERATOR "ZIP")<br><br>    # Add NSIS generator iff makensis is found on the system<br>    find_program(MAKENSIS_EXECUTABLE<br>                 NAMES makensis<br>                 DOC "The NSIS package maker command")<br>    if (MAKENSIS_EXECUTABLE)<br>      list(APPEND CPACK_GENERATOR "NSIS")<br>    endif(MAKENSIS_EXECUTABLE)<br></div><div class="h5">else(WIN32)<br>    set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")<br>    if(APPLE)<br>      set(CPACK_GENERATOR "TGZ;PackageMaker")<br>    else(APPLE)<br>      set(CPACK_GENERATOR "TGZ;RPM;DEB")<br>    endif(APPLE)<br></div><div class="h5">endif(WIN32)<br></div></div><br></div><div class="gmail_extra">include(CPack)<br><br><br></div><div class="gmail_extra">With this if you are in the build directory<br>make package (or in a generator independent way "cmake --build . --target package")<br></div><div class="gmail_extra">or<br>make package_source <br><br></div><div class="gmail_extra">will build the list of specified CPack generators packages.<br><br></div><div class="gmail_extra">However you can always override that by doing (in the build dir as well):<br></div><div class="gmail_extra">cpack -G TGZ<br><br></div><div class="gmail_extra">which will only build the binary TGZ whatever was specified in the CMakeLists.txt.<br><br></div><div class="gmail_extra">for the source package this is done using the CPackSourceConfig.cmake file:<br><br>cpack -G TGZ --config CPackSourceConfig.cmake<br><br></div><div class="gmail_extra">I hope this helps in understanding the way CPack works.<br></div><div class="gmail_extra"><br clear="all"></div><div class="gmail_extra"><br>-- <br>Erk<br>L'élection n'est pas la démocratie -- <a href="http://www.le-message.org" target="_blank">http://www.le-message.org</a>
</div></div>