<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 56.7pt 70.85pt;}
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="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Mats,<o:p></o:p></span></p>
<p class="MsoNormal"><span 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">Thanks for the feedback! Good to hear that it worked for you. And thanks for sharing your configuration insights!<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 I last tried, geos_c.lib was detected as well. So, this seems to be fixed. Thanks for the ZSTD hint, I missed the “Show advanced variables” checkbox in Visual Studio.<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">@Jorge: I planned to add the instructions to the discussion section first, but it seems to be gone. Was it removed?<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">@All: Are there concerns adding these instructions to
</span><a href="https://github.com/qgis/QGIS/blob/master/INSTALL.md" target="_blank"><span lang="EN-US">https://github.com/qgis/QGIS/blob/master/INSTALL.md</span></a><span lang="EN-US"> with an “experimental” hint? If there aren’t any concerns, I can prepare
 a pull request.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Stefan</span><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"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Mats Taraldsvik <mats.taraldsvik@gmail.com>
<br>
<b>Sent:</b> Thursday, February 11, 2021 11:30 AM<br>
<b>To:</b> Uhrig, Stefan <stefan.uhrig@sap.com><br>
<b>Cc:</b> DelazJ <delazj@gmail.com>; Jorge Gustavo Rocha <jgr@di.uminho.pt>; qgis-developer <qgis-developer@lists.osgeo.org><br>
<b>Subject:</b> Re: [QGIS-Developer] Building QGIS with Visual Studio 2019 CE and vcpkg<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi Stefan,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you for this excellent guide to compile with vcpkg, it worked right away after me struggling with the official guide+CMake compilation for a couple of hours.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I did make a few modifications that might help:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">1. Release build:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- geos_c.lib was detected automatically, and for some reason I did not need to explicitly set GEOS_LIBRARY<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">2. Debug build:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I noticed: 1> [CMake] -- Found ZSTD: C:/Users/mattar/Source/Repos/vcpkg_qgis/installed/x64-windows/lib/zstd.lib in the logs and you wrote:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">> The build will fail because the execution of crssync.exe fails. That's because crssync.exe tries to load zstd.dll instead of zstdd.dll. I haven't figured out why, yet. An easy workaround is copying zstdd.dll to zstd.dll in QGIS\out\build\x64-Debug\output\bin.
 Then restart the build and it should succeed.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">By setting ZSTD_LIBRARY explicitly to <your-vcpkg-root>/installed/x64-windows/debug/lib/zstdd.lib it picked the right lib and dll:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Then log changed to: 1> [CMake] -- Found ZSTD: C:/Users/mattar/Source/Repos/vcpkg_qgis/installed/x64-windows/debug/lib/zstdd.lib<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I hope this does help a bit.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm an outsider to this community, but my humble suggestion _when this work is complete_ (what's missing except for python support?):<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- add your CMakeSettings.json to the build description or to src/CMakeSettings.json<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- vcpkg has a new feature "manifests", where a file vcpkg.json describes all dependencies. this should also be added or described (instead of the vcpkg install command).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- vcpkg just got versioning, which might help align the requirements with the rest of qgis<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- I see that vcpkg already has flex and bison (<your-vcpkg-root>/downloads/tools/winflexbison), so if there is a way for win_bison.exe and win_flex.exe to be copied to the build directory, these could be used instead of cygwin, making the
 build even easier)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- vcpkg does have binary caching, perhaps making a github actions CI build using this method feasible?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Anyway, thank you for your efforts! It made the first QGIS-step more pleasant. :)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Mats Taraldsvik<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Feb 1, 2021 at 4:24 PM Uhrig, Stefan <<a href="mailto:stefan.uhrig@sap.com">stefan.uhrig@sap.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi all,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">In my opinion, the build with Visual Studio 2019 and vcpkg is still too experimental to add it to the INSTALL.md file. It might break any day if QGIS requires
 a package or package version that is not available from vcpkg.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Actually, I like the idea to add it to the “Show & tell” category. We can ask the community for their experiences with that setup. Does it work, is it getting
 used? If it is used by some “critical mass” and works over a longer time without issues, we can add instructions to the INSTALL.md file. Maybe we can add a hint to the INSTALL.md file that the not so faint-hearted developers might give it a try and provide
 a link to the “Show & tell” post.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">However, to be really useful, the debug build should also work with Python bindings and QGIS processing. I got it working for release builds (just needed to install
 the required Python dependencies via pip install <package>), but that does not work for debug builds. Someone solved that some years ago in another context (<a href="https://www.riverbankcomputing.com/pipermail/pyqt/2012-April/031385.html" target="_blank">https://www.riverbankcomputing.com/pipermail/pyqt/2012-April/031385.html</a>),
 so I might get it working. I’ll give it a try.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Furthermore, I’d like to investigate the zstd.dll vs zstdd.dll load issue before publishing the build instructions.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Best regards,</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">Stefan</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> QGIS-Developer <<a href="mailto:qgis-developer-bounces@lists.osgeo.org" target="_blank">qgis-developer-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>DelazJ<br>
<b>Sent:</b> Monday, February 1, 2021 10:49 AM<br>
<b>To:</b> Jorge Gustavo Rocha <<a href="mailto:jgr@di.uminho.pt" target="_blank">jgr@di.uminho.pt</a>><br>
<b>Cc:</b> qgis-developer <<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [QGIS-Developer] Building QGIS with Visual Studio 2019 CE and vcpkg</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Why not in the build instructions of the code repo instead:
<a href="https://github.com/qgis/QGIS/blob/master/INSTALL.md" target="_blank">https://github.com/qgis/QGIS/blob/master/INSTALL.md</a>? If it's a working process, easy to replicate, this is the place I'd expect this kind of information.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Harrissou<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Le dim. 31 janv. 2021 à 15:55, Jorge Gustavo Rocha <<a href="mailto:jgr@di.uminho.pt" target="_blank">jgr@di.uminho.pt</a>> a écrit :<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi Stefan,<br>
<br>
We have now a new tab on github called 'discussions'[1]. Your detailed<br>
instructions are a good candidate to write down a new entry there, under<br>
'Show and tell' category. The goal is to keep this information next to<br>
the repo. You can use the markdown syntax to enhance the writing format.<br>
You can also add some print screens.<br>
<br>
This is just a suggestion. Feel free to put it there or not.<br>
<br>
Regards (and thank you!),<br>
<br>
Jorge Gustavo<br>
<br>
[1] <a href="https://github.com/qgis/QGIS/discussions" target="_blank">https://github.com/qgis/QGIS/discussions</a><br>
<br>
Às 14:13 de 31/01/21, Uhrig, Stefan escreveu:<br>
> Install Visual Studio Community 2019: Select "Desktop development with<br>
> C++" under "Workloads" and "C++ MFC for latest v142 build tools (x86 &<br>
> x64)" under "Individual components". Verify that you install "Windows 10<br>
> SDK (10.0.18362.0)" or higher.<br>
> <br>
>  <br>
> <br>
> Install Git for Windows and Python 3.<br>
> <br>
>  <br>
> <br>
> Download<br>
> <a href="https://sourceforge.net/projects/winflexbison/files/win_flex_bison3-latest.zip/download" target="_blank">
https://sourceforge.net/projects/winflexbison/files/win_flex_bison3-latest.zip/download</a><br>
> and extract it to a location of your choice (avoid space characters in<br>
> the target path).<br>
> <br>
>  <br>
> <br>
> Follow the vcpkg "Quick Start: Windows" instructions at<br>
> <a href="https://github.com/microsoft/vcpkg#quick-start-windows" target="_blank">
https://github.com/microsoft/vcpkg#quick-start-windows</a>. Make sure to<br>
> execute the "vcpkg integrate install" command.<br>
> <br>
>  <br>
> <br>
> Install the required dependencies via:<br>
> <br>
>  <br>
> <br>
> vcpkg --triplet=x64-windows install exiv2 gdal gsl libspatialindex<br>
> libspatialite libzip opencl protobuf qca qscintilla qt5 qt5-serialport<br>
> qt5-location qt5-winextras qtkeychain qwt zstd<br>
> <br>
>  <br>
> <br>
> This may take a while as this creates a Debug and a Release build of<br>
> each dependency from source.<br>
> <br>
>  <br>
> <br>
> Clone the QGIS repostiory. The path to the QGIS repository should not<br>
> contain any space characters.<br>
> <br>
>  <br>
> <br>
> Start Visual Studio and open the QGIS CMakeLists.txt file via "File --><br>
> Open --> CMake...". This will start the CMake generation, which will<br>
> fail. You will need several configuration rounds until everything is<br>
> setup properly.<br>
> <br>
>  <br>
> <br>
> Let's start with a Release build because that requires less tweaking. Go<br>
> to "Project --> CMake Settings". Delete the default configuration<br>
> ("x64-Debug (default)").<br>
> <br>
>  <br>
> <br>
> Add a new "x64-Release" configuration and set "Configuration type" to<br>
> "Release". Save the CMakeSettings.json file, which will start a new<br>
> CMake generation. "FIND_FLEX" will fail, so you need to set the<br>
> "FLEX_EXECUTABLE" path manually in section "CMake variables and cache".<br>
> Browse to your win_flex.exe file. Additionally, disable "WITH_BINDINGS"<br>
> and "WITH_QGIS_PROCESS". Save the file. Next set "BISON_EXECUTABLE" to<br>
> your win_bison.exe file and save again. Disable "WITH_QTWEBKIT" and<br>
> save. Set "QCA_LIBRARY" to<br>
> "<vcpkg-root>\installed\x64-windows\lib\qca.lib" and save. Configuration<br>
> should now succeed, but you have to change "GEOS_LIBRARY" from<br>
> "geos.lib" to "geos_c.lib". Save and start the build after CMake<br>
> generation has finished.<br>
> <br>
>  <br>
> <br>
> Select "qgis.exe (output\bin\qgis.exe)" as start-up item in the toolbar<br>
> and start QGIS.<br>
> <br>
>  <br>
> <br>
> Now let's do the same for a Debug build. Add a "x64-Debug" configuration<br>
> and save. Change to the "x64-Debug" configuration in the toolbar. Repeat<br>
> the steps from above (set flex and bison paths etc.). When selecting<br>
> libraries, take the libraries from<br>
> "<vcpkg-root>\installed\x64-windows\debug\lib". Most libraries will have<br>
> a "d" or "_d" as name suffix. The CMake generation will not always<br>
> select the debug versions of libraries. Hence, go over the CMake<br>
> variables and change release library paths to debug library paths, e.g.<br>
> "<vcpkg-root>\installed\x64-windows\debug\lib\geos_cd.lib" for<br>
> GEOS_LIBRARY. I'll append my CMakeSettings.json file as reference to<br>
> this mail. Save again and start the build.<br>
> <br>
>  <br>
> <br>
> The build will fail because the execution of crssync.exe fails. That's<br>
> because crssync.exe tries to load zstd.dll instead of zstdd.dll. I<br>
> haven't figured out why, yet. An easy workaround is copying zstdd.dll to<br>
> zstd.dll in QGIS\out\build\x64-Debug\output\bin. Then restart the build<br>
> and it should succeed.<br>
> <br>
>  <br>
> <br>
> You should then be able to start and debug qgis.exe and its<br>
> dependencies. Note that some vcpkg portfiles forget to copy over the<br>
> .pdb files. For example, proj is affected. If you find such a library<br>
> with a missing .pdb file, check whether the portfile (e.g.<br>
> "<vcpkg-root>\ports\proj4\portfile.cmake") contains the<br>
> "vcpkg_copy_pdbs()" call. If not, just add it at the end, re-install the<br>
> dependency and copy over the .pdb file to the QGIS output directory.<br>
> <br>
>  <br>
> <br>
> I'm currently trying to get QGIS working with Python bindings. I got the<br>
> build working, however I'm struggling with the debug build execution.<br>
> The debug Python library seems to be unable to load the Release build Qt<br>
> libraries that come with PyQt5. Well, I'll keep trying and if I succeed,<br>
> I'll update the instructions.<br>
> <br>
>  <br>
> <br>
> Here is my CMakeSettings.json file for reference:<br>
> <br>
>  <br>
> <br>
> {<br>
> <br>
>   "configurations": [<br>
> <br>
>     {<br>
> <br>
>       "name": "x64-Release",<br>
> <br>
>       "generator": "Ninja",<br>
> <br>
>       "configurationType": "Release",<br>
> <br>
>       "buildRoot": "${projectDir}\\out\\build\\${name}",<br>
> <br>
>       "installRoot": "${projectDir}\\out\\install\\${name}",<br>
> <br>
>       "cmakeCommandArgs": "",<br>
> <br>
>       "buildCommandArgs": "",<br>
> <br>
>       "ctestCommandArgs": "",<br>
> <br>
>       "inheritEnvironments": [ "msvc_x64_x64" ],<br>
> <br>
>       "variables": [<br>
> <br>
>         {<br>
> <br>
>           "name": "WITH_BINDINGS",<br>
> <br>
>           "value": "False",<br>
> <br>
>           "type": "BOOL"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "WITH_QGIS_PROCESS",<br>
> <br>
>           "value": "False",<br>
> <br>
>           "type": "BOOL"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "FLEX_EXECUTABLE",<br>
> <br>
>           "value": "C:/src/tools/win_flex.exe",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "BISON_EXECUTABLE",<br>
> <br>
>           "value": "C:/src/tools/win_bison.exe",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "WITH_QTWEBKIT",<br>
> <br>
>           "value": "False",<br>
> <br>
>           "type": "BOOL"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "QCA_LIBRARY",<br>
> <br>
>           "value": "C:/src/vcpkg/installed/x64-windows/lib/qca.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "GEOS_LIBRARY",<br>
> <br>
>           "value": "C:/src/vcpkg/installed/x64-windows/lib/geos_c.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         }<br>
> <br>
>       ]<br>
> <br>
>     },<br>
> <br>
>     {<br>
> <br>
>       "name": "x64-Debug",<br>
> <br>
>       "generator": "Ninja",<br>
> <br>
>       "configurationType": "Debug",<br>
> <br>
>       "buildRoot": "${projectDir}\\out\\build\\${name}",<br>
> <br>
>       "installRoot": "${projectDir}\\out\\install\\${name}",<br>
> <br>
>       "cmakeCommandArgs": "",<br>
> <br>
>       "buildCommandArgs": "",<br>
> <br>
>       "ctestCommandArgs": "",<br>
> <br>
>       "inheritEnvironments": [ "msvc_x64_x64" ],<br>
> <br>
>       "variables": [<br>
> <br>
>         {<br>
> <br>
>           "name": "FLEX_EXECUTABLE",<br>
> <br>
>           "value": "C:/src/tools/win_flex.exe",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "BISON_EXECUTABLE",<br>
> <br>
>           "value": "C:/src/tools/win_bison.exe",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "WITH_QTWEBKIT",<br>
> <br>
>           "value": "False",<br>
> <br>
>           "type": "BOOL"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "WITH_BINDINGS",<br>
> <br>
>           "value": "False",<br>
> <br>
>           "type": "BOOL"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "WITH_QGIS_PROCESS",<br>
> <br>
>           "value": "False",<br>
> <br>
>           "type": "BOOL"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "QCA_LIBRARY",<br>
> <br>
>           "value": "C:/src/vcpkg/installed/x64-windows/debug/lib/qcad.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "GEOS_LIBRARY",<br>
> <br>
>           "value":<br>
> "C:/src/vcpkg/installed/x64-windows/debug/lib/geos_cd.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "GSL_LIB",<br>
> <br>
>           "value": "C:/src/vcpkg/installed/x64-windows/debug/lib/gsld.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "GSLCBLAS_LIB",<br>
> <br>
>           "value":<br>
> "C:/src/vcpkg/installed/x64-windows/debug/lib/gslcblasd.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "PROJ_LIBRARY",<br>
> <br>
>           "value":<br>
> "C:/src/vcpkg/installed/x64-windows/debug/lib/proj_d.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "QSCINTILLA_LIBRARY",<br>
> <br>
>           "value":<br>
> "C:/src/vcpkg/installed/x64-windows/debug/lib/qscintilla2_qt5d.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "QTKEYCHAIN_LIBRARY",<br>
> <br>
>           "value":<br>
> "C:/src/vcpkg/installed/x64-windows/debug/lib/qt5keychaind.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "QWT_LIBRARY",<br>
> <br>
>           "value": "C:/src/vcpkg/installed/x64-windows/debug/lib/qwtd.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         },<br>
> <br>
>         {<br>
> <br>
>           "name": "SPATIALINDEX_LIBRARY",<br>
> <br>
>           "value":<br>
> "C:/src/vcpkg/installed/x64-windows/debug/lib/spatialindex-64d.lib",<br>
> <br>
>           "type": "FILEPATH"<br>
> <br>
>         }<br>
> <br>
>       ]<br>
> <br>
>     }<br>
> <br>
>   ]<br>
> <br>
> }<br>
> <br>
>  <br>
> <br>
>  <br>
> <br>
>  <br>
> <br>
>  <br>
> <br>
> *From:*i-s-o <<a href="mailto:46.i.s.o.64@gmail.com" target="_blank">46.i.s.o.64@gmail.com</a>><br>
> *Sent:* Saturday, January 30, 2021 5:58 PM<br>
> *To:* Uhrig, Stefan <<a href="mailto:stefan.uhrig@sap.com" target="_blank">stefan.uhrig@sap.com</a>><br>
> *Cc:* qgis-developer <<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a>><br>
> *Subject:* Re: [QGIS-Developer] Building QGIS with Visual Studio 2019 CE<br>
> and vcpkg<br>
> <br>
>  <br>
> <br>
> I am very interested in trying out your solution. Could you share the<br>
> required steps?<br>
> <br>
>  <br>
> <br>
> Thx.<br>
> <br>
>  <br>
> <br>
> On Fri, Jan 29, 2021, 09:25 Uhrig, Stefan <<a href="mailto:stefan.uhrig@sap.com" target="_blank">stefan.uhrig@sap.com</a><br>
> <mailto:<a href="mailto:stefan.uhrig@sap.com" target="_blank">stefan.uhrig@sap.com</a>>> wrote:<br>
> <br>
>     TL;DR: It is currently possible to build the QGIS core app with<br>
>     Visual Studio 2019 and vcpkg, which makes debugging QGIS<br>
>     dependencies easy.<br>
> <br>
>      <br>
> <br>
>      <br>
> <br>
>     Hi all,<br>
> <br>
>      <br>
> <br>
>     Some time ago I discovered vcpkg<br>
>     (<a href="https://github.com/microsoft/vcpkg" target="_blank">https://github.com/microsoft/vcpkg</a>). vcpkg is a package manager<br>
>     that downloads package source code to your local machine and builds<br>
>     the package locally. Recently, I discovered that vcpkg should be<br>
>     able to provide all dependencies to build at least the QGIS core<br>
>     application. Hence, I gave it a try.<br>
> <br>
>      <br>
> <br>
>     Basically, it worked out of the box. I started with a fresh Windows<br>
>     10 installation, installed Visual Studio 2019 Community Edition,<br>
>     Git, vcpkg, Python 3 and flex and bison for Windows. I fetched all<br>
>     other dependencies via vcpkg. It was not necessary to even touch a<br>
>     single file in the repository. I could just open the main<br>
>     CMakeLists.txt file in Visual Studio and only had to tweak the CMake<br>
>     cache (the CMake find macros that come with QGIS are not aware of<br>
>     vcpkg, so I had to set some paths manually). I had to switch off<br>
>     some extensions though as the required dependencies were not<br>
>     available via vcpkg (WITH_BINDINGS, WITH_QGIS_PROCESS,<br>
>     WITH_QTWEBKIT). The build did not report any errors, I could start<br>
>     the application and it seems to work, but I did some light testing only.<br>
> <br>
>      <br>
> <br>
>     I mainly tried it because I enjoy debugging with Visual Studio more<br>
>     than with gdb (or gdb wrapped in some IDE). In my experience, the<br>
>     performance of the Visual Studio debugger is better and it is more<br>
>     stable, especially in long debug sessions.<br>
> <br>
>      <br>
> <br>
>     I don’t want to promote official building support of QGIS with<br>
>     vcpkg. Providing the dependencies via OSGeo4W is much more reliable.<br>
>     However, if you don’t mind the experimental nature of this setup and<br>
>     you want to be able to debug into QGIS’ dependencies, you might give<br>
>     it a try. Especially, if you want to track the cause of a crash in<br>
>     one of QGIS’ dependencies, this setup might be helpful. You have the<br>
>     source code and debug versions of the dependencies, so the debugger<br>
>     will jump to the crashing code line and you can inspect all the<br>
>     variables of the dependency.<br>
> <br>
>      <br>
> <br>
>     If someone is interested in trying it, give me a note. I can then<br>
>     assemble detailed instructions on how to make it work. It took me a<br>
>     while to figure out which packages are needed and how the CMake<br>
>     cache needs to be tweaked.<br>
> <br>
>      <br>
> <br>
>     Best regards,<br>
> <br>
>     Stefan<br>
> <br>
>      <br>
> <br>
>      <br>
> <br>
>      <br>
> <br>
>     _______________________________________________<br>
>     QGIS-Developer mailing list<br>
>     <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a> <mailto:<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a>><br>
>     List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>     Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> <br>
> <br>
> _______________________________________________<br>
> QGIS-Developer mailing list<br>
> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
> <br>
<br>
J. Gustavo<br>
-- <br>
Jorge Gustavo Rocha<br>
Departamento de Informática<br>
Universidade do Minho<br>
4710-057 Braga<br>
Gabinete 3.29 (Piso 3)<br>
Tel: +351 253604480<br>
Fax: +351 253604471<br>
Móvel: +351 910333888<br>
skype: nabocudnosor<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">
https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>