RUNTIME_DEPENDENCIES cannot find dll

DIRECTORIES is more needed on Windows than on Linux and Mac because it has no equivalent to RPATH. Linux rarely needs DIRECTORIES (and warns you if it finds something in a DIRECTORIES argument), and on Mac it isn’t even used at all.

We deliberately made the decision to not consider the PATH variable in file(GET_RUNTIME_DEPENDENCIES), because setting the PATH from outside the project could change the results of it. You can add $<TARGET_DIR:qt6core> to the DIRECTORIES argument, which should allow it to find it.

1 Like