file(GET_RUNTIME_DEPENDENCIES) gives error "Resolved path is not absolute" on OS X

I’m using CMake on OS X and I’m trying to build an executable with linked shared libraries. I’d like to have the install step copy the shared libraries next to the executable file, so I’m using the RUNTIME_DEPENDENCIES option of install(TARGET).

I’m running into the following error though, which tells me very little, and I haven’t seen any documentation or others encounter this issue.

Error: file Resolved path is not absolute

Looking at CMake’s source code, this error only occurs when resolving dependencies on the Mac version of CMake. Is there any way to get more details about what files or paths might be causing this error?

I’m using VCPKG for obtaining and building the shared libraries. This is the command I’m using for install. The install command works on Linux as well with no issues.

    install(TARGETS project
        RUNTIME_DEPENDENCIES
        POST_INCLUDE_FILES ${EXTRA_LIBRARY}
        RUNTIME DESTINATION .
        LIBRARY DESTINATION ./lib
        FRAMEWORK DESTINATION ./lib
    )

Thank you

Can you reproduce the problem with a minimal project that does not use vcpkg?

Hi Craig,

Here is the minimal reproduction with the error I encountered. The latest GitHub actions run shows the error I encountered. I also print the generated install script there as well.