[CMake] [New Module] Xerces-C

Aleksandar Samardzic asamardzic at gmail.com
Thu Sep 25 15:05:32 EDT 2008


On Thu, Sep 25, 2008 at 3:46 PM, Timenkov Yuri <ytimenkov at gmail.com> wrote:
> This week I played with xerces too :) but on windows, so I suppose there
> will be different view point on this problem.
>
> 1) I think using FIND_PATH(XERCESC_INCLUDE_DIR
> xercesc/util/XercesVersion.hpp) is slightly better, because there may be
> different xercesc files or directories.

Completely agree here.


> 2) SET(XERCESC_NAMES xerces-c xerces-c_2)
> On windows, dlls are called xerces-c_2_8.dll and xerces-c_2_8D.dll (though
> their import conterparts are xerces-c_2.lib and xerces-c_2D.lib, so there
> should not be a problem on Visual Studio, but I don't know how they are
> called for mingw).

In our team, other guys are using a script alike to one attached to my
previous message with MinGW, seems to be working fine there.


> Next, because xerces-c provides debug and release libraries, I can propose
> playing with imported targets
> (http://www.cmake.org/Wiki/CMake_2.6_Notes#Importing_Targets), this may
> become good reference.
>
> So, for completeness, you can try looking for debug library too, and then
> use (as it done in FindBoost.cmake).
> SET( XERCESC_LIBRARIES optimized ${XERCESC_LIBRARY} debug
> ${XERCESC_LIBRARY_DEBUG})

This would be somewhat a problem for me, as I don't have access to
Visual C++; I practically work under Linux exclusively, and was hoping
to sent an initial version of script, that could be then refined
through patches from people having access to other relevant
platforms...

Regards,
Alex


More information about the CMake mailing list