Using specific packages for x86 builds and ARM builds with Xcode

Hello,

I'm currently making a C++ application, in Xcode, that uses C++ packages (like libglfw,libglew,opengl) along with a custom Rust Language C++ package that is compiled with a build script during the build phase.

All of the packages are compiled for ARM, since I use an M1 as a development system, and the packages are downloaded through homebrew.

However, when I build my application with Mac(Rosetta) for x86 Intel CISC MacOS it says that "Symbols cant be found for architecture x86_64" for the packages. Makes sense since the packages are built for arm64 RISC ARM (besides the Rust package, which i can fix with a patch of the build script).

Is there a way to tell Xcode to use specified x86 Intel CISC versions of the packages when building for Rosetta and to use arm64 RISC ARM packages when building for native?

Im looking to use the libsteam_api package as well, but that is x86 only. I can imagine I can just set that to be used with C++ preprocessor directives.
Using specific packages for x86 builds and ARM builds with Xcode
 
 
Q