How to determine target architecture in Projucer setting

Hi Jucers,
Please help me this issue: In Projucer settings, I need to adding an include path (ex: …/vcpkg/installed/arm64-osx/include) but in my friend macos, this path is …/vcpkg/installed/x64-osx/include). How can I config this generally in Projucer settings?
Thanks!

A typical technique to address this kind of issue is to use a shell-escape to check the architecture. This might look something like this, in bash:

$ echo "../vcpkg/installed/$(arch)-osx/include"

I’m not really sure if shell-escapes are supported in the Projucer environment, however - it could be that you can put this command in and it will get expanded, but … if it doesn’t work … then why not just put both paths in the Projucer project? :stuck_out_tongue_winking_eye:

1 Like

The real best answer here is to use CMake. Platform specific logic is much better supported than in the Projucer.

3 Likes

True, that. CMake gives you everything you need to do better platform-specific builds.

1 Like