title: How can I add this shared library to my CMakeLists.txt?
body: <p>I read through nearly every library linking tutorial but none worked for my specific problem.  </p>
  
  <p>I have a folder called VSCOM_API_TEST with these files and folders in it:  </p>
  
  <p><code>
  VSCOM_API_TEST/CMakeLists.txt<br>
  VSCOM_API_TEST/include/vs_can_api.h<br>
  VSCOM_API_TEST/include/startup.h<br>
  VSCOM_API_TEST/lib/libvs_can_api.so<br>
  VSCOM_API_TEST/lib/libvs_can_api.a<br>
  VSCOM_API_TEST/src/startup.cpp
  </code></p>
  
  <p>startup is my executable where I want to include the library.  </p>
  
  <p>And I have the problem that my programme can't find the library functions:  </p>
  
  <p><code>CMakeFiles/startup.dir/src/startup.o: In function main:
    /home/max/fuerte_workspace/sandbox/VSCOM_API_TEST/src/startup.cpp:6: undefined reference to VSCAN_Open</code></p>
  
  <p><strong>CMakeLists.txt</strong>  </p>
  
  <pre><code>cmake_minimum_required(VERSION 2.4.6)
  include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
  
  
  rosbuild_init()
  
  #set the default path for built executables to the "bin" directory
  set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
  #set the default path for built libraries to the "lib" directory
  set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
  
  #common commands for building c++ executables and libraries
  rosbuild_add_library(${PROJECT_NAME} lib/libvs_can_api.a)
  SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE C)
  rosbuild_add_executable(startup src/startup.cpp)
  #target_link_libraries(startup ${PROJECT_NAME}) 
  </code></pre>
  
  <p><strong>startup.cpp</strong>  </p>
  
  <pre><code>// ROS includes
  #include &lt;ros/ros.h&gt;
  #include &lt;vs_can_api.h&gt;
  int main(int argc, char** argv)
  {
  VSCAN_HANDLE handle = VSCAN_Open("192.168.5.10:23", VSCAN_MODE_NORMAL);
  
  VSCAN_API_VERSION *version;
  VSCAN_STATUS status;
  VSCAN_HWPARAM *hwParams;
  
  // API Version
  status = VSCAN_Ioctl(handle, VSCAN_IOCTL_GET_API_VERSION, &amp;version);
  
  //HW Version
  status = VSCAN_Ioctl(handle, VSCAN_IOCTL_GET_HWPARAM, &amp;hwParams);
  
  
  }  
  </code></pre>
  
  <p>So how can I add a precompiled library?  </p>