Problem with Linking SDL when compiling ardrone_brown node
When attempting to compile the ardrone_brown node using "rosmake", I get errors indicating that the SDL library is not being linked as shown below.
Linking CXX executable ../bin/ardrone_driver /home/liang/brown-ros-pkg-read-only/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `thread_escaper': vp_stages_o_sdl.c:(.text+0x69): undefined reference to `SDL_PollEvent' /home/liang/brown-ros-pkg-read-only/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `vp_stages_output_sdl_stage_open': vp_stages_o_sdl.c:(.text+0xb7): undefined reference to `SDL_Init' /home/liang/brown-ros-pkg-read-only/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `vp_stages_output_sdl_stage_transform': vp_stages_o_sdl.c:(.text+0x1a8): undefined reference to `SDL_SetVideoMode' vp_stages_o_sdl.c:(.text+0x1b7): undefined reference to `SDL_ShowCursor' vp_stages_o_sdl.c:(.text+0x1d8): undefined reference to `SDL_CreateYUVOverlay' vp_stages_o_sdl.c:(.text+0x264): undefined reference to `SDL_LockYUVOverlay' vp_stages_o_sdl.c:(.text+0x404): undefined reference to `SDL_UnlockYUVOverlay' vp_stages_o_sdl.c:(.text+0x417): undefined reference to `SDL_DisplayYUVOverlay' /home/liang/brown-ros-pkg-read-only/experimental/ardrone_brown/lib/libsdk.a(vp_stages_o_sdl.o): In function `vp_stages_output_sdl_stage_close': vp_stages_o_sdl.c:(.text+0x52c): undefined reference to `SDL_ShowCursor' vp_stages_o_sdl.c:(.text+0x537): undefined reference to `SDL_FreeYUVOverlay' vp_stages_o_sdl.c:(.text+0x542): undefined reference to `SDL_FreeSurface' vp_stages_o_sdl.c:(.text+0x547): undefined reference to `SDL_Quit' collect2: ld returned 1 exit status
I'm using Ubuntu 12.04 and ROS Fuerte. libsdl1.2-dev is installed, linkable, and usable by other (non-ROS) programs. Looking in the CMakeLists.txt within the ardrone_brown node's root directory, the following line is at the very bottom, which I think tells the compiler to link SDL.
target_link_libraries(ardrone_driver vlib pc_ardrone SDL sdk)
Is there something I'm missing? Any ideas what could be wrong?