From ce8d4a21371bd3718046a67737b68d7b0fc88d11 Mon Sep 17 00:00:00 2001 From: dcnieho Date: Fri, 25 May 2012 01:31:25 +0000 Subject: [PATCH] on windows+MSVC, debug builds of the library now have a 'd' suffix. freeglutdll.def was edited to no longer include the name of teh library that would clash with this and freeglut_std.h was edited to specify linking to the right library when building in debug mode git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1322 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/CMakeLists.txt | 4 ++++ freeglut/freeglut/include/GL/freeglut_std.h | 12 ++++++++++-- freeglut/freeglut/src/freeglutdll.def.in | 1 - 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index f2e2c1e..dee50b1 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -197,6 +197,10 @@ ENDIF() IF(WIN32) # hide insecure CRT warnings, common practice ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) + IF(MSVC) + SET( CMAKE_DEBUG_POSTFIX "d" ) + ENDIF(MSVC) + ENDIF() IF(CMAKE_COMPILER_IS_GNUCC) diff --git a/freeglut/freeglut/include/GL/freeglut_std.h b/freeglut/freeglut/include/GL/freeglut_std.h index 8bdae35..e880730 100644 --- a/freeglut/freeglut/include/GL/freeglut_std.h +++ b/freeglut/freeglut/include/GL/freeglut_std.h @@ -70,7 +70,11 @@ /* Link with Win32 static freeglut lib */ # if FREEGLUT_LIB_PRAGMAS -# pragma comment (lib, "freeglut_static.lib") +# ifdef NDEBUG +# pragma comment (lib, "freeglut_static.lib") +# else +# pragma comment (lib, "freeglut_staticd.lib") +# endif # endif /* Windows shared library (DLL) */ @@ -84,7 +88,11 @@ /* Link with Win32 shared freeglut lib */ # if FREEGLUT_LIB_PRAGMAS -# pragma comment (lib, "freeglut.lib") +# ifdef NDEBUG +# pragma comment (lib, "freeglut.lib") +# else +# pragma comment (lib, "freeglutd.lib") +# endif # endif # endif diff --git a/freeglut/freeglut/src/freeglutdll.def.in b/freeglut/freeglut/src/freeglutdll.def.in index 4804ec7..d038c70 100644 --- a/freeglut/freeglut/src/freeglutdll.def.in +++ b/freeglut/freeglut/src/freeglutdll.def.in @@ -1,4 +1,3 @@ -LIBRARY freeglut VERSION @VERSION_MAJOR@.@VERSION_MINOR@ EXPORTS glutInit