Delphi IDE won't expand macros from imported project

Viewed 112

We have a custom build system that creates a .properties file for your project which defines some macros that can be used with msbuild

For example: Project.properties

<Project InitialTargets="ImportingMacros" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <CM-OUTPUT-DIR>d:\build\exe\</CM-OUTPUT-DIR>
    </PropertyGroup>
</Project>

We use these macros through msbuild and it works well.

However we could not find a way to use them to customize IDE behavior. In the dproj file we can import the properties file but the IDE does not recognize the macros defined in the file.

    <Import Project="Project.properties"/>
    <PropertyGroup Condition="'$(Base)'!=''">
        <DCC_ExeOutput>$(CM-OUTPUT-DIR)$(Platform)\$(Config)</DCC_ExeOutput>
    </PropertyGroup>

In this case IDE won't expand the CM-OUTPUT-DIR macro.

Could something like this possible? We don't want to use environment variables and we also don't want to hard-code paths to dproj files as the macro definitions can change.

0 Answers
Related