Passing LDFLAGS and CPPFLAGS to catkin_make
I want to use rosbridge on Mac OS X, which depends on rosauth, which in turn depends on libssl-dev
I've installed openssl
on OS X via Homebrew, but it's keg-only since Apple uses its own libraries.
Therefore, compilation of rosauth
fails with:
[ 99%] Building CXX object rosauth/CMakeFiles/ros_mac_authentication_test.dir/test/ros_mac_authentication_test.cpp.o
[ 99%] Building CXX object rosauth/CMakeFiles/ros_mac_authentication.dir/src/ros_mac_authentication.cpp.o
/Users/smaniato/Cornell/Research/Projects/behaviors_ws/src/rosauth/src/ros_mac_authentication.cpp:15:10: fatal error: 'openssl/sha.h' file not found
#include <openssl/sha.h>
Homebrew says that I have to manually add the following build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
How do I pass those to catkin_make
? I tried the following but it didn't work:
catkin_make -D LDFLAGS=-L/usr/local/opt/openssl/lib CPPFLAGS=-I/usr/local/opt/openssl/include
I'm also OK with modifying CMakeLists.txt
, since I'm building from source. Thanks!