pkg_search_module lets us know if ompi-cxx was found. MpidotH is never used.
This is an initial pass, simply moving the existing logic as-is. Future PR's will attempt to refactor and improve the cmake stuff.