<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: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">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">FYI, this is what I do with my build. Since I want to control the DLL name I’ve added this lines to src\</span><span lang="EN-US">
</span><span lang="EN-US" style="mso-fareast-language:EN-US">lib_proj.cmake<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"># If a renaming of the proj dll has been set in ConfigUser.cmake<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">if (WIN32 AND PROJ4_DLL_RENAME)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">set_target_properties(${PROJ_CORE_TARGET} PROPERTIES RUNTIME_OUTPUT_NAME ${PROJ4_DLL_RENAME})<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">endif (WIN32 AND PROJ4_DLL_RENAME)<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">and in a ConfigUser.cmake file (included in the main CMakeLists.txt file) I have<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 (PROJ4_DLL_RENAME proj_w${BITAGE})<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">where BITAGE is either 32 or 64.<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">If there is interest for such a solution I could make a PR for it<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">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"><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>Tamas Szekeres<br>
<b>Sent:</b> Wednesday, January 22, 2020 3:49 PM<br>
<b>To:</b> Even Rouault <even.rouault@spatialys.com><br>
<b>Cc:</b> gdal-dev <gdal-dev@lists.osgeo.org><br>
<b>Subject:</b> Re: [gdal-dev] GDAL and proj dll name.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Even,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you, I've not considered to modify the linking behavior of proj.dll at this stage, but as far as it solves the problem I'm fine with it.<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"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Tamas<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> ezt írta (időpont: 2020. jan. 22., Sze, 15:01):<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">
<p class="MsoNormal">Hi Tamas,<br>
<br>
> However the GDAL build (like for<br>
> <a href="https://github.com/OSGeo/gdal/blob/v2.4.4/gdal/ogr/ogrct.cpp" target="_blank">
https://github.com/OSGeo/gdal/blob/v2.4.4/gdal/ogr/ogrct.cpp</a>) still using<br>
> the default proj.dll name which cannot be configured in the opt file.<br>
<br>
It can. You need to define -DPROJ_STATIC for that. -DPROJ_STATIC is a bit <br>
confusing. It didn't mean a static build, but something that was linked at <br>
build time (either a static or dynamic lib), to be opposed at being loaded at <br>
runtime with LoadLibrary(). That's what you want to use.<br>
<br>
# PROJ stuff<br>
# Uncomment the following lines to link PROJ library statically. Otherwise<br>
# it will be linked dynamically during runtime.<br>
# To use the new API of proj5 or later, use<br>
#PROJ_FLAGS = -DPROJ_STATIC -DPROJ_VERSION=5<br>
# for proj 4.x:<br>
#PROJ_FLAGS = -DPROJ_STATIC -DPROJ_VERSION=4<br>
<br>
#PROJ_INCLUDE = -Id:\projects\proj.4\src<br>
#PROJ_LIBRARY = d:\projects\proj.4\src\proj_i.lib<br>
<br>
Even<br>
<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>