pkg_check_modules does not parse the pkg-config -cflags correctly when there is preprocessor
In scenario when the foo.pc
file looks like the following,
Name: foo
Version: 1.0.0
Libs: -lfoo
Cflags: -IFoo/includes -DSPECIFICATION=" ABCD4 "
The pkg-config --cflags foo
command gives the following,
-DSPECIFICATION=\ ABCD4 -IFoo/includes
But when used with pkg_check_modules(FOO foo), it gets,
FOO_CFLAGS_OTHER = -D;SPECIFICATION=;ABCD4
And it becomes ,
/usr/bin/c++ -IFoo/Inc -D SPECIFICATION= ABCD4 -o xxxfoo.cc.o -c foo.cc
And finally the compiler cannot find the file named ABCD4.