install: Teach CODE,SCRIPT modes to evaluate generator expressions
Try with
add_library(foo foo.cpp)
install(CODE "message(\"hello world $<CONFIG> $<TARGET_FILE_DIR:foo>\")")
Should result with something along the lines of message("hello world Debug /tmp/test/build")
in cmake_install.cmake
Fixes: #15785 (closed)
Topic-rename: install-code-script-genex
Edited by Brad King