BPLs of packages go to wrong package output directory
I have a project group with several packages, some of them requiring others in the same project group. The packages do not all have the same package output directory set. And here is it where the problem starts. Depending on which package I build the BPLs go some time to one directory, another time to a different one.
I try to simplify what's going on. Say we have two packages PackLib
and PackDependent
. PackDependent
has PackLib
in its "Requires" list. PackLib
's "Package output directory" is "C:\PackLib", PackDependent
's directory is "C:\PackDependent". Here is the problem: When I build PackLib
then the bpl goes to "C:\PackLib" - this is what I want. But when I build PackDependent
then also PackLib
is built (which is ok) but this time the PackLib.bpl goes to "C:\PackDependent" (expected: "C:\PackLib")!
In my context this causes all kinds of weir开发者_开发技巧d behavior, as the BPLs keep getting generated to different directories, depending on the package I build.
Am I missing something I need to configure? I want my packages to go always to the configured "Package output directory"!
What is probably happening is that your dependent package is being implicitly built as a result of the another package. When that happens, the outer-most package's compiler options are what get used for all packages being built. What you can do is switch to always building your packages explicitly by setting the{$IMPLICITBUILD OFF} directive in each package dpk file. As long as you explicitly build all the packages from the top of the dependency tree down, you should never encounter an error or have the packages put into the wrong location.
精彩评论