Xcode works with potentially multiple SDKs, so whenever you define these things (e.g. HEADER_SEARCH_PATHS or LIBRARY_SEARCH_PATHS), the current SDK root is added to the actual path that is passed to the linker.
So, one way to make this work would be to add your directory to the SDK. For example, assuming you are building using Mac OS X 10.5 sdk, you can add your option:
ln -s /opt /Developer/SDKs/MacOSX10.5.sdk/opt
Your library will now be found on your system.
If you don't want to do this, you will have to take a look at CMake and find out how to get it to generate library requirements for your real library (I don't know anything about CMake, so I can't help you there). That's why you see the difference between USER_HEADER_SEARCH_PATHS and HEADER_SEARCH_PATHS your other question.
As another option, you can also specify this path with the assembly variable OTHER_LDFLAGS:
OTHER_LDFLAGS=-L/opt/local/lib
This will cause the linker to look for / opt / local / lib as well as its standard paths and not require you to create another project file.
source share