Normal Usage:
$ git clone --recursive https://github.com/changyy/nginx-cmake.git $ cd nginx-cmake $ mkdir build $ cd build $ cmake .. $ make $ ./nginx-out/sbin/nginx -p ./nginx-out/
Cross Compiler (Testing on ARM Device):
$ git clone --recursive https://github.com/changyy/nginx-cmake.git $ cd nginx-cmake $ mkdir build $ cd build $ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/toolchain-arm6.cmake ... CMake Error at CMakeLists.txt:14 (message): Please use -DREMOTE_DEVICE_SSH_LOGIN='account@remote_device_ip' again (need sshd & scp service) ... $ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/toolchain-arm6.cmake -DREMOTE_DEVICE_SSH_LOGIN='[email protected]' $ make $ scp -r ./nginx-out [email protected]:/tmp $ ssh [email protected] "/tmp/nginx-out/sbin/nginx -p /tmp/nginx-out/" (need to check the shared library used by sbin/nginx: readelf -a sbin/nginx | grep Shared)
Thanks for this sharing: Ali's blog: Cross-compile nginx 1.3.6 & YangAcer's help.