[CMake] CPACK "deb" package Problem
Chang Yu Huang
yillkid at gmail.com
Thu Oct 14 05:22:58 EDT 2010
Here is my CMakeLists.txt file, and when I use the "make" and "make install"
command, I can successfully install all files into the file system.
However, when I use the "make package" command, there is no any file be
packaged in "deb package", I would like to ask why, thanks a lot.
CMakeLists.txt:
cmake_minimum_required(VERSION 2.6)
PROJECT (MY_PROJECT)SET (MY_PROJECT_SRCS main.c callback.c interface.c)
SET(EXECUTABLE_OUTPUT_PATH /usr/bin)
INSTALL(FILES my_project.glade DESTINATION
/usr/share/my_project)INSTALL(FILES my_project.png DESTINATION
/usr/share/my_project)INSTALL(FILES my_project.desktop DESTINATION
/usr/share/applications)
ADD_EXECUTABLE (my_project ${MY_PROJECT_SRCS})
INCLUDE(UsePkgConfig)FIND_PACKAGE(GTK)PKGCONFIG(gtk+-2.0
GTK2_INCLUDE_DIR GTK2_LINK_DIR GTK2_LINK_FLAGS
GTK2_CFLAGS)PKGCONFIG(libglade-2.0 GTK2_INCLUDE_DIR GTK2_LINK_DIR
GTK2_LINK_FLAGS GTK2_CFLAGS)PKGCONFIG(gthread-2.0 GTHREAD_INCLUDE_DIR
GTHREAD_LINK_DIR GTHREAD_LINK_FLAGS+- GTHREAD_CFLAGS)
IF (GTK2_INCLUDE_DIR)
SET(CMAKE_C_FLAGS "${GTK2_CFLAGS} ")
STRING(REGEX REPLACE "-l" "" GTK_LIBRARIES
"${GTK2_LINK_FLAGS} ")
SEPARATE_ARGUMENTS(GTK_LIBRARIES)
ADD_DEFINITIONS(-DHAVE_GTK2)ELSE (GTK2_INCLUDE_DIR)
MESSAGE(FATAL_ERROR "GTK or GTK2 is required to build this
project.")ENDIF (GTK2_INCLUDE_DIR)TARGET_LINK_LIBRARIES(deva
${GTK2_LINK_FLAGS})SET(CPACK_DEBIAN_PACKAGE_MAINTAINER
"my_project at gmail.com")
SET(CPACK_CMAKE_GENERATOR "Unix
Makefiles")SET(CPACK_PACKAGE_VERSION_MAJOR "0.01")SET(CPACK_GENERATOR
"TGZ;DEB")INCLUDE(CPack)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101014/f6907d4e/attachment-0001.htm>
More information about the CMake
mailing list