[CMake] How to CPack my sources

David Cole david.cole at kitware.com
Thu Jul 19 12:06:42 EDT 2012


Mike,

Did you make this error with -C because of some bad documentation
somewhere? (I seem to recall this in the past, but I think we've fixed
up all the places where that error occurred...) If there's still an
error out there somewhere in some docs that seem like they should be
"current", I'd like to fix it.

Thanks,
David


On Thu, Jul 19, 2012 at 12:01 PM, Eric Noulard <eric.noulard at gmail.com> wrote:
> 2012/7/19 Michael Jackson <mike.jackson at bluequartz.net>:
>> I would like to be able to run "make source" or "cpack source" or something like that where just my source files are packed up.
>
> You were almost there this is:
>
> make package_source
>
>>I have the following in a cmake file that is included in my Main CMakeLists.txt file:
>>
>>
>> SET(CPACK_SOURCE_GENERATOR "TGZ")
>> SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_Source.tar.gz")
>> SET(CPACK_SOURCE_TOPLEVEL_TAG "Source")
>> SET(CPACK_IGNORE_FILES "/i386/;/x64/;/VS2008/;/zRel/;/Build/;/\\\\.git/;\\\\.*project")
>> SET(CPACK_SOURCE_IGNORE_FILES "/i386/;/x64/;/VS2008/;/zRel/;/Build/;/\\\\.git/;\\\\.*project")
>>
>> I see that I get a CPackSourceConfig.cmake file in my build directory.
>>
>> I tried the following from the command line:
>>
>> cpack -G TGZ -C CPackSourceConfig.cmake
>
> the appropriate syntax is:
>
> cpack -G TGZ --config CPackSourceConfig.cmake
>
> -C is the "Specify the project configuration" which
> is "the configuration that the project was build with, for example
> 'Debug', 'Release'."
>
> see:
> http://www.cmake.org/cmake/help/v2.8.8/cpack.html#opt:-CConfiguration
>
>> but that just created the usual binary release. I am sure I am missing something simple at this point.
>
> --
> Erk
> Le gouvernement représentatif n'est pas la démocratie --
> http://www.le-message.org
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list