Errors when changing cmake build directory
Ao Liu
ao at aoliu.tech
Thu May 2 20:46:39 UTC 2019
Hi Michael,
The project I'm building creates a configuration script when cmake is
executed based on the path where the build happens. So when the whole build
directory is moved from ${worksrcpath} to a new location it fails to
configure.
BTW I think I set the cmake.build_dir
to ${destroot}/${prefix}/share/abc/abc${abc.version}/
in the very beginning and the build happened in
so ${destroot} was available in the very beginning of the port definition I
guess.
/opt/local/var/macports/build/_Users_frankliuao_ports_science_abc/abc4.10.5/work/destroot/opt/local/share/abc/abc4.10.5/
I also need some workaround for this problem. LOL. Probably manually
generate a new script...
Best,
Ao
On Thu, May 2, 2019 at 3:17 PM Michael Dickens <michaelld at macports.org>
wrote:
> Just remember that "${destroot}" will not exist until the "destroot" phase
> unless it is created in the Portfile script. If you need a different build
> directory than that provided by the CMake PG, then you can in the Portfile
> create some other directory & my advice would be to place it in the top
> level "${worksrcpath}" directory -- which is where the "build" directory is
> placed. Not sure why one would need this, but maybe there's a use-case I'm
> not imagining. Good luck! - MLD
>
> On Thu, May 2, 2019, at 3:20 PM, Ao Liu wrote:
>
> Ummmmm. Good to know that.
>
> I think what I would like to do can be achieved by smartly using
> ${destroot} to deploy a new build dir and move the files to where I would
> like. In this case the build happens in the work dir and will eventually
> end up in where I want it to be.
>
> As I suggested in a recent ticket - it would be nice for the website to
> explain the ${destroot} variable in more details. Helps the developer to
> build powerful stuff.
>
> Thanks for the replies folks!
> Ao
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190502/d0403e11/attachment-0001.html>
More information about the macports-dev
mailing list