The short answer to your best practices question is, for non-developers, don't build from source. Install from package instead.
I don't mean to sound discouraging, but iconnor & I build and maintain deb/rpm packages specifically so that people don't have to fill up the forum with basic "how do I build" questions. Here are the Ubuntu packages:
https://launchpad.net/~iconnor/+archive ... zoneminder
Ubuntu users can even run nightly builds if you like to stay on the bleeding edge of things.
If you really want to go down the build from source path, then here are some additional tips as you are getting off base with your build process:
- On any Linux machine, software built from source will install under "/usr/local" and software installed from package will have a prefix of "/usr". This is called the Prefix and will be chosen automatically for you. Don't override this. You will get yourself into trouble if you do.
- There are two methods to build ZoneMinder. The traditional method is autotools, and the newer method is cmake. You need to use one or the other; not both. You can't read documentation that applies to autotools and expect it to apply when using cmake. If the documentation mentions running "configure" or "bootstrap" (or really anything other than some form of “cmake .”) then that only applies to autotools. It won't work if you are using cmake.
- Google it! If you get an error message complaining about some file, then Google the file name. Googling videodev.h reveals that this header file is part of Video for Linux version 1 (v4l1). Newer versions of Ubuntu have migrated to v4l version 2 (v4l2).
You have not provided the output from your build process or the contents of your cmake cache file, so I can only guess here. My guess is that cache file you are using came from a system that had v4l1 and your new system no longer has that on it. You can try to dissect your cache file and edit the file appropriately. However, you are probably better off not using the cache file at all. Just run “cmake .” and let it autodetect your system.