Skip to content

Building with VS and vcpkg

Mateusz Łoskot edited this page May 23, 2019 · 5 revisions

Quick notes on setting up basic environment for building PROJ with Visual Studio 2017 or 2019 using:

  • cmake to configure and build
  • ctest to run tests
  • vcpkg to install SQLite3 dependency

Install Vcpkg

D:\> git clone https://github.com/Microsoft/vcpkg.git
D:\> cd vcpkg
D:\vcpkg> .\bootstrap-vcpkg.bat

Install SQLite3 program and library

D:\vcpkg> vcpkg.exe install sqlite3[core,tool]:x86-windows
D:\vcpkg> vcpkg.exe install sqlite3[core,tool]:x64-windows

Build PROJ

D:\> git clone https://github.com/OSGeo/proj.4.git
D:\> cd proj.4
D:\proj.4> cmake -S . -B _build.vs2019 -DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake
D:\proj.4> cmake --build _build.vs2019 --config Debug   -j 8

Build PROJ

D:\proj.4> cd _build.vs2019
D:\proj.4\_build.vs2019> ctest -V --build-config Debug
Clone this wiki locally