Does anyone here know CMake?

@scnorth, I hacked in the changes you described in the “macos-cmake” branch of my fork of Graphviz if you want to give it a try: Files · macos-cmake · Matthew Fernandez / graphviz · GitLab. As I mentioned, I don’t have a macOS dev environment so I did this blind. It doesn’t seem to break anything under Linux though.

I noticed a few odd things and clues along the way:

  • libcommon is built as a static library while some of the others are built as shared libraries (STATIC vs SHARED in their add_library directives). Maybe this has an impact?
  • libcommon’s CMakeLists.txt does some unorthodox rewriting of the outputs htmlparse.c and htmlparse.h. I don’t even understand how this works, as it misspells “uint64_t” as “uint_64_t”… Maybe this never actually gets called, as it looks like it creates duplicate makefile targets.
  • cmake/generate_color_lib.cmake.in writes two files, color_lib-temp and color_lib-sort, whose only purpose seems to be intermediate outputs for debugging inspection.