cmake: multiple CPACK_PACKAGE_INSTALL_DIRECTORY
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.
精彩评论