编译png

$cmake .. -DPNG_STATIC=ON -DZLIB_INCLUDE_DIR=/home/u0u0/works/Cocos2d-thirdpart/tarballs/zlib-1.2.8/ -DZLIB_LIBRARY=/home/u0u0/works/Cocos2d-thirdpart/tarballs/zlib-1.2.8/

编译websockets

$cmake .. -DOPENSSL_ROOT_DIR=/home/u0u0/works/Cocos2d-thirdpart/tarballs/openssl-1.1.0c -DZLIB_INCLUDE_DIR=/home/u0u0/works/Cocos2d-thirdpart/tarballs/zlib-1.2.8/ -DZLIB_LIBRARY=/home/u0u0/works/Cocos2d-thirdpart/tarballs/zlib-1.2.8/ -DLWS_WITH_LIBUV=OFF -DLWS_WITH_SSL=ON -DLWS_WITH_SHARED=OFF -DLWS_WITHOUT_TEST_SERVER=ON -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON -DLWS_WITHOUT_TEST_PING=ON -DLWS_WITHOUT_TEST_ECHO=ON -DLWS_WITHOUT_TEST_CLIENT=ON -DLWS_WITHOUT_TEST_FRAGGLE=ON -DLWS_IPV6=ON

编译OpenSSL

在 Linux 下自定义OpenSSL库,需要安装到一个路径,以便curl能找到。

./config --prefix=/home/u0u0/works/projects/Cocos2d-thirdpart/tarballs/openssl_install --openssldir=/home/u0u0/works/projects/Cocos2d-thirdpart/tarballs/openssl_install
make
make install

编译curl

./configure --enable-static --disable-ldap --enable-ipv6 --with-zlib=/home/u0u0/works/Cocos2d-thirdpart/tarballs/zlib-1.2.8/ --with-ssl=/home/u0u0/works/projects/Cocos2d-thirdpart/tarballs/openssl_install --prefix=/home/u0u0/works/projects/Cocos2d-thirdpart/tarballs/curl_install
make
make install

编译OpenAL

$sudo apt-get install libasound2-dev
$cmake .. -DLIBTYPE=STATIC -DALSOFT_INSTALL=OFF -DALSOFT_REQUIRE_ALSA=ON

标签: ubuntu

添加新评论