# set xcode "Library Search Paths" form cmake?

**URL:** https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846
**Category:** Code
**Tags:** os:macos, gen:xcode, os:ios, tool:cmake
**Created:** [October 26, 2024, 4:06pm UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846 "2024-10-26T16:06:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shokarta](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@shokarta](https://discourse.cmake.org/u/shokarta)
#### Post date: [October 26, 2024, 4:06pm UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846/1 "2024-10-26T16:06:01Z")

</div>

Hello guys,  
after I configure the project from QT, in xcode I need to manualy go to project **BUILD SETTINGS** , locate **LIBRARY SEARCH PATHS** and set some stuff manualy…

can this be automated from cmake?  
I need to set followings paths:  
 ![image](https://discourse.cmake.org/uploads/default/original/2X/d/d7a1be341c2aa059ca4b34ef234b7d219b64b27d.png)

Thank you for any hints.

---

<div class="post-metadata">

### Author: ![retif](https://discourse.cmake.org/user_avatar/discourse.cmake.org/retif/32/1776_2.png) [@retif](https://discourse.cmake.org/u/retif)
#### Post date: [October 26, 2024, 4:23pm UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846/2 "2024-10-26T16:23:22Z")

</div>

> configure the project from QT

QuickTime Player? Even if you meant Qt, how does one configure a project from Qt? Did you mean Qt Creator, perhaps? But then how does Xcode come into play? You configure a project in one IDE and then open it in another IDE?

> need to set followings paths

I’d expect that to be set automatically, which is probably what will happen if you use `Xcode` generator (_Qt Creator configures with `Ninja` by default, as I recall, but actually then there would be no Xcode project to be opened in Xcode, so I don’t understand how are you doing this_). If not, then I’d try [this reply](https://discourse.cmake.org/t/question-about-library-search-paths-and-static-libraries/2783/7) from a different thread.

---

<div class="post-metadata">

### Author: ![shokarta](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@shokarta](https://discourse.cmake.org/u/shokarta)
#### Post date: [October 26, 2024, 4:28pm UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846/3 "2024-10-26T16:28:39Z")

</div>

yes, sorry I mean Qt Creator… by Qt Creator when I run Cmake to configure my project, it generates **xcodeproj** which I later open via Xcode.

the link from another thread i have already checked, unfotunatelly does not tell how to add custom directories to “Library Search Paths” as I do in xcode manualy

---

<div class="post-metadata">

### Author: ![shokarta](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@shokarta](https://discourse.cmake.org/u/shokarta)
#### Post date: [October 28, 2024, 5:16pm UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846/4 "2024-10-28T17:16:27Z")

</div>

**target\_link\_directories()** does indeed put the value to the “ **LIBRARY SEARCH PATHS** ” variables, however this **target\_link\_directories()** converts given value to **absolute path out of current source directory** … - as state din docs…

is there any alternative which would just firmly put the given value there **without converting** to aboluth path?

---

<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: [February 20, 2026, 3:34am UTC](https://discourse.cmake.org/t/set-xcode-library-search-paths-form-cmake/12846/5 "2026-02-20T03:34:42Z")

</div>

IIUC, even if CMake did write relative paths, it may reroot the path to be relative to the corresponding binary directory. I am very unfamiliar with the Xcode internals to know for sure, but such “floating” directory references are generally not used or supported in CMake projects.
