Add this flag to your CMAKE_EXE_LINKER_FLAGS:
-search_paths_first
This did the trick, but I had to pass it to the linker explicitly since
g++ was used for link invocation:
-Wl,-search_paths_first
That will fix the problem on the Mac, I think I am going to make this a
default flag on the Mac since the -l stuff does not work correctly
without it.
-Bill
This would be much appreciated. It's would be nice if you could make
the linker to a breadth first search for libraries instead of depth
first mirroring other unix like environments.
This brings up a different issue of how the Mac will always pick up the
shared library if it finds both a shared and a static. If I specify a
static library via ccmake, it would be nice that the full library path
(/path/liblibrary.a instead of -L/path -llibrary) would be specified on
the command line to make sure the desired library is used. This could
be the case for when specifying a static versions of the library for
example.
James
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake