<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="PT" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hi, I also build GDAL like that and noticed that you have an error in XercesC_INCLUDE_DIR. This is what I have. Notice that it ends with “/include”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">When you solve them please report if you were able to build with PDFIUM. I wasn’t, lots of C++ incomprehensible errors.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Joaquim<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">               set(XercesC_INCLUDE_DIR "C:/programs/compa_libs/xerces-c-3.1.1/compileds/VC14_64/include" CACHE STRING "" FORCE)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">               set(XercesC_LIBRARY "C:/programs/compa_libs/xerces-c-3.1.1/compileds/VC14_64/lib/xerces-c_3.lib" CACHE STRING "" FORCE)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Derek Newhall<br>
<b>Sent:</b> Thursday, March 16, 2023 7:51 PM<br>
<b>To:</b> gdal-dev@lists.osgeo.org<br>
<b>Subject:</b> [gdal-dev] Generated CMake build files missing external references<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#A6A6A6;padding:5.25pt 1.5pt 5.25pt 1.5pt"></td>
<td width="100%" style="width:100.0%;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 11.25pt">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:#212121">Não costuma receber e-mails de
<a href="mailto:dnewhall@carlsonsw.com">dnewhall@carlsonsw.com</a>. <a href="https://aka.ms/LearnAboutSenderIdentification">
Saiba por que motivo isto é importante</a><o:p></o:p></span></p>
</div>
</td>
<td width="75" style="width:56.25pt;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 3.75pt;align:left">
</td>
</tr>
</tbody>
</table>
<div>
<div>
<p class="MsoNormal">Hello,<br>
<br>
We are trying to migrate from GDAL 3.5.1 to 3.6.3. We currently build a custom gdal*.dll file using a modified nmake.opt file and are trying to duplicate it as a ConfigUser.cmake file. We are building GDAL with ECW 5.5, curl, sqlite3, pdfium, OpenSSL, and Expat.<br>
<br>
With 3.6.3 I can get the build files to generate seemingly correctly with our ConfigUser.cmake file and 'cmake -G "Visual Studio 16 2019" .. -C ..\ConfigUser.cmake' but the build fails once 'cmake --build .' is run.<br>
<br>
The output of the configure step confirms everything's found, listing the following at the end:
<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
"-- The following OPTIONAL package have been found:" ODBC, XercesC, OpenSSL, ECW, PDFIUM<br>
"-- The following RECOMMENDED packages have been found:" CURL, EXPAT, SQLite3<br>
"-- The following REQUIRED packages have been found:" PROJ<br>
<br>
However, once the build happens, a few projects have compilation errors relating to external header files (specifically Xerces):<br>
<br>
D:\gdal-3.6.3\ogr\ogr_xerces_headers.h(37,10): fatal error C1083: Cannot open include file: 'xercesc/framework/MemoryManager.hpp': No such file or directory [D:\gdal-3.6.3\build\gcore\gcore.vcxproj]<br>
<br>
We are able to fix these references manually in Visual Studio by adding the external include directories to Xerces for the following projects: gcore, ogr, ogr_GMLAS, ogr_GML, ogr_NAS, ogr_ILI<br>
<br>
That gets it to compile at least, but then we run into some similar linking issues.<br>
<br>
We're new to building the 3.6.x branch, so I'm presuming we've misconfigured something somewhere, but I am not sure what it is in this case.<br>
<br>
Thank you,<br>
<br>
Derek Newhall<br>
<br>
<br>
The following is the contents of our ConfigUser.cmake file: <o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
set(GDAL_BUILD_ABS_PATH "D:/gdal-3.6.3")<br>
set(GLOBAL_LIBRARIES_ABS_PATH "D:/global_libraries")<br>
set (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "" FORCE)<br>
set(PROJ_INCLUDE_DIR "${GDAL_BUILD_ABS_PATH}/proj-6.3.1/src" CACHE STRING "" FORCE)<br>
set(PROJ_LIBRARY_RELEASE "${GDAL_BUILD_ABS_PATH}/proj-6.3.1/build_VS2017_x64/lib/RelWithDebInfo/proj.lib" CACHE STRING "" FORCE)<br>
set(ECW_ROOT "${GDAL_BUILD_ABS_PATH}/ERDAS ECW JPEG 2000 SDK 5.5.0/Desktop Read-Only")<br>
set(ECW_INCLUDE_DIR "${ECW_ROOT}/include" CACHE STRING "" FORCE)<br>
set(ECW_LIBRARY "${ECW_ROOT}/lib/vc141/x64/NCSEcwS.lib" CACHE STRING "" FORCE)<br>
set(XERCES_DIR "${GLOBAL_LIBRARIES_ABS_PATH}/xerces-c-3.2.1/build/2017/" CACHE STRING "" FORCE)<br>
set(XercesC_INCLUDE_DIR "${XERCES_DIR}/src/" CACHE STRING "" FORCE)<br>
set(XercesC_LIBRARY "${XERCES_DIR}/src/Release/xerces-c_3.lib" CACHE STRING "" FORCE)<br>
set(SQLite3_INCLUDE_DIR "${GDAL_BUILD_ABS_PATH}/sqlite-amalgamation-3370200" CACHE STRING "" FORCE)<br>
set(SQLite3_LIBRARY "${GDAL_BUILD_ABS_PATH}/sqlite-amalgamation-3370200/sqlite3.lib" CACHE STRING "" FORCE)<br>
set(CURL_DIR "${GDAL_BUILD_ABS_PATH}/libcurl" CACHE STRING "" FORCE)<br>
set(CURL_INCLUDE_DIR "${CURL_DIR}/include" CACHE STRING "" FORCE)<br>
set(CURL_LIBRARY_RELEASE "${CURL_DIR}/lib/libcurl.lib" CACHE STRING "" FORCE)<br>
set(PDFIUM_INCLUDE_DIR "${GDAL_BUILD_ABS_PATH}/ExtractPDFium/install/include/pdfium" CACHE STRING "" FORCE)<br>
set(PDFIUM_LIBRARY "${GDAL_BUILD_ABS_PATH}/ExtractPDFium/install/lib/pdfium.lib" CACHE STRING "" FORCE)<br>
set(GDAL_ENABLE_DRIVER_PDF_PLUGIN ON)<br>
set(OPENSSL_ROOT_DIR "${GLOBAL_LIBRARIES_ABS_PATH}/openssl-1.1.0f-vs2017" CACHE STRING "" FORCE)<br>
set(OPENSSL_INCLUDE_DIR "${OPENSSL_ROOT_DIR}/include64" CACHE STRING "" FORCE)<br>
set(OPENSSL_USE_STATIC_LIBS TRUE CACHE STRING "" FORCE)<br>
set(OPENSSL_MSVC_STATIC_RT TRUE CACHE STRING "" FORCE)<br>
set(EXPAT_DIR "${GDAL_BUILD_ABS_PATH}/Expat/" CACHE STRING "" FORCE)<br>
set(EXPAT_INCLUDE_DIR "${GDAL_BUILD_ABS_PATH}/Expat/Source/lib" CACHE STRING "" FORCE)<br>
set(EXPAT_LIBRARY "${GDAL_BUILD_ABS_PATH}/Expat/Bin/libexpatwMT.lib" CACHE STRING "" FORCE)<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<p><b><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#777777">Disclaimer</span></b><span style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#777777"><o:p></o:p></span></p>
<p><span style="font-size:8.0pt;font-family:"Verdana",sans-serif;color:#777777">The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not
 the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.<o:p></o:p></span></p>
</div>
</div>
</body>
</html>