Flashmq ignores CMAKE_INSTALL_PREFIX
When crosscompiling I specified the CMAKE_INSTALL_PREFIX on the command line cmake -DCMAKE_INSTALL_PREFIX=/opt/flashmq ../Flashmq make sudo make install
The install step installed as follows -- Install configuration: "" -- Up-to-date: /usr/bin/flashmq -- Up-to-date: /var/lib/flashmq -- Up-to-date: /var/log/flashmq -- Up-to-date: /etc/flashmq/flashmq.conf -- Up-to-date: /lib/systemd/system/flashmq.service -- Up-to-date: /usr/share/man/man5/flashmq.conf.5 -- Up-to-date: /usr/share/man/man1/flashmq.1
I'm looking into it, but the cmake CMAKE_INSTALL_PREFIX world is a treacherous one, apparently.
A problem is the systemd file, whose content needs to change for a different path.
Also, I'm not quite sure what to do with /etc, /var/log and /var/lib. Cmake has variables for them that put them in /usr/local, but using those dirs seems uncommon. The whole concept of 'local install' is dodgy anyway.
BTW, you're building a slow debug build.
Since I am crosscompiling my install scripts typically transform paths in the tarball to put the files in the "correct" place on the target system as opposed to having to change "default paths" of the services and configuration files. I'm not sure what other people that crosscompile do; so modifying the systemd files wasn't required.
have a look at https://cmake.org/cmake/help/latest/envvar/DESTDIR.html
or DESTDIR="/path/to/.." cmake --install
@halfgaar see https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html btw