I am trying to install dolfinx v0.4.1 on a Ubuntu 20.04 machine. The PETSc that comes with apt-get is <3.15 and hence does not satisfy the requirements of dolfinx. I have a source installation of PETSc v3.17.4 on my machine to which I want to point CMake to, so that I can satisfy the version requirement. How can I do this? I tried to include the include/ directory from the source installation in the CMAKE_INCLUDE_PATH but this did not help. CMake still complains that PETSc is <3.15
Thanks for the comment and also the question from @nate .
Setting $PETSC_DIR did not work, and it wasnt really clear why. In the end I realized that installing everything from source on Ubuntu 20.04 is quite cumbersome, especially as C++20 is a requirement, so I took this as an excuse and upgraded to Ubuntu 22.04 and then installing fenicsx along with all dependencies via apt-get worked perfectly! Thank you for your help!