From Alberto Luaces, "Cygwin's cmake build adds a "d" postfix to the plugins installed in debug
mode. Nevertheless, the code doesn't acknowledge that, so I had problems with debug versions of the library not being able to open their plugins whereas the release versions worked fine. I have made the same changes in Registry.cpp that are available for the rest of platforms appending that "d" to their plugins. I have also updated the CMakeLists.txt file to get "_DEBUG" defined at compilation time. I have copied the already existent conditional block because of cmake's bizarre operator precedence. Since Cygwin defines both CYGWIN and WIN32, the following would suffice: IF(CYGWIN OR UNIX AND NOT WIN32 AND NOT APPLE) Sadly, it actually doesn't work, so I wrote a new conditional block just for Cygwin. I could join the two blocks when the parentheses support is added in newer versions of cmake."
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user