asio
zlib
cryptopp
cryptopp-staticcrt
libsodium
sqlite3
openssl
c-ares
curl
libevent
libzen
libmediainfo
ffmpeg
gtest

#freeimage is not needed for MEGASync (but might be for other projects. e.g: MEGAcmd)
#freeimage

#REM MEGASync needs libuv and libraw
libuv
libraw

# MEGASync needs pdfium, and building it is quite tricky - we can build it statically though with its own CMakeLists.txt after getting the code per their instructions.  
# It in turn depends on these libs which are easier to build with vcpkg as part of our compatible static library set than as part of its own third_party dependencies
icu
lcms
libjpeg-turbo
openjpeg

# If building for use with MEGAChat messaging then libwebsocket is needed (but voice/video calling needs WebRTC which changes the dependencies a lot, openssl in particular)
libwebsockets

# ------ building pdifum - this one needs some manual steps - these can be done before calling the script ---------------
# - Set up your Depot Tools (this can be one time, reuse it for other builds etc)
#      Follow these instructions to get the depot_tools: https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
# - Then go to your 3rdParty/vcpkg folder, and run these commands in it to get the pdfium source:
#      export DEPOT_TOOLS=<<<<your depot_tools path>>>>
#      export PATH=$DEPOT_TOOLS;$PATH
#      mkdir pdfium
#      cd pdfium
#      gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git
#      gclient sync
#      # branch 3710 is compatibile with the VS 2015 compiler and v140 toolset  (or if you want to use the latest, see below)
#      cd pdfium
#      git checkout chromium/3710
#      cd ..
#      gclient sync --force
# - If using the latest Pdfium, use at least VS2017 and skip the branch checkout above, and substitute the pdfium-masterbranch-CMakeLists.txt in vcpkg/ports/pdfium and make this one small patch (other changes may be needed if the master branch has changed):
#      in pdfium\core\fxcrt\fx_memory_wrappers.h(26)   comment out the static_assert (uint8_t counts as an arithmentic type)

# Windows:
# ------ building pdifum - this one needs some manual steps - these can be done before calling the script ---------------
# - Set up your Depot Tools (this can be one time, reuse it for other builds etc)
#      Follow these instructions to get the depot_tools (download .zip, extract all, set variable, run gclient):
#      https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#install
#      and stop at the end of that sub-chapter.
# - Then change directory to your 3rdParty/vcpkg folder (make sure it is not a long path, or subst V: to it), and run these commands in it to get the pdfium source:
#      set DEPOT_TOOLS=<<<<your depot_tools path>>>>
#      set PATH=%DEPOT_TOOLS%;%PATH%
#      set DEPOT_TOOLS_WIN_TOOLCHAIN=0
#      mkdir pdfium
#      cd pdfium
#      gclient config --unmanaged https://pdfium.googlesource.com/pdfium.git
#      gclient sync
#      # if you want to use older branch 3710, which is compatibile with the VS 2015 compiler and v140 toolset do the following (otherwise skip to next section):
#          cd pdfium
#          git checkout chromium/3710
#          cd ..
#          gclient sync --force
# - If using VS2015 compiler, find span.h and remove 'constexpr' from all the forwarding constructors.
# - If using the latest Pdfium, use at least VS2017 and skip the branch checkout above, and substitute CMakeLists.txt with pdfium-masterbranch-CMakeLists.txt
#   in sdk/contrib/cmake/vcpkg_extra_ports/pdfium/3710/  (subfolder named '3710' is indeed confusing)
# - change directory to 3rdparty\vcpkg folder and run build3rdparty.cmd with the desired triplet

pdfium
pdfium-freetype

