Skip to content

Instantly share code, notes, and snippets.

@pebbie
Last active August 1, 2020 01:12
Show Gist options
  • Save pebbie/f5f0b1db7fc4039af89054c1b3fb532f to your computer and use it in GitHub Desktop.
Save pebbie/f5f0b1db7fc4039af89054c1b3fb532f to your computer and use it in GitHub Desktop.
building proj6 on visual studio 2017 (windows)

Howto build PROJ6 on Windows (Visual Studio 2017-x64)

1. Download SQLITE3

  • build sqlite3.dll :cl sqlite3.c /LD

  • generate sqlite3.lib : lib sqlite3.obj

  • build sqlite3.exe : cl shell.c sqlite3.lib -o sqlite3.exe

2. Run cmake with sqlite3 variables defined

  • EXE_SQLITE3 : file path of sqlite3.exe
  • SQLITE3_INCLUDE_DIR : directory where sqlite3.h located
  • SQLITE3_LIBRARY: file path of sqlite3.lib

run cmake -G"Visual Studio 15 2017 Win64" -DEXE_SQLITE=sqlite3\sqlite3.exe -DSQLITE3_INCLUDE_DIR=sqlite3 -DSQLITE3_LIBRARY=sqlite3\sqlite3.lib -DCMAKE_INSTALL_PREFIX=distro ..

in this case, i am using build directory inside proj4 directory from git and put sqlite3 directory inside build directory.

3. Build

Using msbuild

msbuild PROJ4.sln (Debug) or msbuild PROJ4.sln /property:Configuration=Release for Release version

msbuild INSTALL.vcxproj or msbuild INSTALL.vcxproj /property:Configuration=Release

Using CMAKE

go to build directory and run cmake --build . --target ALL_BUILD --config Release for Release version

cmake --buid . --target INSTALL --config Release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment