[CMake] problem with CMake not including library's path (with pkg-config)

Francesco Abbate francesco.bbt at gmail.com
Fri May 25 12:53:43 EDT 2018


Hi,

thank you for the help.

As suggested by Andreas, AGG_LDFLAGS does what I think should be done
and it works for me.

As for the IMPORTED_TARGET approach, I still need to explicitly call
target_include_directories() and in addition the options given to the
linker with PkgConfig::AGG seems to be wrong. I am quite inclined to
forgot about this IMPORTED_TARGET approach, I prefer to use the more
simple approach that works.

If I can suggest something to the cmake developers: please make a more
extensive introduction by covering more common cases. For example the
standard cmake introduction does not mention how to find and use with
an external library. I had to use google and stackoverflow to find the
bit of information I needed. just my two cents.

Kind regards
Francesco


More information about the CMake mailing list