summaryrefslogtreecommitdiffstats
path: root/src/glfw3-1-fixes.patch
blob: 3112cdff02a1e3c76557426a5572e9c7591179f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
This file is part of MXE.
See index.html for further information.

Add option to install pkg-config file

--- a/CMakeLists.txt	2013-12-31 20:06:18.000000000 +0100
+++ b/CMakeLists.txt	2014-10-12 21:02:16.415982168 +0200
@@ -15,6 +15,7 @@
 option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
 option(GLFW_BUILD_DOCS "Build the GLFW documentation" 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)
@@ -392,7 +393,7 @@
 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()
@@ -428,6 +429,9 @@
 
     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()