summarylogtreecommitdiffstats
path: root/0001-Emit-the-correct-LIBNAME-to-.pc-files.patch
blob: 2d09e8b1f2ad0b235e730831ee64fd9dd79668ae (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
35
36
37
38
39
40
41
42
43
44
45
46
47
From d06589f55c87370d388dec333f4bff35c29762f3 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Fri, 8 Jan 2016 16:46:01 +0000
Subject: [PATCH] Emit the correct LIBNAME to .pc files

Irrespective of "FREEGLUT_REPLACE_GLUT" being set to "No" or being on
Win32 where this variable does not even exist, the .pc file contained
Libs: -L${libdir} -lglut

Instead, emit the correct value.
---
 freeglut/freeglut/CMakeLists.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt
index 71f4ef5..7fae09a 100644
--- a/freeglut/freeglut/CMakeLists.txt
+++ b/freeglut/freeglut/CMakeLists.txt
@@ -389,6 +389,7 @@ IF(FREEGLUT_BUILD_STATIC_LIBS)
 ENDIF()
 
 
+SET(LIBNAME freeglut)
 IF(WIN32)
     LIST(APPEND LIBS winmm)
     IF(FREEGLUT_BUILD_SHARED_LIBS)
@@ -424,8 +425,6 @@ ELSE()
     ELSE()
 		IF(FREEGLUT_REPLACE_GLUT)
 			SET(LIBNAME glut)
-		ELSE()
-			SET(LIBNAME freeglut)
 		ENDIF()
 	ENDIF()
 
@@ -563,7 +562,7 @@ ELSE()
 ENDIF()
 # Client applications need to define FreeGLUT GLES version to
 # bootstrap headers inclusion in freeglut_std.h:
-SET(PC_LIBNAME "glut")
+SET(PC_LIBNAME ${LIBNAME})
 SET(PC_FILENAME "freeglut.pc")
 IF(FREEGLUT_GLES)
   SET(PC_CFLAGS "-DFREEGLUT_GLES")
-- 
2.6.3