diff --git a/CMakeLists.txt b/CMakeLists.txt index fb65fea65..a7a0219d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -435,6 +435,11 @@ IF(UNIX AND NOT WIN32 AND NOT APPLE) ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug") ENDIF(UNIX AND NOT WIN32 AND NOT APPLE) +IF(CYGWIN) + IF(CMAKE_BUILD_TYPE STREQUAL "Debug") + ADD_DEFINITIONS("-D_DEBUG") + ENDIF(CMAKE_BUILD_TYPE STREQUAL "Debug") +ENDIF(CYGWIN) IF(UNIX AND NOT WIN32 AND NOT APPLE) IF(CMAKE_SIZEOF_VOID_P MATCHES "8") diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index 56a6dc23b..62d3ac393 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -622,7 +622,11 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext) #endif #if defined(__CYGWIN__) - return prepend+"cygwin_"+"osgdb_"+lowercase_ext+".dll"; + #ifdef _DEBUG + return prepend+"cygwin_"+"osgdb_"+lowercase_ext+OSG_DEBUG_POSTFIX+".dll"; + #else + return prepend+"cygwin_"+"osgdb_"+lowercase_ext+".dll"; + #endif #elif defined(__MINGW32__) return prepend+"mingw_"+"osgdb_"+lowercase_ext+".dll"; #elif defined(WIN32)