cmake -DLWS_WITHOUT_EXTENSIONS=ON -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_CLIENT=ON \
-DLWS_WITHOUT_TEST_ECHO=ON -DLWS_WITHOUT_TEST_FRAGGLE=ON -DLWS_WITHOUT_TEST_PING=ON \
-DLWS_WITHOUT_TEST_SERVER=ON -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON -DLWS_WITH_NO_LOGS=ON \
-DLWS_WITH_RANGES=OFF -DLWS_WITH_SHARED=OFF -DLWS_WITH_ZIP_FOPS=OFF -DLWS_WITH_ZLIB=OFF \
-DLWS_STATIC_PIC=ON -DLWS_WITH_SSL=ON \
-DLWS_OPENSSL_LIBRARIES="/home/jacob/Workspace/lib/openssl/lib/libssl.a;/home/jacob/Workspace/lib/openssl/lib/libcrypto.a" \
-DLWS_OPENSSL_INCLUDE_DIRS="/home/jacob/Workspace/lib/openssl/include" \
-DCMAKE_TOOLCHAIN_FILE="/home/jacob/Workspace/Github/libwebsockets/cross-compile-arm.cmake" ..

cross-compile-arm.cmake:

set(CROSS_PATH /your-toolchain-path/bin)
set(CMAKE_SYSTEM_NAME Ubuntu)
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_C_COMPILER "${CROSS_PATH}/arm-linux-gnueabihf-gcc")
set(CMAKE_CXX_COMPILER "${CROSS_PATH}/arm-linux-gnueabihf-g++")
set(CMAKE_C_FLAGS "-Wno-error")
set(CMAKE_FIND_ROOT_PATH "${CROSS_PATH}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

0 条评论

发表回复

您的电子邮箱地址不会被公开。