[CMake] cpack hello world, empty packages - novice warning

Mark Lohry mlohry at gmail.com
Wed Jun 10 10:50:50 EDT 2009


1) where is the best place for documentation for cmake/cpack? Is there any
free equivalent to the autotools book? the sporatic examples coupled with
sparse documentation hasn't made the transition as simple as expected :)

2) sorry for the novice nature of this question, but I'm just not seeing
what I'm missing when trying to build a package with cmake/cpack. After
running "cmake .", and "cpack" or "make package", I end up with empty
packages. The tar.gz and tar.Z archives are empty. I was expecting the same
behavior as "make dist" with autotools. Any help with this embarassingly
simple question would be appreciated.



CMakeLists.txt:
cmake_minimum_required( VERSION 2.6 )
project( hello )
set( hello_SRCS hello.cpp )
add_executable( hello ${hello_SRCS} )
include( CPack )


bash-3.2$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mlohry/temp/cmake/cxx

bash-3.2$ cpack
CPack: Create package using STGZ
CPack: Install projects
CPack: - Run preinstall target for: hello
CPack: - Install project: hello
CPack: Compress package
CPack: Finalize package
CPack: Package /home/mlohry/temp/cmake/cxx/hello-0.1.1-Linux.sh generated.
CPack: Create package using TGZ
CPack: Install projects
CPack: - Run preinstall target for: hello
CPack: - Install project: hello
CPack: Compress package
CPack: Finalize package
CPack: Package /home/mlohry/temp/cmake/cxx/hello-0.1.1-Linux.tar.gz
generated.
CPack: Create package using TZ
CPack: Install projects
CPack: - Run preinstall target for: hello
CPack: - Install project: hello
CPack: Compress package
CPack: Finalize package
CPack: Package /home/mlohry/temp/cmake/cxx/hello-0.1.1-Linux.tar.Z
generated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090610/55e0d900/attachment.htm>


More information about the CMake mailing list