From ed2aa7c90fce991cf3f057b266f015ed31b3752d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 12 Mar 2009 17:57:52 +0000 Subject: [PATCH] From Frank Midgley, "I tried running osgconv --formats yesterday on OS X and got no results. Turns out the changes discussed in the "osgDB::listAllAvailablePlugins win32 fix" thread back in Sep '08 broke this. The OSG_PLUGIN_EXTENSION macro is being defined in src/osgDB/CMakeLists.txt from CMAKE_SHARED_LIBRARY_SUFFIX which is "dylib" on OS X. The problem is that all of the plug-ins are setup in OsgMacroUtils.cmake with: ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC} ${TARGET_H}) which gives them .so extensions. Since ".so" != ".dylib" osgDB::listAllAvailablePlugins finds no plug-ins. I believe the correct solution is to use CMAKE_SHARED_MODULE_SUFFIX instead. This builds and runs correctly on OS X but I have not tested on other platforms. Attached is an updated src/osgDB/CMakeLists.txt based on rev 9915. The change is at line 108. To validate: build and then run bin/osgconv --formats. You should get many screenfuls of plug-in features, extensions and options." Merged from svn/trunk using: svn merge -r 9921:9922 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgDB/CMakeLists.txt --- src/osgDB/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgDB/CMakeLists.txt b/src/osgDB/CMakeLists.txt index 87af2ec93..80ce119d1 100644 --- a/src/osgDB/CMakeLists.txt +++ b/src/osgDB/CMakeLists.txt @@ -95,7 +95,7 @@ IF(OPENVRML_FOUND) ENDIF(OPENVRML_FOUND) -ADD_DEFINITIONS(-DOSG_PLUGIN_EXTENSION=${CMAKE_SHARED_LIBRARY_SUFFIX}) +ADD_DEFINITIONS(-DOSG_PLUGIN_EXTENSION=${CMAKE_SHARED_MODULE_SUFFIX}) LINK_INTERNAL(${LIB_NAME} osg