[osg-submissions] Inventor CMake-files

PCJohn peciva at fit.vutbr.cz
Wed Aug 29 03:08:16 PDT 2007


Hi Luigi, David, and Mathieu,

thanks, now it works perfectly. Cool! I will submit it to Robert shortly.

The last think, I am missing in OSG CMake system is that it does not 
find my 3rdParty dir. I wanted to append search for OSG-src/3rdParty and 
OSG-src/3rdparty. To which file should I look?

John



Luigi Calori napsal(a):
> 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
>>  
>>
> 
> _______________________________________________
> 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