[CMake] Re-2: .so libraries and Xcode
Michael Jackson
mike.jackson at bluequartz.net
Mon Mar 3 16:23:31 EST 2014
That part may not be correct.
it should be target_link_libraries(myexe somelib)
CMake will look for variations of the name for the library. I think. At least I have never had to put a full path like at and I use .plugin for my libraries in my project and they work fine on OS X with Xcode.
You should be using the "find_library()" function to find your library which gets assigned to a CMake variable. Then you end up with something like this:
FIND_LIBRARY(SOME_LIBRARY
NAMES somelib
PATHS /full/path/to/ )
target_link_libraries(myexe ${SOME_LIBRARY})
That really should work on Xcode without any issues.
Mike J.
On Mar 3, 2014, at 2:18 PM, Bjoern Sarrazin <bjoern at apoambach.de> wrote:
>> I use something like
>>
>> target_link_libraries(myexe /full/path/to/somelib.so)
More information about the CMake
mailing list