Hi!
I'm trying to link shared libraries with filename extension ".so"  (like the
ROOT libraries from root.cern.ch). This works fine using Makefiles, also on Mac
OS. Using option -G Xcode however it does not work:
I use something like
target_link_libraries(myexe /full/path/to/somelib.so)
Running cake with -G Xcode prints a warning:
  "Target "myexe" links to item /full/path/to/somelib.so which is a full-path
but not a valid library file name."
When I run the build step in Xcode the linking step fails with ld: library not
found for -lsomelib.so.
What's going wrong here? I have this problem whenever I try to link a shared
library with .so filename extension and option -G Xcode.
 As a work around everything works fine when I use
LINK_DIRECTORIES( /full/path/to )
and add -lsomelib to the link flags of my exe. But this is an annoying
workaround because I'd like to use FIND_LIBRARY to search for the library and
FIND_LIBRARY returns /full/path/to/somelib.so. 
Cheers,Bjorn



                





-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to