CMake issue: binary (needed during build) links againts /opt/local/lib/foo.dylib

Mojca Miklavec mojca at macports.org
Mon Oct 3 15:51:39 PDT 2016


Dear Clemens,

On 30 September 2016 at 10:35, Clemens Lang wrote:
> Hi Mojca,
>
> ----- On 30 Sep, 2016, at 03:30, Mojca Miklavec wrote:
>
>> Does anyone with a deeper understanding of CMake build system have any
>> idea what to fix?
>
> CMake should get this right automatically. You've already been pointed to
>  https://cmake.org/Wiki/CMake_RPATH_handling

I looked at that page, but found it somewhat confusing to fully understand.

> Try changing
>  - CMAKE_BUILD_WITH_INSTALL_RPATH (it should be false),
>  - CMAKE_SKIP_BUILD_RPATH (should be false) and
>  - CMAKE_INSTALL_RPATH_USE_LINK_PATH (try both?)

Thank you. I added:
    -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
    -DCMAKE_SKIP_BUILD_RPATH=FALSE \
    -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE

to the Portfile and now I'm running into different issues, so I guess
this problem was more or less fixed.

The command "otool -L cfg" reports
    @rpath/libMiKTeX209-core.1.dylib

I might have to review the settings once I manage to get to the
destroot phase, let's see.

Thank you again,
    Mojca


More information about the macports-dev mailing list