Skip to content

Genex expansion before quote wrapping in install RUNTIME_DEPENDENCY_SET

Hi, I am referring to the discussion created here a while ago where it was suggested to create an issue: https://discourse.cmake.org/t/generator-expression-in-runtime-dependency-set-directories/9612

When passing a generator expression to install(RUNTIME_DEPENDENCY_SET) DIRECTORIES argument the expression is not expanded to a list of folders in the generated cmake_install.cmake. Instead a quoted string with semicolon separted folders is created. Therefore the folders are not used as additional search paths in file(GET_RUNTIME_DEPENDENCIES).

A minimal example to reproduce the behavior:

project(test_project)

add_executable(main main.cpp)
target_link_directories(main PRIVATE folderA folderB)

install(TARGETS
    main
    RUNTIME_DEPENDENCY_SET myRuntimeSet
)

install(RUNTIME_DEPENDENCY_SET myRuntimeSet
    DIRECTORIES $<TARGET_PROPERTY:main,LINK_DIRECTORIES>
)

This will create a string for the DIRECTORIES argument in the file command like "<path_to_source_folder>/folderA;<path_to_source_folder>/folderB" instead of two separate entries.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information