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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user