I was using Homebrew on MacOSX, so I went ahead and installed the dependencies like so:
shell brew install glog brew install gflag Now, I wanted to add include path and link path for these libs in the project.
My first shot was to add a
CXXFLAGS variable and expected that
cmake would pick it up.
export CXXFLAGS="-I/usr/local/Cellar/glog/0.3.4/include -I/usr/local/Cellar/gflags/2.1.2/include/"
cmake did not pick up this because it never used CFLAGS or CXXFLAGS.
Next, I added the dependency manually in the
CMakeLists.txt file using the
link_directories like so:
This approach was not scalable. I searched for a bit and found an acceptable solution. I added
in the include and the link path respectively.
This works! I am of the opinion that we can do better, but as of now I am okay with this.