Any way to avoid installation into /usr/local?

Forum for questions and support relating to the 1.28.x releases only.
Locked
lembark
Posts: 2
Joined: Fri Dec 25, 2015 10:52 am

Any way to avoid installation into /usr/local?

Post by lembark »

Which doesn't exist on this system, linux uses "/opt".

Looking through the Installation guide it seemed to indicate that the prefix could be set:
Configuration can be done in 4 ways:
1) As a command line parameter, e.g. cmake -DCMAKE_VERBOSE_MAKEFILE=ON .

CMAKE_INSTALL_PREFIX - Use this to change the prefix (default /usr/local). This option behaves like --prefix from autoconf. Package maintainers will probably want to set this to "/usr".
Which seem to indicate that using:

Code: Select all

cmake -DCMAKE_INSTALL_PREFIX=/opt/ZoneMinder
Would attempt to make the install into /opt/ZoneMinder.
Catch: make keeps blowing up after not being able to access /usr/local, which makes sense since I need this installed into /opt/ZoneMinder.

Q: Is there any way to have CMAKE actually use the install prefix?
mikb
Posts: 678
Joined: Mon Mar 25, 2013 12:34 pm

Re: Any way to avoid installation into /usr/local?

Post by mikb »

Not sure on the the CMAKE thing, but Linux uses /opt, or /usr/local (depending on your distribution) -- or both. It's up to you though, the whole point of being in control of your own OS is that *you* can make these choices -- I've got most user-added stuff in /usr/local, but OpenOffice went into /opt. Whatever ... both work!

You could always make a symbolic link from /usr/local/wherever-it-ends-up to /opt/ZoneMinder, if you can't beat it into submission :)
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Any way to avoid installation into /usr/local?

Post by knight-of-ni »

You are missing the period "." at the end of your cmake command. It is required and the build will certainly not go as expected if it is missing.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
mikb
Posts: 678
Joined: Mon Mar 25, 2013 12:34 pm

Re: Any way to avoid installation into /usr/local?

Post by mikb »

"For the want of a dot, the compilation was lost" :)
Locked