From 883d3be9367a61a832e26e029bc3b6475ee080ca Mon Sep 17 00:00:00 2001 From: Don Heyse Date: Tue, 10 Dec 2002 15:39:54 +0000 Subject: [PATCH] Added check for FREEGLUT_DLL to allow static & DLL build on Windows. git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@41 7f0cb862-5218-0410-a997-914c9d46530a --- include/GL/freeglut.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/include/GL/freeglut.h b/include/GL/freeglut.h index 8c22449..36fe111 100644 --- a/include/GL/freeglut.h +++ b/include/GL/freeglut.h @@ -36,7 +36,16 @@ * Under windows, we've got some issues to solve */ #if defined(WIN32) -#if 0 +# include +# include +# include +# define WINDOWS +# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */ +# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ +# pragma comment (lib, "glu32.lib") /* link with OpenGL Utility lib */ +//#if defined(_USRDLL) +//# if defined(FREEGLUTLIB_EXPORTS) +#if defined(FREEGLUT_DLL) # if defined(FREEGLUT_LIBRARY_BUILD) # define FGAPI __declspec(dllexport) # else @@ -44,19 +53,11 @@ # endif # define FGAPIENTRY __stdcall #else -# include -# include -# include -# define WINDOWS # define FGAPI # define FGAPIENTRY +# pragma comment (lib, "freeglut.lib") /* link with Win32 freeglut lib */ #endif -#pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */ -#pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ -#pragma comment (lib, "glu32.lib") /* link with OpenGL Utility lib */ -#pragma comment (lib, "freeglut.lib") /* link with Win32 freeglut lib */ - #else # define FGAPI # define FGAPIENTRY -- 1.7.10.4