install_targets — CMake 3.23.0-rc4 Documentation
cmake.org › latest › commandinstall_targets. ¶. Deprecated since version 3.0: Use the install (TARGETS) command instead. This command has been superseded by the install () command. It is provided for compatibility with older CMake code. install_targets (<dir> [RUNTIME_DIRECTORY dir] target target) Create rules to install the listed targets into the given directory. The directory <dir> is relative to the installation prefix, which is stored in the variable CMAKE_INSTALL_PREFIX.
How to use CMake to install - Stack Overflow
stackoverflow.com › questions › 48428647You can use the command cmake --build . --target install --config Debug for installation. CMake's build tool mode supports further arguments that are of interest in this case. You can select the target to build by --target option, the configuration to build by --config option, and pass arguments to the underlying build tool by means of the -- option.
cmake应用:安装和打包 - 知乎
https://zhuanlan.zhihu.com/p/377131996cmake --build . --target install # 或者针对make构建工具 make install 更加优雅的方法是在 cmake 3.15版本往后,使用 cmake --install 命令: cmake --install . --prefix "../output" --install 指定构建目录; --prefix 指定安装路径,覆盖安装路径变量 CMAKE_INSTALL_PREFIX 。 二 打包 1 CPack 要使用打包功能,需要执行 include (CPack) 启用相关的功能。