cmake icon indicating copy to clipboard operation
cmake copied to clipboard

Add FindPrometheusCpp file for prometheus-cpp library

Open timwoj opened this issue 10 months ago • 1 comments

Related to https://github.com/zeek/zeek/pull/3701

timwoj avatar Apr 25 '24 20:04 timwoj

I see a couple issues with this script:

The prometheus-cpp library installs CMake package files, so it is very confusing why there should be a find script for it at all. This would actually interfere with CMake's find_package if it weren't for the fact that this script "misspells" the library name. What's worse, it's name is Find..., but it doesn't try to find anything. The name obfuscates that this script actually adds sub-directories to the build with hard-coded paths. Due to the hard-coded paths, I don't think this is a good candidate for a re-usable script. This should probably just be a function in the main CMakeLists.txt in Zeek.

I've also outlined a re-usable way to integrate 3rd-party libraries in https://github.com/zeek/broker/pull/402#issuecomment-2096304049, which I'm happy to discuss as an alternative approach. 🙂

Neverlord avatar May 10 '24 14:05 Neverlord