diff --git a/build/install-deps-linux.sh b/build/install-deps-linux.sh index a875d9d854..184e1de14d 100755 --- a/build/install-deps-linux.sh +++ b/build/install-deps-linux.sh @@ -54,6 +54,4 @@ echo "Cocos uses GCC Version: `gcc --version`" echo "Cocos uses G++ Version: `g++ --version`" echo "Cocos uses ld Version: `ld --version`" echo "Cocos uses /usr/bin/ld Version: `/usr/bin/ld --version`" -# install glfw -../tools/travis-scripts/install_glfw.sh diff --git a/cmake/Modules/CocosUsePrebuiltLibs.cmake b/cmake/Modules/CocosUsePrebuiltLibs.cmake index 5763d7c45e..2a7e247f80 100644 --- a/cmake/Modules/CocosUsePrebuiltLibs.cmake +++ b/cmake/Modules/CocosUsePrebuiltLibs.cmake @@ -24,6 +24,9 @@ set(_Box2D_inc_paths include) set(_Box2D_libs box2d libbox2d) set(_Box2D_prefix Box2D) +set(_glfw3_inc glfw3.h glfw3native.h) +set(_glfw3_libs glfw3 libglfw3) + set(_curl_inc curl/curl.h) # order: curl, ssl, crypto set(_curl_libs curl libcurl_imp libcurl ssl libeay32 ssleay32 crypto) @@ -143,7 +146,7 @@ if(MSVC) endif() if(LINUX) - list(APPEND all_prebuilt_libs fmod) + list(APPEND all_prebuilt_libs fmod glfw3) endif() if(ANDROID) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index c06165a790..f3a6fdbfe8 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -151,7 +151,7 @@ foreach(pkg ZLIB MINIZIP JPEG PNG TIFF TinyXML2 FREETYPE WEBSOCKETS CURL OPENSSL endforeach() if(LINUX) - set(glfw_other_linker_flags X11) + set(glfw_other_linker_flags X11 Xi Xrandr Xxf86vm Xinerama Xcursor rt m) endif(LINUX) target_link_libraries(cocos2dInternal ${PLATFORM_SPECIFIC_LIBS} ${glfw_other_linker_flags}) diff --git a/external/config.json b/external/config.json index 59b93e21be..f756696529 100644 --- a/external/config.json +++ b/external/config.json @@ -1,5 +1,5 @@ { - "version": "v3-deps-137", + "version": "v3-deps-138", "zip_file_size": "136974507", "repo_name": "cocos2d-x-3rd-party-libs-bin", "repo_parent": "https://github.com/cocos2d/", diff --git a/tools/travis-scripts/install_glfw.sh b/tools/travis-scripts/install_glfw.sh deleted file mode 100755 index 6930ba2a4f..0000000000 --- a/tools/travis-scripts/install_glfw.sh +++ /dev/null @@ -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 -