是否有人使用CPack脚本的工作示例来处理具有Qt和OpenGL依赖关系的debian包?
我已经设置了这个
set (CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12), libQtOpenGL (>=4.6.0), libQtCore (>=4.6.0), libQtGui (>=4.6.0), libglut (>=3.0), libICE (>=6.0), libX11 (>=6.0), libXext (>=6.0), libXmu (>=6.0), libXi (>=6.0), libstdc++ (>=6.0), libm (>=6.0), libgcc_s (>=1.0), libc (>=6.0), libGLU, libGL (>=1.0), libpthread" )
我用Google搜索,但从未找到一个有效的例子。我的主要问题是如何首先为libGLU设置依赖项,然后为libGL和以下库设置依赖项。
一旦我创建了deb,安装程序就会说
**Error: Dependency is not satisfiable: libXXX**
其中XXX是我之前列出的库(主要是Qt库)
目前我的cmake版本是2.8.2但是cpack_add_component命令不起作用
答案 0 :(得分:7)
我不认为你可以"订购" CMake中的依赖项。 如果你想要一个生成带有qt依赖关系的.deb的CMakeLists的工作示例,请看:
project(QExhibitor)
cmake_minimum_required(VERSION 2.8)
FIND_PACKAGE(Qt4 REQUIRED QtNetwork QtGui QtCore QtXml)
FIND_PACKAGE(CSSRobopec REQUIRED)
#Some non interesting things ...
#.....
add_executable(QExhibitor ${QT_SOURCES} ${QT_RESOURCES_CPP} ${QT_FORMS_HPP} ${QT_MOC_HPP})
target_link_libraries(QExhibitor ${QT_LIBRARIES} ${CSSRobopec_LIBRARIES})
INSTALL(TARGETS QExhibitor DESTINATION /reetiPrograms/RApplications/Applications/)
INSTALL(FILES Icons/RQExhib.png DESTINATION /reetiPrograms/RApplications/Icons)
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "2")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "cssrobopec,libqt4-xml,libqt4-network,libqtgui4,treeupdatablereeti")
set(CPACK_PACKAGE_DESCRIPTION "Configure UExhibitor and launch missions")
set(CPACK_PACKAGE_CONTACT "Adrien BARRAL aba@robopec.com")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/Debian/postinst")
include(CPack)
答案 1 :(得分:1)