[CMake] How to CPack my sources

Michael Jackson mike.jackson at bluequartz.net
Thu Jul 19 10:30:36 EDT 2012


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. 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

but that just created the usual binary release. I am sure I am missing something simple at this point.

Thanks.
___________________________________________________________
Mike Jackson                    Principal Software Engineer
BlueQuartz Software                            Dayton, Ohio
mike.jackson at bluequartz.net              www.bluequartz.net



More information about the CMake mailing list