No subject


Sun Apr 3 09:54:08 EDT 2011


..

> -----
> Run CPack packaging tool...
> CPack: Create package using STGZ
> CPack: Install projects
> CPack: - Run preinstall target for: hello
> CPack: - Install project: hello
> CPack: Create package
> CPack: - package: /home/renato/devel/CMakeTest/
> build/hello-0.1.1-Linux.sh generated.
> CPack: Create package using TBZ2
> CPack: Install projects
> CPack: - Run preinstall target for: hello
> CPack: - Install project: hello
> CPack: Create package
> CPack: - package:
> /home/renato/devel/CMakeTest/build/hello-0.1.1-Linux.tar.bz2 generated.
> -----
>
> It does not add the files to the package, so it becomes a empty package,
> which does not have any file?
>
> How can I solve that too?

Because may be you didn't installed anything in your project.


> I don't know if it matters, but here's my CMakeLists.txt:

It does...keep reading...

> -----
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
> INCLUDE(InstallRequiredSystemLibraries)
> PROJECT(hello C)
> OPTION(USE_SHARED_LIBRARY "Use a Shared Library" OFF)
> IF(USE_SHARED_LIBRARY)
> =A0=A0=A0 ADD_LIBRARY(hellolib SHARED hellolib.c)
> ELSE(USE_SHARED_LIBRARY)
> =A0=A0=A0 ADD_LIBRARY(hellolib STATIC hellolib.c)
> ENDIF(USE_SHARED_LIBRARY)
> ADD_EXECUTABLE(hello hello.c)
> TARGET_LINK_LIBRARIES(hello hellolib)

You miss at least one install rule per target you want to install.

INSTALL(TARGETS
              hello  hellolib
              RUNTIME DESTINATION bin
              LIBRARY DESTINATION lib
              ARCHIVE DESTINATION lib/static)

> INCLUDE(CPack)
> -----
>
>
> Thanks to everyone!

CPack will only put in a package the targets/files/directories which are
INSTALLed by you CMakeLists.txt.


--=20
Erk
Membre de l'April - =AB promouvoir et d=E9fendre le logiciel libre =BB -
http://www.april.org


More information about the CMake mailing list