<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:10pt;color:#333399;font-family:Tahoma,Geneva,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I'm using cmake 3.11.4 and the FindXercesC.cmake file shipped with it.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">When I call find_package(XercesC REQUIRED) and XercesC is not in a standard location, I have to set XercesC_INCLUDE_DIR to its include directory and
<span>XercesC_LIBRARY</span> to the location of the library.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">If I set <span>XercesC_LIBRARY</span> to the directory containing the library (not to the fullpath of the library itself), cmake finds XercesC but sets XercesC_LIBRARIES to the folder instead of the library, and the same
for the XercesC::XercesC target. It seems I truly have to set XercesC_LIBRARY to the name of the library rather than the path to the folder containing it, which kinds of defies the point of find_package...</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I use to rely on a custom FindXercesC.cmake file that was using XercesC_ROOT to figure all this out. Is there any way to do the same here?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Matthieu<br>
</p>
</div>
</body>
</html>