Skip to content

smartpcr/cpp-starter

Repository files navigation

Using cmake

Linux

  1. tools
sudo apt-get install build-essential g++ gdb cmake ninja-build

Windows

  1. tools

Dependency Management via vcpkg

install vcpkg

  1. On windows

    E:
    cd \
    git clone https://github.com/microsoft/vcpkg.git vcpkg && cd vcpkg && bootstrap-vcpkg.bat
    setx VCPKG_ROOT "E:\vcpkg"
    setx PATH "%PATH%;E:\vcpkg"
  2. On linux

    git clone https://github.com/microsoft/vcpkg.git vcpkg && cd vcpkg && ./bootstrap-vcpkg.sh
    export VCPKG_ROOT=$PWD
    echo "export VCPKG_ROOT=$PWD" >> ~/.zshrc
  3. create presets for windows and linux, see example in CMakePresets.json

  4. install packages, this should update vcpkg.json file

    vcpkg install fmt
    vcpkg install spdlog # https://github.com/gabime/spdlog
    vcpkg install gtest
    vcpkg install cpp-httplib # https://github.com/yhirose/cpp-httplib
    vcpkg install nlohmann-json # https://github.com/nlohmann/json
    vcpkg install jwt-cpp # https://github.com/Thalhammer/jwt-cpp

Goals

  1. how to use cmake for windows and linux
  2. manage dependencies using vcpkg
  3. implement logging and metrics
  4. use jwt for authentication
  5. use nlohmann-json for serialization
  6. implement rest api using httplib
  7. implement rest api using iis core on windows

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors