I get it if someone who has used zoneminder for a while wants to build from source, but I do want to discourage new users from even thinking about building from source.
I don't recommend anyone build from source because there are less error-prone ways to do it. I don't even build from source. It's too easy to not set one of the many, many cmake flags correctly, and when one reports a problem in the forum, we have no idea how you built it, so our ability to troubleshoot is limited.
Instead, we recommend you follow our documentation to build your own zoneminder package:
http://zoneminder.readthedocs.io/en/lat ... rom-source
By doing it this way, you are following a path known to work, and your resulting zoneminder will be built exactly the way everyone else's zoneminder is built.
The instructions linked above work for both debian and ubuntu.
Alternatively, if you are willing to use Fedora instead of Raspbain, you can get the latest 1.30.4 release for armv7 from RPMFusion
https://rpmfusion.org/
You can get 1.31.1 nightly builds for armv7 from zmrepo:
http://zmrepo.zoneminder.com/