Cmake build problem workaround

Rainer Müller raimue at macports.org
Tue Jun 19 09:48:35 UTC 2018


On 2018-06-18 21:20, Randolph M. Fritz wrote:
> This is what I ended up with. I don't like it at all.
> 
> pre-destroot {
>     # This fixes what may be a cmake error
>     catch {
> # look for DESTDIR in the fixup_bundle arguments
> exec grep -q {fixup_bundle.*DESTDIR}
> ${workpath}/build/InstallRules/dependencies.cmake
>     } res opt
>     # if it's not present, add it
>     if [string equal "$res" "child process exited abnormally"] {
>         reinplace "/fixup_bundle(\"/s//&\$ENV{DESTDIR}/"
> ${workpath}/build/InstallRules/dependencies.cmake
>     }
> }

Here I found an example how CMake handles this for its own GUI:

https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/QtDialog/CMakeLists.txt;hb=v3.11.3#l249

Is fixup_bundle() not in CMakeLists.txt in your case? I would add
$ENV{DESTDIR} there instead of patching the generated file.

Rainer


More information about the macports-dev mailing list