[osg-submissions] Inventor CMake-files

Luigi Calori l.calori at cineca.it
Wed Aug 29 02:07:56 PDT 2007


Hi John and David
the macro
SETUP_PLUGIN should already support what suggested by  David:

just define two variables: one
INVENTOR_LIBRARY and INVENTOR_LIBRARY_DEBUG and  then define

SET(TARGET_LIBRARIES_VARS INVENTOR_LIBRARY )

before calling SETUP_PLUGIN

You should change your find file accordingly though, you should do two 
finds: one for debug and another for release, like

FIND_LIBRARY(INVENTOR_LIBRARY_DEBUG
    NAMES  coin2d
    PATHS
    /usr/local/lib
    /usr/lib
    /sw/lib
    /opt/local/lib
    /opt/csw/lib
    /opt/lib
    $ENV{COINDIR}/lib
)

FIND_LIBRARY(INVENTOR_LIBRARY
    NAMES  Coin coin2
    PATHS
    /usr/local/lib
    /usr/lib
    /sw/lib
    /opt/local/lib
    /opt/csw/lib
    /opt/lib
    $ENV{COINDIR}/lib
)

    IF( NOT INVENTOR_LIBRARY_DEBUG)
        IF(INVENTOR_LIBRARY)
            SET(INVENTOR_LIBRARY_DEBUG INVENTOR_LIBRARY)
         ENDIF(INVENTOR_LIBRARY)
    ENDIF( NOT INVENTOR_LIBRARY_DEBUG)

I think the problem of your find is that you search in the same 
FIND_LIBRARY command both for debug and release names, so the find finds 
one (the first?)
and you use it for both linking

hope it helps

Luigi

David Callu wrote:

> Hi john,
>
>     To specify different libs for debug/release,
>      just add debug or release before the library name:
>
>        SET( ExternalLibraryToLinks
>                debug ExternalLibraryToLinkD
>                release ExternalLibraryToLink )
>
>     Then use it:
>         TARGET_LINK_LIBRARIES( MyTarget  ExternalLibraryToLinks )
>
>      CMake web site is down so I can't point you on the documentation.
>      Take a look later on the function TARGET_LINK_LIBRARIES for more 
> information.
>
> Cheers
> David Callu
>
>------------------------------------------------------------------------
>
>_______________________________________________
>osg-submissions mailing list
>osg-submissions at lists.openscenegraph.org
>http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>  
>



More information about the osg-submissions mailing list