Projucer 6.0.7 and later prepends $(SRCROOT) to absolute include paths

Hi,

when using Projucer 6.0.7/6.0.8 on Windows to export projects files, a $(SRCROOT) is prepended to absolute include paths in XCode projetcs, e.g. when specifying a VST Legacy SDK folder or adding header search paths. Running Projucer on OSX and exporting the same projects the paths are correct.

Is this a bug in Projucer? Or is it not supported to have absolute include paths?

Cheers,
Sebastian

Thanks for reporting. The issue was due to how the Projucer was determining what constitutes an absolute file path on Windows vs Unix and should now be fixed on develop with commit 060f96a.

Thanks for the quick fix! :slight_smile:

Is this fix expected to work for search paths that look like this?
$(MYSDK)/include

I believe that the only reliable solution would be to allow users to indicate whether the paths are expected to be absolute or relative.

Here’s an issue that I encountered that might be related:

Can you provide an example of a .jucer file that is causing this issue?

As a “new user”, I’m not authorized to upload files.

<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="Dp6Yze" name="Bad" projectType="audioplug" useAppConfig="0"
              addUsingNamespaceToJuceHeader="0" jucerFormatVersion="1" companyName="BadCompany"
              companyCopyright="2021" companyWebsite="www.BadCompany.com"
              companyEmail="support@BadCompany.com" pluginFormats="buildStandalone,buildVST3"
              headerPath="../../../Common&#10;../../../../../Common&#10;&quot;$(MYSDK)/include&quot;&#10;"
              pluginRTASCategory="2" pluginVST3Category="Dynamics" pluginAAXCategory="2">
  <MAINGROUP id="mcmRfo" name="Bad">
    <GROUP id="{A8499E2A-A3F7-BAB6-82CC-32A0586F5EF2}" name="Source">
      <FILE id="Z4Qug0" name="BcJuceBaseEditor.cpp" compile="1" resource="0"
            file="../Common/BcJuceBaseEditor.cpp"/>
      <FILE id="JURAy4" name="BcJuceBaseEditor.h" compile="0" resource="0"
            file="../Common/BcJuceBaseEditor.h"/>
      <FILE id="P5DrGO" name="BcBaseEffectPluginContext.cpp" compile="1"
            resource="0" file="../../../Common/BcBaseEffectPluginContext.cpp"/>
      <FILE id="qOFOlw" name="BcBaseEffectPluginContext.h" compile="0" resource="0"
            file="../../../Common/BcBaseEffectPluginContext.h"/>
      <FILE id="BvRNdv" name="BcJuceBaseProcessor.cpp" compile="1" resource="0"
            file="../Common/BcJuceBaseProcessor.cpp"/>
      <FILE id="omdlLy" name="BcJuceBaseProcessor.h" compile="0" resource="0"
            file="../Common/BcJuceBaseProcessor.h"/>
      <FILE id="dTeq9M" name="BcJuceLookAndFeel.cpp" compile="1" resource="0"
            file="../Common/BcJuceLookAndFeel.cpp"/>
      <FILE id="AmfGih" name="BcJuceLookAndFeel.h" compile="0" resource="0"
            file="../Common/BcJuceLookAndFeel.h"/>
      <FILE id="KCStti" name="BadProcessor.cpp" compile="1" resource="0"
            file="Source/BadProcessor.cpp"/>
      <FILE id="Cq4WSM" name="BadProcessor.h" compile="0" resource="0"
            file="Source/BadProcessor.h"/>
      <FILE id="RQXrVk" name="BadEditor.cpp" compile="1" resource="0"
            file="Source/BadEditor.cpp"/>
      <FILE id="xgTsVg" name="BadEditor.h" compile="0" resource="0"
            file="Source/BadEditor.h"/>
    </GROUP>
  </MAINGROUP>
  <JUCEOPTIONS JUCE_STRICT_REFCOUNTEDPOINTER="1" JUCE_VST3_CAN_REPLACE_VST2="0"
               JUCE_USE_OGGVORBIS="0" JUCE_USE_FLAC="0" JUCE_USE_MP3AUDIOFORMAT="0"
               JUCE_USE_LAME_AUDIO_FORMAT="0" JUCE_USE_WINDOWS_MEDIA_FORMAT="0"/>
  <EXPORTFORMATS>
    <VS2019 targetFolder="Builds/VisualStudio2019" externalLibraries="BcBadFX.lib">
      <CONFIGURATIONS>
        <CONFIGURATION isDebug="1" name="Debug" targetName="Bad" libraryPath="$(MYSDK)/Windows/Debug/lib"/>
        <CONFIGURATION isDebug="0" name="Release" targetName="Bad" libraryPath="$(MYSDK)/Windows/Release/lib"/>
      </CONFIGURATIONS>
      <MODULEPATHS>
        <MODULEPATH id="juce_audio_basics" path="../../modules"/>
        <MODULEPATH id="juce_audio_devices" path="../../modules"/>
        <MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
        <MODULEPATH id="juce_audio_processors" path="../../modules"/>
        <MODULEPATH id="juce_audio_utils" path="../../modules"/>
        <MODULEPATH id="juce_core" path="../../modules"/>
        <MODULEPATH id="juce_data_structures" path="../../modules"/>
        <MODULEPATH id="juce_events" path="../../modules"/>
        <MODULEPATH id="juce_graphics" path="../../modules"/>
        <MODULEPATH id="juce_gui_basics" path="../../modules"/>
        <MODULEPATH id="juce_gui_extra" path="../../modules"/>
        <MODULEPATH id="juce_audio_formats" path="../../modules"/>
      </MODULEPATHS>
    </VS2019>
    <XCODE_MAC targetFolder="Builds/MacOSX" externalLibraries="BcBadFX">
      <CONFIGURATIONS>
        <CONFIGURATION isDebug="1" name="Debug" libraryPath="$(MYSDK)/Mac/Debug/lib"/>
        <CONFIGURATION isDebug="0" name="Release" libraryPath="$(MYSDK)/Mac/Release/lib"/>
      </CONFIGURATIONS>
      <MODULEPATHS>
        <MODULEPATH id="juce_audio_basics" path="../../modules"/>
        <MODULEPATH id="juce_audio_devices" path="../../modules"/>
        <MODULEPATH id="juce_audio_plugin_client" path="../../modules"/>
        <MODULEPATH id="juce_audio_processors" path="../../modules"/>
        <MODULEPATH id="juce_audio_utils" path="../../modules"/>
        <MODULEPATH id="juce_core" path="../../modules"/>
        <MODULEPATH id="juce_data_structures" path="../../modules"/>
        <MODULEPATH id="juce_events" path="../../modules"/>
        <MODULEPATH id="juce_graphics" path="../../modules"/>
        <MODULEPATH id="juce_gui_basics" path="../../modules"/>
        <MODULEPATH id="juce_gui_extra" path="../../modules"/>
        <MODULEPATH id="juce_audio_formats" path="../../modules"/>
      </MODULEPATHS>
    </XCODE_MAC>
  </EXPORTFORMATS>
  <MODULES>
    <MODULE id="juce_audio_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_devices" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_formats" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_plugin_client" showAllCode="1" useLocalCopy="0"
            useGlobalPath="0"/>
    <MODULE id="juce_audio_processors" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_audio_utils" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_core" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_data_structures" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_events" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_graphics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_gui_basics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
    <MODULE id="juce_gui_extra" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
  </MODULES>
  <LIVE_SETTINGS>
    <WINDOWS buildEnabled="1"/>
  </LIVE_SETTINGS>
</JUCERPROJECT>

If you remove the quotes around the "$(MYSDK)/include" header search path it’ll fix the Xcode project parsing error.