Using catkin to install pre-made libraries
I am looking to use catkin to hep package some libraries that a project needs. The idea was to have them structured in the following manner:
catkin_library
|
+-- lib (contains .so files )
+-- include ( contains header files )
+-- CMakeLists.txt (has catkin_package() and install() )
+-- package.xml ( list all dependencies )
I am able to get the header files installed thanks to an answer provided here: ROS Question the problem is that it cannot find the libraries I want to link against. Here is an example of a CMakeLists.txt that I am currently using:
cmake_minimum_required( VERSION 2.8.3 )
project( project_lib )
catkin_package( INCLUDE_DIRS include
DEPENDS ProjectLib )
install( DIRECTORY include
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} )
install( FILES lib/ProjectLib.so
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} )
I am not sure how to get the catkin_make process to find and link against the libraries or if this is even a smart way of doing this. I want to provide a workspace that allows the user just to run catkin_make and have it build and install based on the the provided catkin_package and catkin library packages. The idea for how the workspace would look is like this:
project_ws
+ devel
+ build
+ install
+ src
+ project (metapakcage)
+ project_exe (catkin ros package)
+ project_msgs ( ros msgs and services )
+ project_libraries (metapackage)
+ project_libraries (metapackage)
+ project_lib_1 ( external pre-built library )
+ project_lib_2 ( external pre-built library )