cmake
cmake copied to clipboard
Add FindPrometheusCpp file for prometheus-cpp library
Related to https://github.com/zeek/zeek/pull/3701
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. 🙂