环境:ubuntu 14.04
目标:arm板
交叉编译器:arm-poky-linux-gnueabi-gcc 5.3.0
版本:libwebsockets-3.1.0,下载地址:https://github.com/warmcat/libwebsockets/releases
# 解压后cd libwebsockets-3.1.0/# 新建文件夹mkdir buildcd build# 设置编译器,我这里时候直接加载脚本设置source /opt/fsl-imx-fb/qt5/environment-setup-cortexa9hf-neon-poky-linux-gnueabi# 配置生成MakeFilecmake ../ -DCMAKE_INSTALL_PREFIX=/home/用户名/arm/libwebsockets -DCMAKE_SYSTEM_NAME=Linux -DLWS_OPENSSL_INCLUDE_DIRS=/opt/fsl-imx-fb/qt5/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include/ -DLWS_OPENSSL_LIBRARIES="-L/opt/fsl-imx-fb/qt5/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib -lssl -lcrypto"# 编译并安装makemake install
参考:
https://blog.csdn.net/lx121451/article/details/78717366