1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Files
CMake/Tests/RunCMake/CPack/tests/CPACK_CUSTOM_INSTALL_VARIABLES/test.cmake
Nils Gladitz 26e36111d3 CPack: Implement new variable CPACK_CUSTOM_INSTALL_VARIABLES
The new variable allows projects to define custom key=value pairs of
variables to be set in CPack cmake_install.cmake script invocations.
This allows install(SCRIPT|CODE) to be parameterized at runtime.
2021-05-24 08:21:49 +10:00

8 lines
233 B
CMake

set(CPACK_CUSTOM_INSTALL_VARIABLES "FOO=foo.txt" "BAR=bar.txt")
install(CODE [[
file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/${FOO})
file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/${BAR})
file(WRITE ${CMAKE_INSTALL_PREFIX}/foo/baz.txt)
]])