install_files.rst 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. install_files
  2. -------------
  3. Deprecated. Use the :command:`install(FILES)` command instead.
  4. This command has been superceded by the :command:`install` command. It is
  5. provided for compatibility with older CMake code. The ``FILES`` form is
  6. directly replaced by the ``FILES`` form of the :command:`install`
  7. command. The regexp form can be expressed more clearly using the ``GLOB``
  8. form of the :command:`file` command.
  9. ::
  10. install_files(<dir> extension file file ...)
  11. Create rules to install the listed files with the given extension into
  12. the given directory. Only files existing in the current source tree
  13. or its corresponding location in the binary tree may be listed. If a
  14. file specified already has an extension, that extension will be
  15. removed first. This is useful for providing lists of source files
  16. such as foo.cxx when you want the corresponding foo.h to be installed.
  17. A typical extension is '.h'.
  18. ::
  19. install_files(<dir> regexp)
  20. Any files in the current source directory that match the regular
  21. expression will be installed.
  22. ::
  23. install_files(<dir> FILES file file ...)
  24. Any files listed after the ``FILES`` keyword will be installed explicitly
  25. from the names given. Full paths are allowed in this form.
  26. The directory ``<dir>`` is relative to the installation prefix, which is
  27. stored in the variable :variable:`CMAKE_INSTALL_PREFIX`.