Skip to content

Instantly share code, notes, and snippets.

@st-wong
Last active May 16, 2019 08:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save st-wong/531a36aaa492d0308cfc06689813bd94 to your computer and use it in GitHub Desktop.
Save st-wong/531a36aaa492d0308cfc06689813bd94 to your computer and use it in GitHub Desktop.
Catapult Build using Microsoft VCPKG

Building on Windows with VCPKG

Prerequisites

  • git
  • python 3.x
  • Visual Studio Community 2017

NOTE: building instructions should be executed from VS x64 native command prompt

NOTE: install vcpkg to a folder where there are no space in the folder path, e.g. "Program Files" won't work.

VCPKG

Get vcpkg set up

git clone https://github.com/st-wong/vcpkg.git vcpkg.git
cd vcpkg.git
git checkout catapult
bootstrap-vcpkg.bat
vcpkg integrate install (run as Administrator on first run)

Install necessary libs for catapult

vcpkg install boost:x64-windows
vcpkg install gtest:x64-windows
vcpkg install benchmark:x64-windows
vcpkg install mongo-c-driver:x64-windows
vcpkg install mongo-cxx-driver:x64-windows
vcpkg install zeromq:x64-windows
vcpkg install cppzmq:x64-windows
vcpkg install gflags:x64-windows
vcpkg install snappy:x64-windows
vcpkg install rocksdb:x64-windows

full cmake:

git clone https://github.com/nemtech/catapult-server.git catapult-server.git
cd catapult-server.git

mkdir _build && cd _build
cmake -G "Visual Studio 15 2017 Win64" \
    -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake \
    -DPYTHON_EXECUTABLE:FILEPATH=[python3.x root]/python.exe \
    ..

REM run publish task (required to build tools)
cmake --build . --target publish

REM open catapult_server.sln OR build from command line:
msbuild /p:Configuration=RelWithDebInfo /p:Platform=x64 ALL_BUILD.vcxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment