update glfw to 3.2.1 (#18434)

This commit is contained in:
minggo 2017-11-02 15:25:12 +08:00 committed by GitHub
parent 8e2ad2fd12
commit 56baabfe50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 58 deletions

View File

@ -54,6 +54,4 @@ echo "Cocos uses GCC Version: `gcc --version`"
echo "Cocos uses G++ Version: `g++ --version`" echo "Cocos uses G++ Version: `g++ --version`"
echo "Cocos uses ld Version: `ld --version`" echo "Cocos uses ld Version: `ld --version`"
echo "Cocos uses /usr/bin/ld Version: `/usr/bin/ld --version`" echo "Cocos uses /usr/bin/ld Version: `/usr/bin/ld --version`"
# install glfw
../tools/travis-scripts/install_glfw.sh

View File

@ -24,6 +24,9 @@ set(_Box2D_inc_paths include)
set(_Box2D_libs box2d libbox2d) set(_Box2D_libs box2d libbox2d)
set(_Box2D_prefix Box2D) set(_Box2D_prefix Box2D)
set(_glfw3_inc glfw3.h glfw3native.h)
set(_glfw3_libs glfw3 libglfw3)
set(_curl_inc curl/curl.h) set(_curl_inc curl/curl.h)
# order: curl, ssl, crypto # order: curl, ssl, crypto
set(_curl_libs curl libcurl_imp libcurl ssl libeay32 ssleay32 crypto) set(_curl_libs curl libcurl_imp libcurl ssl libeay32 ssleay32 crypto)
@ -143,7 +146,7 @@ if(MSVC)
endif() endif()
if(LINUX) if(LINUX)
list(APPEND all_prebuilt_libs fmod) list(APPEND all_prebuilt_libs fmod glfw3)
endif() endif()
if(ANDROID) if(ANDROID)

View File

@ -151,7 +151,7 @@ foreach(pkg ZLIB MINIZIP JPEG PNG TIFF TinyXML2 FREETYPE WEBSOCKETS CURL OPENSSL
endforeach() endforeach()
if(LINUX) if(LINUX)
set(glfw_other_linker_flags X11) set(glfw_other_linker_flags X11 Xi Xrandr Xxf86vm Xinerama Xcursor rt m)
endif(LINUX) endif(LINUX)
target_link_libraries(cocos2dInternal ${PLATFORM_SPECIFIC_LIBS} ${glfw_other_linker_flags}) target_link_libraries(cocos2dInternal ${PLATFORM_SPECIFIC_LIBS} ${glfw_other_linker_flags})

View File

@ -1,5 +1,5 @@
{ {
"version": "v3-deps-137", "version": "v3-deps-138",
"zip_file_size": "136974507", "zip_file_size": "136974507",
"repo_name": "cocos2d-x-3rd-party-libs-bin", "repo_name": "cocos2d-x-3rd-party-libs-bin",
"repo_parent": "https://github.com/cocos2d/", "repo_parent": "https://github.com/cocos2d/",

View File

@ -1,53 +0,0 @@
#!/bin/bash
GLFW_VERSION="3.2"
GLFW_SOURCE="https://github.com/glfw/glfw/releases/download/${GLFW_VERSION}/glfw-${GLFW_VERSION}.zip"
GLFW_ZIP="glfw-${GLFW_VERSION}.zip"
GLFW_INSTALL="glfw_install"
GLFW_SRCDIR="glfw-${GLFW_VERSION}"
GLFW_DESTDIR="glfw_dest"
install_glfw_dep()
{
sudo apt-get install xorg-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install cmake
sudo apt-get install wget
}
clean_tmp_file()
{
rm -rf ${GLFW_INSTALL}
}
make_and_install()
{
mkdir $GLFW_DESTDIR
cd $GLFW_DESTDIR
cmake "../${GLFW_SRCDIR}" -G "Unix Makefiles" -DBUILD_SHARED_LIBS=ON
make
sudo make install
sudo ldconfig
cd ..
}
install_glfw()
{
echo glw_version ${GLFW_VERSION}
echo glfw_download_size ${GLFW_SOURCE}
echo glfw_zip_file ${GLFW_ZIP}
install_glfw_dep
mkdir $GLFW_INSTALL
cd $GLFW_INSTALL
wget --passive -c -p -O $GLFW_ZIP $GLFW_SOURCE
unzip ${GLFW_ZIP} > /dev/null
make_and_install
cd ..
clean_tmp_file
}
#try to remove glfw3
sudo apt-get purge libglfw3 libglfw3-dev
install_glfw