include(InstallRequiredSystemLibraries)set(CPACK_PACKAGE_NAME${PROJECT_NAME})set(CPACK_PACKAGE_VERSION${PROJECT_VERSION})set(CPACK_PACKAGE_DIRECTORY${CMAKE_BINARY_DIR})set(CPACK_SOURCE_IGNORE_FILES build)set(CPACK_PACKAGE_CONTACT"xxx@163.com")set(CPACK_PACKAGE_DESCRIPTION"cpack test program")#...
If the CMAKE_PROJECT_DESCRIPTION variable is set, it is used as the default value, otherwise the default will be a string generated by CMake based on CMAKE_PROJECT_NAME. CPACK_PACKAGE_HOMEPAGE_URL Project homepage URL. The default value is taken from the CMAKE_PROJECT_HOMEPAGE_URL ...
set(CPACK_PACKAGE_VERSION "1.0.0") set(CPACK_PACKAGE_CONTACT "Your Name <your.email@example.com>") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "My Application") set(CPACK_GENERATOR "TGZ;DEB;RPM") # 可以指定多个打包格式 set(CPACK_SOURCE_GENERATOR "TGZ") set(CPACK_SOURCE_IGNORE_FILES/.git/...
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY, "Packet capturing and decoding") 设置安装包约束关系 set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc7 (>= 2.3.1-6) ") 设置自动执行脚本(这一项比较重要) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/DEBIAN/postinst;${CMAKE_SOURCE_DIR}/DEBIAN/po...
在CPack中更改包目标文件夹可以通过设置CPACK_PACKAGE_INSTALL_DIRECTORY变量来实现。 CPack_PACKAGE_INSTALL_DIRECTORY变量用于指定软件包的安装目录。可以通过在CMakeLists.txt文件中添加以下代码来更改包目标文件夹: 代码语言:txt 复制 set(CPACK_PACKAGE_INSTALL_DIRECTORY "/path/to/install/directory") 其中,"/...
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY, "Packet capturing and decoding") 设置安装包约束关系 set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc7 (>= 2.3.1-6) ") 设置自动执行脚本(这一项比较重要) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/DEBIAN/postinst;${CMAKE_SOURCE_DIR}/DEBIAN/po...
"TGZ;DEB") SET (CPACK_SET_DESTDIR ON) SET (CPACK_PACKAGE_NAME "mypackage") SET (CPACK_PACKAGE_VENDOR "me") SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "this is my package description") SET (CPACK_DEBIAN_PACKAGE_DESCRIPTION "this is my package description here comes detailed description text...
set(CPACK_PACKAGE_DESCRIPTION "A set of command line and gui tools to capture and decode traffic") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Packet capturing and decoding") set(CPACK_PACKAGE_VENDOR "Wireshark developers") set(CPACK_PACKAGE_NAME "wireshark") ...
set(CPACK_PACKAGE_VERSION_MINOR 0)# Defalut value is CMAKE_PROJECT_VERSION_MINOR set(CPACK_PACKAGE_VERSION_PATCH 1)# Defalut value is CMAKE_PROJECT_VERSION_PATCH set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Brief") set(CPACK_PACKAGE_VENDOR "Company") string(TIMESTAMP TIMESTAMP "%Y-%m-%d_%H-%M...
set(CPACK_RPM_PACKAGE_LICENSE "Apache 2.0 + Common Clause 1.0") include(CPack) 执行cmake 命令后, 你会发现当前目录下面多了两个文件CPackConfig.cmake和CPackSourceConfig.cmake。 编译完成后,执行cpack -G RPM就可将文件打包成 rpm 包,当前目录下会生成一个_CPack_Packages目录和一个以 .rpm 为后...