Issue #6 resolved

Setting targetdir has no effect

Anonymous created an issue

In the solution I set {{{

!lua

targetdir "/tmp/foo" }}} but when building I see that is has no effect for the dmd option -of. The binary target will always be written to the folder that contains the premake4.lua.

Comments (3)

  1. Andrew Gough repo owner

    Have you tried:

    location "/tmp/foo"

    I had some issues porting the GCC based functionality which manages the distinction between the objectdir, and targetdir - DMD just uses '-of' for _all_ output and doesn't really follow this pattern.

    A further complication is that dependencies are harder to find eg. exeA links to libB in the same project, but ensuring the path and build params locate the libA path becomes increasingly complex as various combinations of targetdir, objdir, location, and debug/release come into play.

    Cheers.

  2. jkm

    Actually, I'm setting both location and targetdir. Since you set it to resolved, do you have a test that works. Maybe I can see from your working example where I go wrong.

  3. Log in to comment