]> granicus.if.org Git - graphviz/commit
common: CMake: specify include directory of expat
authorNehal J Wani <nehaljw.kkd1@gmail.com>
Mon, 15 Feb 2021 20:19:14 +0000 (15:19 -0500)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 1 Nov 2021 00:48:44 +0000 (17:48 -0700)
commitb53c3dda7bff02907a0daa8757f378237fff2a6e
tree0b3fb90a7afe0a2ca2425861fa67a7535387eb37
parent62a82b634291d82daca3f18f57d7b06f9646ed14
common: CMake: specify include directory of expat

A build system should not rely on the existence of 3rd party
library/header files in standard prefixes as one might want to compile
and link against a patched build or a custom install in some
non-standard location. This is also helpful for developers who rely on
package managers like Conda or Spack for their daily development.

If expat is a dep, we need to pass -I/path/containing/expat.h to the
compiler while compiling the source files of the target 'common_obj',
without which, one can face the following issue:

graphviz/lib/common/htmllex.c:28:10: fatal error: expat.h: No such file or directory
   28 | #include <expat.h>
      |          ^~~~~~~~~
compilation terminated.
lib/common/CMakeLists.txt