georust / proj

Rust bindings for the latest stable release of PROJ
https://docs.rs/proj
Apache License 2.0
137 stars 45 forks source link

Fix linker error when building proj-sys in debug mode with MSVC #83

Closed geogcrs25832 closed 3 years ago

geogcrs25832 commented 3 years ago

The proj CMakeLists.txt contains instructions to add a _d suffix to the compiled library in certain situations: https://github.com/OSGeo/PROJ/blob/e3d7e18f988230973ced5163fa2581b6671c8755/src/CMakeLists.txt#L86

Proj-sys does not expect this suffix and fails to find the library. This results in build failure. This PR adds support for the suffixed library.

urschrei commented 3 years ago

bors try

urschrei commented 3 years ago

Hi @geogcrs25832, thanks for this! I think this is uncontroversial (I have no expertise with MSVC, though), and gets us a step closer to stable builds on that platform. Could you add an entry to the changelog and I'll merge.

bors[bot] commented 3 years ago

try

Build succeeded:

urschrei commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Build succeeded: