diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dcc5cad89..10bb125c75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,6 +164,14 @@ include_directories( ) +if(LINUX) + + find_package(GLFW3 REQUIRED) + message( STATUS "GLFW3 dirs: ${GLFW3_INCLUDE_DIRS}") + include_directories(${GLFW3_INCLUDE_DIRS}) + +endif(LINUX) + if(NOT MINGW) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 370570497c..1be8fb4abd 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -95,16 +95,6 @@ if(MINGW) else() - if(LINUX) - - find_package(GLFW3 REQUIRED) - message( STATUS "GLFW3 dirs: ${GLFW3_INCLUDE_DIRS}") - include_directories(${GLFW3_INCLUDE_DIRS}) - - endif(LINUX) - - - #todo: provide prebuild versions of minizip for android ios mac and msvc #done: prebuilt version for mingw-w64 (linux distros should have them also) # check for opensuse the buildbot system arch and ubuntu @@ -119,6 +109,7 @@ endif() ../external/xxhash ../external/xxtea) + add_library(cocos2d ${BUILD_TYPE} ${COCOS_SRC})