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)
/* 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) */
/* 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