Library not found for -l... Generating xCode project with M1

Hi everyone, I came across some strange cmake behavior. My project imports a series of static libraries always generated with in the cmakelist stack. When I run the command to generate the xCode project file with an x86 processor everything works as expected. When I start the same command on the M1 processor it does not give an error but the project does not compile due to linking problems.
Checking the generated project file I saw that on x86 the target_link_libraries generates a correct “library search path”, the one generated by M1 also adds the library file with extension to the path.
This generates a warning in the compilation phase “… not a folder” and an error in the linking phase.
some ideas to solve the problem:

I found the issue with cmake bin 3.23 I resolved it with a download to 3.19.3, do you know if is possible solve the issue with some new parameter…

Can you provide a small example that exhibits the problem?