Brian, I had a question about this. 

In CMake, I typically call "find_library" before calling "target_link_library". I was wondering if there's a reason that you don't. 

On the ROS OSX install site, it asks the user to add these environment variables to .profile: 

export CPATH=/opt/local/include
export LIBRARY_PATH=/opt/local/lib

They are very important to add for ROS, but they sometimes seem to interfere with the installation of other packages. For example, I was getting some strange interference between installing OpenCV from SVN, and the macports version of libjpeg. More importantly, they do not seem helpful for my non-ros CMake projects. 

I am wondering now if the reason ROS requires special environment variables is that "find_library" is not being called.

Do you have any thoughts on this? 

--Nick 



On Thu, Jan 13, 2011 at 3:40 PM, Brian Gerkey <gerkey@willowgarage.com> wrote:
On Thu, Jan 13, 2011 at 1:07 PM, Jack O'Quin <jack.oquin@gmail.com> wrote:
> I could really use some help to fix defect #4659 in camera1394:
>
>  https://code.ros.org/trac/ros-pkg/ticket/4659
>
> Briefly, it seems we need to set OS-specific link flags to resolve the
> driver's reference to libdc1394.

I haven't tried it, but if I understand the problem, then something
like this should do it:

if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 target_link_libraries(camera1394_node dc1394 "-framework CoreServices")
else(CMAKE_SYSTEM_NAME MATCHES "Darwin")
 target_link_libraries(camera1394_node dc1394)
endif(CMAKE_SYSTEM_NAME MATCHES "Darwin")

       brian.
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users