- Install Visual Studio 2022 with C++ development tools for desktop
- Install vcpkg in a different directory than the project directory
git clone https://github.com/microsoft/vcpkg.git
.\bootstrap-vcpkg.bat
.\vcpkg.exe integrate install- Clone the whole project and update all submodules
git clone https://github.com/Pollak-Projects/EduCloud.git
git submodule update --init --recursive- Set up linker in Clion
Go toBuild, Execution, Deployment -> Toolchainsand addVisual Studiocompiler - Set up and build drogon
Note this only works on Windows x64
- Open the
drogonfolder in Clion - Copy and fill out
CMakeUserPresets.jsonaccording toCMakeUserPresets.json.example - Add your vcpkg directory to Clion
Pressdouble Shiftin Clion and search forvcpkgand add<your path>as the vcpkg directory - Reload the cmake project (you can find the cmake tab in the bottom left corner)
- Make sure
Debug Build Drogon-Visual Studiois selected as the cmake profile (you can find it in the top right corner) - Make sure
drogonis selected as the run configuration (you can find it in the top right corner) - Build
drogon - Add the following to your user and system
PATHenvironment variables
<your_path_to_EduCloud-Backend>\drogon\install\bin; <your_path_to_EduCloud-Backend>\drogon\install\lib\cmake\Drogon; <your_path_to_EduCloud-Backend>\drogon\install\lib\cmake\Trantor; <your_path_to_EduCloud-Backend>\drogon\build\vcpkg_installed\x64-windows\bin; <your_path_to_EduCloud-Backend>\drogon\build\vcpkg_installed\x64-windows\debug\bin;- Test by running
drogon_ctlin the terminal
- Open the
- Set up and build the project
- Open the
EduCloud-Backendfolder in Clion - Copy and fill out
CMakeUserPresets.jsonaccording toCMakeUserPresets.json.example - Add your vcpkg directory to Clion
Pressdouble Shiftin Clion and search forvcpkgand add<your path>as the vcpkg directory - Reload the cmake project (you can find the cmake tab in the bottom left corner)
- Make sure
Debug-Visual Studiois selected as the cmake profile (you can find it in the top right corner) - Make sure
EduCloud-Backendis selected as the run configuration (you can find it in the top right corner) - Build the project
- Run the project
- Test by going to
http://localhost:3300/in your browser - Don't forget to reload CMake when adding a new .h or .cpp file
- Open the
- cmake complaining about missing MSVC link
- drogon installation video link (Note: This is NOT for compiling by source like we do here)
- linker complaining link
Important:
THIS IS OUTDATED, PLEASE REFER TO THE NEW INSTALLATION GUIDE
You can find the new guide at the top of this file
The following is here for reference
-
Install visual studio 2022 with C++ development tools for desktop
-
Install vcpkg in a different directory than the project directory
git clone https://github.com/microsoft/vcpkg.git
.\bootstrap-vcpkg.bat
.\vcpkg.exe integrate install
- Add your vcpkg directory to Clion
Press double Shift in Clion and search for vcpkg and add <your path> as the vcpkg directory
- Install the required libraries
Run the project in Clion, and it will install the required libraries Shift + F10
This will take a while
- Set up linker in Clion
Go to Build, Execution, Deployment -> Toolchains and add the Visual Studio compiler
Then go to Build, Execution, Deployment -> CMake and set in Debug Toolchain to Visual Studio
- Set the styling in Clion
In Clion, go to Editor -> Code Style -> C/C++ and set Clion formatter to ClangFormat
- Set up
drogon_ctl
Add the following to your user PATH environment variable
<your_path_to_the_project_folder>\cmake-build-debug\vcpkg_installed\x64-windows\tools\drogon
<your_path_to_the_project_folder>\cmake-build-debug\vcpkg_installed\x64-windows\bin
<your_path_to_the_project_folder>\cmake-build-debug\vcpkg_installed\x64-windows\lib
<your_path_to_the_project_folder>\cmake-build-debug\vcpkg_installed\x64-windows\include
<your_path_to_the_project_folder>\cmake-build-debug\vcpkg_installed\x64-windows\share
<your_path_to_the_project_folder>\cmake-build-debug\vcpkg_installed\x64-windows\debug\bin
<your_path_to_the_project_folder>\cmake-build-debug\vcpkg_installed\x64-windows\debug\lib
-
Don't forget to reload CMake when adding a new .h or .cpp file
-
Run the project