Hello,
I'm doing an application for Debian based systems and I need to package
a .deb file, my application has several files to install in addition to
the main executable.
So, my CMakeLists.txt file looks like:
--------
project("myapp" C)
cmake_minimum_required(VERSION 2.8)
# The executable
add_executable(myapp main.c)
install(TARGETS myapp RUNTIME DESTINATION bin)
# Another file to install
install(FILES ${CMAKE_SOURCE_DIR}/data/myapp.desktop DESTINATION
"${CMAKE_INSTALL_PREFIX}/share/applications")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Damián Nohales")
INCLUDE(CPack)
--------
I execute CMake and build the package in this way:
--------
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=install ..
$ make package
--------
I need to specify a prefix for the installation because I want to test
the application without installing on my whole system.
But the .deb content resulting of executing "make package" is not what I
expected:
--------
DEBIAN
home
user
projects
myapp
build
install
share
applications
myapp.desktop
usr
bin
myapp
--------
(Note that I'm developing my application on the following directory:
"/home/user/projects/myapp")
Well, I'm sure you are understanding the problem, I'm expecting that the
generated .deb package to has the files under the /usr directory having
too the myapp.desktop file under the following filename
"/usr/share/applications/myapp.desktop".
Any suggestion?
Thanks in advance!
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake