[Cmake] packaging source
Andy Cedilnik
andy.cedilnik at kitware.com
Thu May 29 10:22:24 EDT 2003
Hi,
How about this:
STRING(REGEX REPLACE ".*\\/" DIR_NAME "${PROJECT_SOURCE_DIR}")
SET(TOPLEVEL "${PROJECT_SOURCE_DIR}/..)
ADD_CUSTOM_TARGET(
dist
${CMAKE_COMMAND} -E chdir ${TOPLEVEL}
${TAR_COMMAND} cvf ${PROJECT_NAME}.tar ${DIR_NAME})
Andy
On Thu, 2003-05-29 at 10:01, Brad King wrote:
> > Is there a way of packaging all the code in a cmake project. Something
> > like the "make dist" command which is available with gnu
> > autoconf/automake tools.
>
> What exactly does "make dist" do? Tar up the source tree? CMake does not
> support this directly. You can try something like this:
>
> IF(UNIX)
> ADD_CUSTOM_TARGET(dist ${PROJECT_SOURCE_DIR}/package.sh)
> ENDIF(UNIX)
>
> This will add "dist" as a makefile target that runs package.sh, which can
> do whatever packaging you want.
More information about the CMake
mailing list