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

**URL:** https://discourse.cmake.org/t/library-not-found-for-l-generating-xcode-project-with-m1/6626
**Category:** Usage
**Tags:** os:macos
**Created:** [October 7, 2022, 6:40am UTC](https://discourse.cmake.org/t/library-not-found-for-l-generating-xcode-project-with-m1/6626 "2022-10-07T06:40:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ilgemello74](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/i/c0e974/32.png) [@ilgemello74](https://discourse.cmake.org/u/ilgemello74)
#### Post date: [October 7, 2022, 6:40am UTC](https://discourse.cmake.org/t/library-not-found-for-l-generating-xcode-project-with-m1/6626/1 "2022-10-07T06:40:08Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [October 7, 2022, 5:51pm UTC](https://discourse.cmake.org/t/library-not-found-for-l-generating-xcode-project-with-m1/6626/2 "2022-10-07T17:51:57Z")

</div>

Can you provide a small example that exhibits the problem?
