title: Undefined symbols: "boost::system::generic_category()" Cmake and boost setup
body: <p>Let me setup the problem real quick.  I have a library "serial" that depends on boost and it is setup in cmake and I have a Findserial.cmake that gets installed to help my second library "xbow_400" find it. This is all fine until I try to compile "test_xbow_400" that links to "xbow_400", at which point I get this linking error:</p>
  
  <pre><code>Undefined symbols:
    "boost::system::generic_category()", referenced from:
        __static_initialization_and_destruction_0(int, int)in test_xbow_400.o
        __static_initialization_and_destruction_0(int, int)in test_xbow_400.o
        __static_initialization_and_destruction_0(int, int)in libxbow_400.a(xbow_400.o)
        __static_initialization_and_destruction_0(int, int)in libxbow_400.a(xbow_400.o)
        __static_initialization_and_destruction_0(int, int)in libserial.a(serial.o)
        __static_initialization_and_destruction_0(int, int)in libserial.a(serial.o)
    "boost::system::system_category()", referenced from:
        boost::asio::error::get_system_category()    in test_xbow_400.o
        __static_initialization_and_destruction_0(int, int)in test_xbow_400.o
        boost::asio::error::get_system_category()    in libxbow_400.a(xbow_400.o)
        __static_initialization_and_destruction_0(int, int)in libxbow_400.a(xbow_400.o)
        boost::asio::error::get_system_category()    in libserial.a(serial.o)
        boost::system::error_code::error_code()in libserial.a(serial.o)
        __static_initialization_and_destruction_0(int, int)in libserial.a(serial.o)
  ld: symbol(s) not found
  </code></pre>
  
  <p>Now, I can fix this problem by adding these lines to my CMakeLists.txt file for "xbow_400":</p>
  
  <pre><code>+ # Find Boost
  + find_package(Boost COMPONENTS system filesystem thread REQUIRED)
  + 
  + link_directories(${Boost_LIBRARY_DIRS})
  + include_directories(${Boost_INCLUDE_DIRS})
  
    # Compile the xbow_400 Library
    add_library(xbow_400 src/xbow_400.cpp include/xbow_400.h)
  - target_link_libraries(xbow_400 ${serial_LIBRARIES})
  + target_link_libraries(xbow_400 ${serial_LIBRARIES} ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY})
  </code></pre>
  
  <p>BUT, I would like to have xbow_400 use serial WITHOUT having to specifically having to find boost and link to it.  (The xbow_400 code does not include or use boost directly, only via the serial library).</p>
  
  <p>Is this possible?  And if so should I add things to Findserial.cmake or should I change the way I build serial?</p>
  
  <p>Serial library: <a href="https://github.com/wjwwood/serial" rel="nofollow">https://github.com/wjwwood/serial</a>
  xbow_400: <a href="https://github.com/wjwwood/Crossbow-IMU400CC-100" rel="nofollow">https://github.com/wjwwood/Crossbow-IMU400CC-100</a></p>
  
  <p>I am on OS X 10.6.6.  I have not tried this on Linux or Windows yet.</p>