Hello list, I have some minor problems with the FindOpenSG.cmake script: When installing OpenSG2, the default library directory is PREFIX/lib64. However, the FindOpenSG script searches only for PREFIX/lib. Another issue that did come up is that you can't call find_package(OpenSG) more than once, because the script imports the OpenSG-libraries and cmake can't have a library defined more than once.
I have included a patch below, which adds lib64 to the library search paths and only imports the libraries once. Can someone have a look at it and maybe incorporate it in the repository? My second problem is related to osg2-config: For some reason, the boost include directory is not added to osg2-config. For this reason I get errors like this one all over the place: jkuvrc/packages/OpenSG/OpenSG-2.0.0-pre1-svn2422-boost_1_43_0/include/OpenSG/OSGBaseTypes.h:50:28: error: boost/mpl/if.hpp: No such file or directory The IMO relevant section of osg2-config is: ## Dependecies for OSGBase "OSGBase" : { "dep_osg_lib" : [ ], "dep_lib" : [ "dl", "pthread", ], "dep_lib_dir" : [ "/usr/lib64", ], "dep_inc_dir" : [ ], }, I guess the boost-include-directory should show up here inside "dep_inc_dir"? How can I influence the value for this, so I can supply a patch? Cheers, Johannes Zarl The patch for FindOpenSG.cmake: --- /jkuvrc/packages/OpenSG/OpenSG-2.0.0-pre1-svn2422-boost_1_43_0/share/OpenSG/cmake/FindOpenSG.cmake 2009-11-16 16:31:13.000000000 +0100 +++ ../cmake/FindOpenSG.cmake 2010-08-24 13:52:11.131271291 +0200 @@ -198,7 +201,12 @@ __OpenSG_ADJUST_LIB_VARS(${UPPERCOMPONENT} ${COMPONENT}) SET(OpenSG_LIBRARIES ${OpenSG_LIBRARIES} ${OpenSG_${UPPERCOMPONENT}_LIBRARY}) - SETUP_OSG_LIB_TARGETS(${COMPONENT} ${UPPERCOMPONENT}) + # only setup target, if target is not defined yet: + # (i.e. allow this script to be called twice without errors) + GET_TARGET_PROPERTY(__OpenSG_COMPONENT_IMPORTED ${COMPONENT} IMPORTED) + IF ( NOT __OpenSG_COMPONENT_IMPORTED ) + SETUP_OSG_LIB_TARGETS(${COMPONENT} ${UPPERCOMPONENT}) + ENDIF ( NOT __OpenSG_COMPONENT_IMPORTED ) ENDFOREACH(COMPONENT) SET(OpenSG_INCLUDE_DIRS "${OpenSG_INCLUDE_DIR}" "${OpenSG_INCLUDE_DIR}/OpenSG") @@ -230,6 +238,7 @@ SET(__OpenSG_LIBRARIES_SEARCH_DIRS ${OPENSG_ROOT}/lib + ${OPENSG_ROOT}/lib64 ${OPENSG_ROOT}/stage/lib ${__OpenSG_LIBRARIES_SEARCH_DIRS}) ENDIF(OPENSG_ROOT) -- Johannes Zarl Virtual Reality Services Johannes Kepler University Informationsmanagement Altenbergerstrasze 69 4040 Linz, Austria Phone: +43 732 2468-8321 johannes.z...@jku.at http://vrc.zid.jku.at ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users