OSGeo / PROJ-JNI

Java Native Interface for PROJ
https://osgeo.github.io/PROJ-JNI/
MIT License
23 stars 15 forks source link

Compiling with Visual C++ 2015: need to define PROJ6 include path #29

Closed FilipGh closed 4 years ago

FilipGh commented 4 years ago

I tried to compile the C++ part under Windows, with Visual C++ 2015 compiler. I followed the "cmake steps" as suggested in src/main/cpp/CMakelists.txt. The configuration step cannot be correct if the PROJ header files are not set "by hand". As far as I know, there is no default include directory for VS 2015 compiler as you may have for gcc under Linux. To circumvent this missing feature, I added a line at the end of src/main/cpp/CMakeLists.txt : target_include_directories(proj-binding PUBLIC ${PROJINC})

Then, it is necessary to initialize the PROJINC variable as: cmake ../../src/main/cpp -DPROJINC=Proj6/Path/include -DPROJLIB=Proj6/Path/lib/proj6_6_2.lib

include_directories.zip

desruisseaux commented 4 years ago

Patch has been integrated in master branch (thanks!). A 1.0-RC4 release candidate has been published.