[Insight-developers] expat

Bill Hoffman bill . hoffman at kitware . com
Fri, 25 Jul 2003 12:56:59 -0400


At 11:56 AM 7/25/2003, Kent Williams wrote:
>On Friday 25 July 2003 10:17 am, Miller, James V (Research) wrote:
>> In the expat sources in Utilities/expat there are references to
>> vtkexpat_EXPORTS and vtkNotUsed.
>> The latter is fairly easy to fix.  What
>> should the former be?  The library that is built is ITKEXPAT.  Should the
>> symbol by ITKEXPAT_EXPORTS?
>
>vtkexpat_EXPORTS just defines whether, on WIN32 platforms, you're importing 
>(i.e. a client of the DLL) or exporting (building the library) public 
>symbols.  My guess is that this should be changed to whatever symbol has this 
>function in ITK.

Actually, CMake adds -DlibraryName_EXPORTS to the build for dll's.   So,
the name should be ITKEXPAT_EXPORTS.   However, why is this library
screaming at us anyway?  Would not itkexpat be more in line with itkpng?



>A further refinement might be to NOT build expat at all when it's available 
>already.  The reason I broke everyone's builds yesterday (one reason anyway) 
>is that I didn't realize that Redhat has expat installed in /usr/include and 
>/usr/lib already, so I was getting include files from /usr/include instead of 
>ITK.   A FindITK.cmake file would probably be the proper solution, such that 
>the Insight/Utillities CMakeLists.txt would only trigger building and 
>installing expat if it's not already available on the build computer.
>
>Redhat ships with ITK shared object libraries, by the way, so it is possible 
>to build them on non-Win32 platforms. 


It should have the option of using an installed version, but by default it
should provide one.  If we start to rely on system installed versions it will
make ITK much harder to build.  That is the approach with png and zlib.

-Bill