Ok. I found the solution. Besides libnop, it was also failing to find nlohmann_json and XLink. For some reason, CMake had lost track of where the config files for the dependencies were installed. By default it seems to expect them in /usr/lib/cmake. I had installed them in <source folder>/build/install and added all the relevant paths to CMAKE_PREFIX_PATH. Despite this, CMake was not finding them, so I sudo-copied them all from <source folder>/build/install/lib/cmake/depthai/dependencies/lib to /usr/lib/cmake. Then I was able to cmake my project again successfully.