[CMake] CMake/CPack: empty packages

Dmitry savagarb at gmail.com
Mon Feb 15 08:25:34 EST 2010


Hello!
I've started using CMake not long ago, I'm not very familiar with it yet. I
need to generate a package with CMake, but when I try to do it, I get empty
packages. This is my CMakeLists.txt file (just a simple "hello, world"
application of a single .cpp file):

==============================
cmake_minimum_required( VERSION 2.6 )
project( cmakehello01 )

set( hello_SRCS hello.cpp )
add_executable( cmakehello01 ${hello_SRCS} )

install(TARGETS cmakehello01 DESTINATION /usr/share/bin)

INCLUDE(CPack)
==============================

I run:
mkdir build
cd build
cmake ..
make
sudo make install
sudo make package

and after that I always get three empty packages (.sh, .tar.gz and .Z). What
am I doing wrong? I've spent a couple of hours to figure it out, and still
have no idea. I've tried to set various CPACK_xxx variables (
http://www.cmake.org/Wiki/CMake:Packaging_With_CPack,
http://www.cmake.org/Wiki/CMake:CPackConfiguration): it seems they have no
effect at all. But, afaik, it's not necessary, since CPack script generates
reasonable default values for them. I feel like I've missed something
obvious...

I'm working on Fedora 11,
$ cmake --version
cmake version 2.6-patch 4

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100215/9869a455/attachment.htm>


More information about the CMake mailing list