开发者

cmake: multiple CPACK_PACKAGE_INSTALL_DIRECTORY

开发者 https://www.devze.com 2023-01-24 07:17 出处:网络
I am using Cmake with Cpack to create linux packages. I install my executable in /bin/MyProgram; in order to work properly, the executable needs to have access to an external file (an xml schema). I w

I am using Cmake with Cpack to create linux packages. I install my executable in /bin/MyProgram; in order to work properly, the executable needs to have access to an external file (an xml schema). I would like Cpack to generate a package that will install that file in a specific location (e.g. /usr/share/MyProgram) other than the one 开发者_如何学Gowhere the executable is stored.

Thank you very much!


You want to use INSTALL(FILES ) like this:

install(FILES files... DESTINATION <dir>
      [PERMISSIONS permissions...]
      [CONFIGURATIONS [Debug|Release|...]]
      [COMPONENT <component>]
      [RENAME <name>] [OPTIONAL])

You can read more about the INSTALL command in the CMake documentation.

0

精彩评论

暂无评论...
验证码 换一张
取 消