I am developing an openssl based applet under m1 pro.
I installed openssl using the command "brew install openssl", and then I found the corresponding header files and libraries in the directory /opt/homebrew/Cellar/openssl@3/3.0.5/.
When I create a new xcode project and add dependencies, there is no problem with debugging and compilation, and it can run normally. But when I try to compile the Release version, it fails to compile. After some analysis, I found that the reason is because my project target file is arm architecture by default, and the openssl I installed through brew is also arm architecture, so the debug version There is no problem and the x86-64 architecture needs to be compiled when compiling the release.
At this time, there is no corresponding library file, so the compilation cannot be successful.
But I actually want to be able to generate a generic executable. So wondering how to handle this situation?
Do I need to install openssl for multiple architectures on my machine?