summaryrefslogtreecommitdiffstats
path: root/src/glfw3-1-fixes.patch
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2013-11-10 06:04:48 (GMT)
committerTony Theodore <tonyt@logyst.com>2013-11-10 06:04:48 (GMT)
commit026521cef1a347bd65406f7c37a3f6a88e40bc77 (patch)
tree845c5bbf3729d40170052e8cb237c231f9e1aefb /src/glfw3-1-fixes.patch
parent9c97a3932237b993f3b88dc900099d108d1fd4f8 (diff)
downloadmxe-026521cef1a347bd65406f7c37a3f6a88e40bc77.zip
mxe-026521cef1a347bd65406f7c37a3f6a88e40bc77.tar.gz
mxe-026521cef1a347bd65406f7c37a3f6a88e40bc77.tar.bz2
add package glfw3
Diffstat (limited to 'src/glfw3-1-fixes.patch')
-rw-r--r--src/glfw3-1-fixes.patch108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/glfw3-1-fixes.patch b/src/glfw3-1-fixes.patch
new file mode 100644
index 0000000..969adb7
--- /dev/null
+++ b/src/glfw3-1-fixes.patch
@@ -0,0 +1,108 @@
+This file is part of MXE.
+See index.html for further information.
+
+Contains ad hoc patches for cross building.
+
+From 7106d77856268c39b08de8cbe6f526fda8506389 Mon Sep 17 00:00:00 2001
+From: MXE
+Date: Sun, 10 Nov 2013 16:23:03 +1100
+Subject: [PATCH] add option to install pkg-config file
+
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7c9b2c2..cd0112c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -14,6 +14,7 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
+ option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
+ option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
+ option(GLFW_INSTALL "Generate installation target" ON)
++option(GLFW_INSTALL_PKG_CONFIG "Install pkg-config file" OFF)
+ option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
+
+ if (WIN32)
+@@ -117,7 +118,7 @@ endif()
+ #--------------------------------------------------------------------
+ if (WIN32)
+ set(_GLFW_WIN32 1)
+- message(STATUS "Using Win32 for window creation")
++ message(STATUS "Using Win32 for window creation")
+
+ if (GLFW_USE_EGL)
+ set(_GLFW_EGL 1)
+@@ -133,7 +134,7 @@ elseif (APPLE)
+ message(STATUS "Using NSGL for context creation")
+ elseif (UNIX)
+ set(_GLFW_X11 1)
+- message(STATUS "Using X11 for window creation")
++ message(STATUS "Using X11 for window creation")
+
+ if (GLFW_USE_EGL)
+ set(_GLFW_EGL 1)
+@@ -238,7 +239,7 @@ if (_GLFW_X11)
+ # Check for Xkb (X keyboard extension)
+ if (NOT X11_Xkb_FOUND)
+ message(FATAL_ERROR "The X keyboard extension headers were not found")
+- endif()
++ endif()
+
+ list(APPEND glfw_INCLUDE_DIR ${X11_Xkb_INCLUDE_PATH})
+
+@@ -336,7 +337,7 @@ endif()
+ # Use Cocoa for window creation and NSOpenGL for context creation
+ #--------------------------------------------------------------------
+ if (_GLFW_COCOA AND _GLFW_NSGL)
+-
++
+ if (GLFW_USE_MENUBAR)
+ set(_GLFW_USE_MENUBAR 1)
+ endif()
+@@ -351,7 +352,7 @@ if (_GLFW_COCOA AND _GLFW_NSGL)
+ else()
+ message(STATUS "Building GLFW only for the native architecture")
+ endif()
+-
++
+ # Set up library and include paths
+ find_library(COCOA_FRAMEWORK Cocoa)
+ find_library(IOKIT_FRAMEWORK IOKit)
+@@ -386,7 +387,7 @@ endif()
+ configure_file(${GLFW_SOURCE_DIR}/docs/Doxyfile.in
+ ${GLFW_BINARY_DIR}/docs/Doxyfile @ONLY)
+
+-configure_file(${GLFW_SOURCE_DIR}/src/config.h.in
++configure_file(${GLFW_SOURCE_DIR}/src/config.h.in
+ ${GLFW_BINARY_DIR}/src/config.h @ONLY)
+
+ configure_file(${GLFW_SOURCE_DIR}/src/glfwConfig.cmake.in
+@@ -395,7 +396,7 @@ 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)
++if (UNIX OR GLFW_INSTALL_PKG_CONFIG)
+ configure_file(${GLFW_SOURCE_DIR}/src/glfw3.pc.in
+ ${GLFW_BINARY_DIR}/src/glfw3.pc @ONLY)
+ endif()
+@@ -422,7 +423,7 @@ endif()
+ # The library is installed by src/CMakeLists.txt
+ #--------------------------------------------------------------------
+ if (GLFW_INSTALL)
+- install(DIRECTORY include/GLFW DESTINATION include
++ install(DIRECTORY include/GLFW DESTINATION include
+ FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h)
+
+ install(FILES ${GLFW_BINARY_DIR}/src/glfwConfig.cmake
+@@ -431,6 +432,9 @@ if (GLFW_INSTALL)
+
+ if (UNIX)
+ install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
++ endif()
++
++ if (UNIX OR GLFW_INSTALL_PKG_CONFIG)
+ install(FILES ${GLFW_BINARY_DIR}/src/glfw3.pc
+ DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+ endif()
+--
+1.8.4
+