mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 15:18:26 -05:00
99b90dbf3c
Add a `FILES_FROM_DIR` option to install a specific set of files specified relative to a given directory and preserve their layout in the destination. Currently we intend to use this internally to implement other things so we don't provide an `install()` porcelain or documentation yet.
6 lines
312 B
CMake
6 lines
312 B
CMake
set(src ${CMAKE_CURRENT_SOURCE_DIR}/from)
|
|
set(dst ${CMAKE_CURRENT_BINARY_DIR}/from)
|
|
file(INSTALL FILES ${src}/a.txt FILES_FROM_DIR ${src} DESTINATION ${dst})
|
|
file(INSTALL FILES a.txt FILES_FROM_DIR ${src} DESTINATION ${dst} RENAME b.txt)
|
|
file(INSTALL FILES a.txt DESTINATION ${dst} PATTERN *.txt FILES_FROM_DIR)
|