mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00

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.
8 lines
233 B
CMake
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)
|
|
]])
|