LIBRARY DESTINATION:库文件的安装目录; ARCHIVE DESTINATION:归档文件的安装目录。...2、打包可以使用 CPack 模块来打包生成的二进制文件,该指令会在构建编译之后使用cpack 命令进行打包安装。...打包安装的路径前缀 CPACK_INSTALL_PREFIX 打包压缩包的内部目录前缀 CPACK_PACKAGE_FILE_NAME 打包压缩包的名称(...
CPACK_PACKAGE_FILE_NAME The name of the package file to generate, not including the extension. For example, cmake-2.6.1-Linux-i686. The default value is: ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME} CPACK_PACKAGE_INSTALL_DIRECTORY Installation directory on the ...
⚠️注意:假如安装时出现file /home from install of example-1.0.0-1.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64,那么需要在配置文件里面添加以下配置,让生成的 rpm 文件不包含 /home 和 /home/vesoft 。 set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/home") list...
覆盖/定义用于打包的 CPACK_PACKAGE_NAME 变量的值。在 CPackConfig.cmake 文件中为这个变量设置的任何值将被忽略。 -R<包版本> 覆盖/定义用于打包的 CPACK_PACKAGE_VERSION 变量的值。它将覆盖在 CPackConfig.cmake 文件中设置的值或从 CPACK_PACKAGE_VERSION_MAJOR、CPACK_PACKAGE_VERSION_MINOR 和CPACK_PA...
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${TIMESTAMP}-${SHORT_COMMIT_ID}") set(CPACK_PACKAGE_DIRECTORY ..) set(CPACK_GENERATOR "TGZ;ZIP") # 7Z (7-Zip file format) # DEB (Debian packages) # External (CPack External packages) # IFW (Qt Instal...
⚠️注意:假如安装时出现file /home from install of example-1.0.0-1.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64,那么需要在配置文件里面添加以下配置,让生成的 rpm 文件不包含 /home 和 /home/vesoft 。 代码语言:txt ...
STRIP_TRAILING_WHITESPACE )set(CPACK_GENERATOR "TGZ")set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${vTimeStamp}-${vGitBranch}-${vGitCommit}")include(CPack)在CMakeLists.txt ⽂件中添加:include(${CMAKE_CURRENT_SOURCE_DIR}/vInstallCpack.cmake)在run.sh ⽂件中添加:make package ...
⚠️注意:假如安装时出现file /home from install of example-1.0.0-1.x86_64 conflicts with file from package filesystem-3.2-25.el7.x86_64,那么需要在配置文件里面添加以下配置,让生成的 rpm 文件不包含 /home 和 /home/vesoft 。 set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/home") ...
)set(CPACK_GENERATOR"TGZ")set(CPACK_PACKAGE_FILE_NAME"${PROJECT_NAME}-${vTimeStamp}-${vGitBranch}-${vGitCommit}")include(CPack) 在CMakeLists.txt 文件中添加: include(${CMAKE_CURRENT_SOURCE_DIR}/vInstallCpack.cmake) 在run.sh 文件中添加: ...
这三个合起来的功能和CPACK_PACKAGE_VERSION的作用是一样的 设置软件包名称 set(CPACK_PACKAGE_NAME "omatrix") 设置软件包装位置 set(CPACK_SET_DESTDIR true) set(CPACK_INSTALL_PREFIX "/opt/omatrix/") 设置软件包生成的位置 set(CPACK_OUTPUT_FILE_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}) ...