Hi,

On Wed, 2009-09-09 at 09:51 +0200, Johannes Brunen wrote:
> Hello Gerrit,
> 
> The OpenExr library still does cause problems for me. After spotting the 
> dynamic link library problem I did switch to static linking but still uses 
> my own build system setup. The only notably difference of the support 
> libraries provided by the OpenSG setup is the naming scheme.
> 
> My libraries are named as follows:
> 
> ilmimf.lib and ilmimfD.lib
> ilmhalf.lib and ilmhalfD.lib
> ilmiex.lib and ilmiexD.lib
> ilmthread.lib and ilmthreadD.lib
> 
> Since I do not use the OSG_USE_OSGSUPPORT_LIBS flag the FindOpenExr.cmake 
> script comes into play. The first problem with this is that it does not 
> respect the dependency to the illmthread library which is used. I added the 
> necessary FIND_LIBRARY statements for this library for debug and release. 
> You can find this changed file on:
> http://drop.io/OpenSG_RenderEngine

ok.

> Additionally, I added variables OPENEXR_LIBRARIES_RELEASE and 
> OPENEXR_LIBRARIES_DEBUG for the different types. Now I'm at the core of my 
> problem, because I did not find a way to use these debug and release 
> libraries properly. Running cmake with this FindOpenEXR.cmake script results 
> in msvc project files refering only to the release libraries of OpenExr for 
> all build types. This, however, does not work for the debug build types.
> In the same context the debug/release variables for the other support 
> libraries are also not respected. As these are simple C libraries this is 
> not such a serious problem. However, not so for OpenExr. Here the proper 
> build type is required.

There is AFAIK only one way around it and this is to use imported
targets for all support libs, which usually no Find_XXXX.cmake module
does. That is the main difference what happens when using OSG's support
libs. I'll guess we have to take this part from the OSG_SUPPORT path and
move it so imported targets are used in all cases. Some support libs
(IIRC boost and collada) already do this.

> In file ConfigurePackages.cmake is a small error in line 166. The statement
> 
> OSG_FIND_PACKAGE(OpenEXR)
> 
> must be replaced by
> 
> OSG_FIND_PACKAGE(OPENEXR)
> 
> otherwise the FIND_PACKAGE call in BuildFunctions.cmake does not provide a 
> correct ${Name}_FOUND flag.

ok

> I'm not sure the following is helpful but I did solve the build type 
> dependency problem in my cmake projects as in the example below:
> 
> target_link_libraries(
>     png
>         debug ${ZLIB_D_LIBRARY}
>         optimized ${ZLIB_LIBRARY}

here I probably go for the IMPORTED_LINK_INTERFACE_LIBRARIES property of
the imported targets (once the imported part is done).

kind regards,
  gerrit






------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to