mirror of https://github.com/axmolengine/axmol.git
Linux: fix glfw3 searching
This commit is contained in:
parent
9b2a965485
commit
07c31bb4e1
|
@ -2,7 +2,7 @@
|
||||||
# FindChipmunk
|
# FindChipmunk
|
||||||
# ------------
|
# ------------
|
||||||
#
|
#
|
||||||
# Locate FindChipmunk library
|
# Locate Chipmunk library
|
||||||
#
|
#
|
||||||
# This module defines
|
# This module defines
|
||||||
#
|
#
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
#.rst:
|
||||||
|
# FindGLFW3
|
||||||
|
# ------------
|
||||||
|
#
|
||||||
|
# Locate glfw3 library
|
||||||
|
#
|
||||||
|
# This module defines
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# GLFW3_LIBRARIES, the library to link against
|
||||||
|
# GLFW3_FOUND, if false, do not try to link to FREETYPE
|
||||||
|
# GLFW3_INCLUDE_DIRS, where to find headers.
|
||||||
|
# This is the concatenation of the paths:
|
||||||
|
# GLFW3_INCLUDE_DIR
|
||||||
|
#
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2014-2014 Martell Malone
|
||||||
|
#
|
||||||
|
# Distributed under the OSI-approved BSD License (the "License");
|
||||||
|
# see accompanying file Copyright.txt for details.
|
||||||
|
#
|
||||||
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||||
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
# See the License for more information.
|
||||||
|
#=============================================================================
|
||||||
|
# (To distribute this file outside of CMake, substitute the full
|
||||||
|
# License text for the above reference.)
|
||||||
|
|
||||||
|
FIND_PATH(GLFW3_INCLUDE_DIR glfw3.h
|
||||||
|
HINTS
|
||||||
|
ENV GLFW3_DIR
|
||||||
|
PATH_SUFFIXES include/GLFW include
|
||||||
|
PATHS
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
/sw # Fink
|
||||||
|
/opt/local # DarwinPorts
|
||||||
|
/opt/csw # Blastwave
|
||||||
|
/opt
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(GLFW3_LIBRARY
|
||||||
|
NAMES glfw3 libglfw3
|
||||||
|
HINTS
|
||||||
|
ENV GLFW3_DIR
|
||||||
|
PATH_SUFFIXES lib
|
||||||
|
PATHS
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
/sw
|
||||||
|
/opt/local
|
||||||
|
/opt/csw
|
||||||
|
/opt
|
||||||
|
)
|
||||||
|
|
||||||
|
set(GLFW3_INCLUDE_DIRS "${GLFW3_INCLUDE_DIR}")
|
||||||
|
set(GLFW3_LIBRARIES "${GLFW3_LIBRARY}")
|
||||||
|
|
||||||
|
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set GLFW3_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW3 DEFAULT_MSG GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(GLFW3_INCLUDE_DIR GLFW3_LIBRARIES GLFW3_LIBRARY)
|
|
@ -2,7 +2,7 @@
|
||||||
# FindWebP
|
# FindWebP
|
||||||
# ------------
|
# ------------
|
||||||
#
|
#
|
||||||
# Locate FindChipmunk library
|
# Locate webp library
|
||||||
#
|
#
|
||||||
# This module defines
|
# This module defines
|
||||||
#
|
#
|
||||||
|
|
|
@ -95,6 +95,16 @@ if(MINGW)
|
||||||
|
|
||||||
else()
|
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
|
#todo: provide prebuild versions of minizip for android ios mac and msvc
|
||||||
#done: prebuilt version for mingw-w64 (linux distros should have them also)
|
#done: prebuilt version for mingw-w64 (linux distros should have them also)
|
||||||
# check for opensuse the buildbot system arch and ubuntu
|
# check for opensuse the buildbot system arch and ubuntu
|
||||||
|
@ -109,7 +119,6 @@ endif()
|
||||||
../external/xxhash
|
../external/xxhash
|
||||||
../external/xxtea)
|
../external/xxtea)
|
||||||
|
|
||||||
|
|
||||||
add_library(cocos2d ${BUILD_TYPE} ${COCOS_SRC})
|
add_library(cocos2d ${BUILD_TYPE} ${COCOS_SRC})
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue