It doesn't matter if the CMAKE_INSTALL_PREFIX is set explicitly by user,
the CMakeLists.txt:46 IF(NOT DEFINED USER_INSTALL_PREFIX) IF-ELSE conditional block will always exit before the ELSE clause, setting CMAKE_INSTALL_PREFIX to "/usr".
How is USER_INSTALL_PREFIX intended to work?
I've swapped the code between IF-ELSE clauses for now, it seems to work for me when setting CMAKE_INSTALL_PREFIX.
Yes, I just notice my build script, which includes an option
-DCMAKE_INSTALL_PREFIX=/pathis completely ignored...Have you tried adding an option
-DUSER_INSTALL_PREFIX=/some/path? This seems to work for me...But certainly agree it is a bit confusing...
This one is curious. I wonder why we have USER_INSTALL_PREFIX in CMakeLists.txt. If USER_INSTALL_PREFIX is not set explicitly set CMAKE_INSTALL_PREFIX to /usr. I removed this completly in 0.13.4...
Please test.
In 0.13.4, a quick Window compile test found I needed the following patch -
For some reason the
set ( EXTRA_FLAGS "-std=c++11" ), which should only apply toif (NOT WIN32)got moved outside theif (WIN32) ... else () here endif (), and clobbers other needed Windows onlyEXTRA_FLAGS...No time to investigate more now... but it would be great if it could be moved back into what is effectively an
if (NOT WIN32)zone... is this just a simplemovemistake?This was fixed in 874f10ac50e359f3a7d2868da8cc0571c01cfc51
a straight up -DCMAKE_INSTALL_PREFIX:PATH=/opt, correctly deploys on an Entware /opt partition, makefile:47 :
installing compiled package:
$ opkg install ./fgms_0.13.4-1_armv7soft.ipk
checking all files installed by package:
$ opkg files fgms
Package fgms (0.13.4-1) is installed on root and has the following files:
/opt/etc/fgms.conf
/opt/etc/init.d/S99fgms
/opt/sbin/fgms
Thank you. i think this is solved, using standard CMAKE_INSTALL_PREFIX works.
-DCMAKE_INSTALL_PREFIX. still not working in the master branch at least.
fixed in 0.13.7