|
|
|
@ -3,58 +3,55 @@ See index.html for further information.
|
|
|
|
|
|
|
|
|
|
Contains ad hoc patches for cross building.
|
|
|
|
|
|
|
|
|
|
From dc54ddf47055db70aeb19c618a70bd5448cff836 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: Mark Brand <mabrand@mabrand.nl>
|
|
|
|
|
Date: Thu, 11 Apr 2013 08:50:44 +0200
|
|
|
|
|
Subject: [PATCH] add pkg-config support
|
|
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: Boris Pek <tehnick-8@yandex.ru>
|
|
|
|
|
Date: Sat, 18 Jun 2016 16:24:52 +0300
|
|
|
|
|
Subject: [PATCH] Back compatibility with older freeglut packages in MXE
|
|
|
|
|
|
|
|
|
|
based on
|
|
|
|
|
http://old.nabble.com/-PATCH--Add-pkgconfig-file-td23312302.html
|
|
|
|
|
|
|
|
|
|
proposed to upstream
|
|
|
|
|
https://sourceforge.net/tracker/?func=detail&aid=3511842&group_id=1032&atid=101032
|
|
|
|
|
|
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
|
|
|
index 39c5628..b504bc6 100644
|
|
|
|
|
--- a/Makefile.am
|
|
|
|
|
+++ b/Makefile.am
|
|
|
|
|
@@ -68,3 +68,6 @@ dist-hook:
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
|
index 1111111..2222222 100644
|
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
|
@@ -11,7 +11,7 @@ INCLUDE(GNUInstallDirs)
|
|
|
|
|
# CMAKE_ARCHIVE_OUTPUT_DIRECTORY instead.
|
|
|
|
|
# Static libraries end up in CMAKE_ARCHIVE_OUTPUT_DIRECTORY on all
|
|
|
|
|
# platforms.
|
|
|
|
|
-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
|
|
|
|
+SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
|
|
|
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
|
|
|
|
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
|
|
libtool: $(LIBTOOL_DEPS)
|
|
|
|
|
$(SHELL) ./config.status --recheck
|
|
|
|
|
+
|
|
|
|
|
+pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
|
+pkgconfig_DATA = glut.pc
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
|
|
|
index 4f194d9..71e696d 100644
|
|
|
|
|
--- a/configure.ac
|
|
|
|
|
+++ b/configure.ac
|
|
|
|
|
@@ -125,5 +125,6 @@ AC_CONFIG_FILES([
|
|
|
|
|
progs/demos/spaceball/Makefile
|
|
|
|
|
progs/demos/subwin/Makefile
|
|
|
|
|
src/Makefile
|
|
|
|
|
+ glut.pc
|
|
|
|
|
])
|
|
|
|
|
AC_OUTPUT
|
|
|
|
|
diff --git a/glut.pc.in b/glut.pc.in
|
|
|
|
|
new file mode 100644
|
|
|
|
|
index 0000000..ea57c4a
|
|
|
|
|
--- /dev/null
|
|
|
|
|
+++ b/glut.pc.in
|
|
|
|
|
@@ -0,0 +1,13 @@
|
|
|
|
|
+prefix=@prefix@
|
|
|
|
|
+exec_prefix=@exec_prefix@
|
|
|
|
|
+libdir=@libdir@
|
|
|
|
|
+includedir=@includedir@/@PACKAGE@
|
|
|
|
|
+
|
|
|
|
|
+Name: glut
|
|
|
|
|
+Description: A freely licensed alternative to the GLUT library
|
|
|
|
|
+Version: @VERSION@
|
|
|
|
|
+Libs: -L${libdir} -lglut
|
|
|
|
|
+Libs.private: -lglu32 -lopengl32 -lwinmm -lgdi32 -mwindows
|
|
|
|
|
+Cflags: -I${includedir}
|
|
|
|
|
+Cflags.private: -DFREEGLUT_STATIC
|
|
|
|
|
@@ -53,9 +53,9 @@ ENDIF()
|
|
|
|
|
OPTION(FREEGLUT_GLES "Use OpenGL ES (requires EGL)" OFF)
|
|
|
|
|
|
|
|
|
|
# option to build either as "glut" (ON) or "freeglut" (OFF)
|
|
|
|
|
-IF(NOT WIN32)
|
|
|
|
|
+#IF(NOT WIN32)
|
|
|
|
|
OPTION(FREEGLUT_REPLACE_GLUT "Be a replacement for GLUT" ON)
|
|
|
|
|
-ENDIF()
|
|
|
|
|
+#ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SET(FREEGLUT_HEADERS
|
|
|
|
|
@@ -346,12 +346,18 @@ ENDIF()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
|
+ IF(FREEGLUT_REPLACE_GLUT)
|
|
|
|
|
+ SET(LIBNAME glut)
|
|
|
|
|
+ ELSE()
|
|
|
|
|
+ SET(LIBNAME freeglut)
|
|
|
|
|
+ ENDIF()
|
|
|
|
|
+
|
|
|
|
|
--
|
|
|
|
|
1.8.1.4
|
|
|
|
|
|
|
|
|
|
LIST(APPEND LIBS winmm)
|
|
|
|
|
IF(FREEGLUT_BUILD_SHARED_LIBS)
|
|
|
|
|
- SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS)
|
|
|
|
|
+ SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS OUTPUT_NAME ${LIBNAME})
|
|
|
|
|
ENDIF()
|
|
|
|
|
IF(FREEGLUT_BUILD_STATIC_LIBS)
|
|
|
|
|
- SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC)
|
|
|
|
|
+ SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC OUTPUT_NAME ${LIBNAME})
|
|
|
|
|
# need to set machine:x64 for linker, at least for VC10, and
|
|
|
|
|
# doesn't hurt for older compilers:
|
|
|
|
|
# http://public.kitware.com/Bug/view.php?id=11240#c22768
|
|
|
|
|