I'm trying to build a CMake project with a customed arm-linux-..g++ compiler. This project is using some third-party library (libzmq for the manner of sake). Now the problem is that when I install libzmq, it puts the header file in /usr/include, but my compiler doesn't search for .h files there.
I tried the following:
find_package(PkgConfig)
pkg_check_modules(LIBZMQ REQUIRED libzmq)
// Now I have a variable ${LIBZMQ_INCLUDEDIR} populated with /usr/include - checked it
include_directories(
${LIBZMQ_INCLUDEDIR}
)
...
The problem is, that CMake won't add the /usr/include path to the list of -I.. in the flags.make, I guess it's because CMake assumes that this path is in the search path of the compiler anyway.
How do I deal with this?