glfw: Update to 3.1

This commit is contained in:
Alexpux
2015-02-27 22:19:33 +03:00
parent d22c4d5524
commit 95cbf71910
3 changed files with 17 additions and 76 deletions

View File

@@ -1,69 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60f2302..d10f10d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -154,6 +154,9 @@ endif()
# Use Win32 for window creation
#--------------------------------------------------------------------
if (_GLFW_WIN32)
+
+ set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -lgdi32 -lwinmm")
+
# The DLL links against winmm; the static library loads it
# That way, both code paths receive testing
if (BUILD_SHARED_LIBS)
@@ -180,8 +183,12 @@ endif()
# Use WGL for context creation
#--------------------------------------------------------------------
if (_GLFW_WGL)
+
+ set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} -lopengl32")
+
list(APPEND glfw_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR})
list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY})
+
endif()
#--------------------------------------------------------------------
@@ -308,9 +315,7 @@ if (_GLFW_EGL)
list(APPEND glfw_INCLUDE_DIRS ${EGL_INCLUDE_DIR})
list(APPEND glfw_LIBRARIES ${EGL_LIBRARY})
- if (UNIX)
- set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl")
- endif()
+ set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} egl")
if (_GLFW_USE_OPENGL)
list(APPEND glfw_LIBRARIES ${OPENGL_gl_LIBRARY})
@@ -397,10 +402,8 @@ configure_file(${GLFW_SOURCE_DIR}/src/glfwConfig.cmake.in
configure_file(${GLFW_SOURCE_DIR}/src/glfwConfigVersion.cmake.in
${GLFW_BINARY_DIR}/src/glfwConfigVersion.cmake @ONLY)
-if (UNIX)
- configure_file(${GLFW_SOURCE_DIR}/src/glfw3.pc.in
- ${GLFW_BINARY_DIR}/src/glfw3.pc @ONLY)
-endif()
+configure_file(${GLFW_SOURCE_DIR}/src/glfw3.pc.in
+ ${GLFW_BINARY_DIR}/src/glfw3.pc @ONLY)
#--------------------------------------------------------------------
# Add subdirectories
@@ -431,11 +434,9 @@ if (GLFW_INSTALL)
${GLFW_BINARY_DIR}/src/glfwConfigVersion.cmake
DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
- if (UNIX)
- install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
- install(FILES ${GLFW_BINARY_DIR}/src/glfw3.pc
- DESTINATION lib${LIB_SUFFIX}/pkgconfig)
- endif()
+ install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
+ install(FILES ${GLFW_BINARY_DIR}/src/glfw3.pc
+ DESTINATION lib${LIB_SUFFIX}/pkgconfig)
# Only generate this target if no higher-level project already has
if (NOT TARGET uninstall)
--
2.0.3

View File

@@ -0,0 +1,11 @@
--- glfw-3.1/CMakeLists.txt.orig 2015-02-27 21:55:29.220000000 +0300
+++ glfw-3.1/CMakeLists.txt 2015-02-27 22:08:05.389600000 +0300
@@ -513,7 +513,7 @@
#--------------------------------------------------------------------
include(CMakePackageConfigHelpers)
-if (UNIX)
+if (UNIX OR MINGW)
set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake/glfw3/")
else()
set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/")

View File

@@ -1,10 +1,9 @@
# Maintainer: Martell Malone <martellmalone@gmail.com>
_realname=glfw
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=3.0.4
pkgrel=2
pkgver=3.1
pkgrel=1
pkgdesc="A free, open source, portable framework for OpenGL application development. (mingw-w64)"
arch=('any')
url="http://www.glfw.org/"
@@ -15,13 +14,13 @@ optdepends=()
conflicts=()
options=('staticlibs' 'strip')
source=(http://downloads.sourceforge.net/project/glfw/glfw/$pkgver/${_realname}-$pkgver.tar.gz
0001-enabled-pkg-config-file-generation-on-mingw.patch)
sha1sums=('9b04309418ccbc74b2115d11198b7912669814ee'
'1018e847e3bd3874662788c883bebb453d490267')
001-cmake-config-location.patch)
sha1sums=('32f2dcc188694fb5823e24cc65c8f69f32f58bb1'
'3c3f953929d9fcb4d7fbac931cad736889156ca1')
prepare() {
cd "${srcdir}/glfw-${pkgver}"
patch -p1 -i "${srcdir}/0001-enabled-pkg-config-file-generation-on-mingw.patch"
patch -p1 -i "${srcdir}/001-cmake-config-location.patch"
}
build() {