ros/class_loader — pull request #8 by wjwwood (2013-06-17 22:50:11+00:00)
Title: Fix find Poco to return full lib path

On OS X, when building dependencies (Poco) into a location which is not on the lib path, I can get this:

```
==> Processing catkin package: 'class_loader'
==> Creating build directory: 'build_isolated/class_loader'
==> Building with env: '/opt/ros/groovy/env.sh'
==> cmake /Users/william/catkin_ws/src/class_loader -DCATKIN_DEVEL_PREFIX=/Users/william/catkin_ws/devel_isolated/class_loader -DCMAKE_INSTALL_PREFIX=/opt/ros/groovy in '/Users/william/catkin_ws/build_isolated/class_loader'
-- The C compiler identification is Clang 4.2.0
-- The CXX compiler identification is Clang 4.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Searching for Poco library...
-- Found Poco!
-- components found: Foundation.
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- thread
-- Using CATKIN_DEVEL_PREFIX: /Users/william/catkin_ws/devel_isolated/class_loader
-- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
-- This workspace overlays: /opt/ros/groovy
-- Found PythonInterp: /usr/bin/python (found version "2.7.2")
-- Found PY_em: /opt/ros/groovy/lib/python2.7/site-packages/em.pyc
-- Found gtest: gtests will be built
-- Using CATKIN_TEST_RESULTS_DIR: /Users/william/catkin_ws/build_isolated/class_loader/test_results
-- catkin 0.5.66
-- Boost version: 1.53.0
-- Found the following Boost libraries:
-- thread
-- Checking to see if CXX compiler accepts flag -Wl,--version-script,"/Users/william/catkin_ws/build_isolated/class_loader/test/class_loader_hide_library_symbols__class_loader_TestPlugins1.script"
-- Checking to see if CXX compiler accepts flag -Wl,--version-script,"/Users/william/catkin_ws/build_isolated/class_loader/test/class_loader_hide_library_symbols__class_loader_TestPlugins1.script" - no
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/william/catkin_ws/build_isolated/class_loader
==> make -j4 -l4 in '/Users/william/catkin_ws/build_isolated/class_loader'
Scanning dependencies of target class_loader
[ 25%] [ 50%] [ 75%] Building CXX object CMakeFiles/class_loader.dir/src/meta_object.cpp.o
Building CXX object CMakeFiles/class_loader.dir/src/class_loader_core.cpp.o
[100%] Building CXX object CMakeFiles/class_loader.dir/src/class_loader.cpp.o
Building CXX object CMakeFiles/class_loader.dir/src/multi_library_class_loader.cpp.o
Linking CXX shared library /Users/william/catkin_ws/devel_isolated/class_loader/lib/libclass_loader.dylib
ld: library not found for -lPocoFoundation
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/william/catkin_ws/devel_isolated/class_loader/lib/libclass_loader.dylib] Error 1
make[1]: *** [CMakeFiles/class_loader.dir/all] Error 2
make: *** [all] Error 2
```

It is passing `-LPocoFoundation`, to the linker, so in that case you would also need to pass the `-L/path/containing/that/lib`, OR you can do what this pull request does and just pass the full path to the library, which is better form I think.