This project is a C++ project called SolarSystemTour. It uses OpenGL, GLUT, GLU, GLEW, and glm libraries. This guide will help you set up the development environment on macOS, Windows, and Linux using CLion, Xcode, Visual Studio, and VSCode.
- CMake 3.16 or higher - CMake Releases 🛠️
- vcpkg (for managing dependencies) 📦
- Git - Git Downloads 🧰
- Compilers
- MinGW or MSVC (Windows) 🖥️
- GCC (Linux) 🐧
- Clang (macOS) 🍎
- Setup Guide
- Ninja Build tools (for VSCode) - Ninja Releases ⚙️
-
Download Ninja Build Tools:
- Go to the official Ninja releases page: Ninja Releases
- Download the latest
ninja-win.zipfile.
-
Extract the Zip File:
- Extract the contents of the
ninja-win.zipfile to a directory, e.g.,C:\ninja.
- Extract the contents of the
-
Add Ninja to the System PATH:
- Open the Start Menu and search for "Environment Variables".
- Click on "Edit the system environment variables".
- In the System Properties window, click on the "Environment Variables" button.
- Edit the "Path" variable and add
C:\ninja.
-
Verify Installation:
ninja --version
-
Open a terminal or command prompt.
-
Clone the repository recursively:
git clone --recurse-submodules https://github.com/TanmoyGG/SolarSystemTour.git cd SolarSystemTourOR (SSH)
git clone --recurse-submodules git@github.com:TanmoyGG/SolarSystemTour.git cd SolarSystemTour
-
Setup vcpkg (Linux or macOS):
cd external/vcpkg ./bootstrap-vcpkg.shSetup vcpkg (Windows):
cd external/vcpkg ./bootstrap-vcpkg.bat -
Add vcpkg to PATH:
- Temporary:
export VCPKG_ROOT=$(pwd) export PATH=$VCPKG_ROOT:$PATH
- Permanent:
Add
VCPKG_ROOTto environment variables.
-
Install Dependencies:
cd ../.. vcpkg install
To set up CLion for the project with vcpkg integration, follow these steps:
Make sure vcpkg is installed and the VCPKG_ROOT environment variable is set. To verify, run:
echo $VCPKG_ROOT- Launch CLion and select
Opento open the project directory.
-
Go to File > Settings > Build, Execution, Deployment > CMake.
-
Set the CMake options field to:
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmakeThis configures vcpkg as the package manager for the project.
- Click Apply and then OK.
- CLion will reload the project with the updated CMake options.
If you prefer a more integrated approach, you can use CLion's Vcpkg tool window to add and manage vcpkg.
- Go to Main Menu > View > Tool Windows > Vcpkg.
- Click the + button to add a new vcpkg repository.
- A window named Add Vcpkg Repository will pop up.
- Set the Name to
vcpkg. - The URL should auto-fill as
https://github.com/microsoft/vcpkg. - Set the Directory to
$HOME/.vcpkg-clion/vcpkg. - Add vcpkg integration to existing CMake profiles box should be checked.
- Debug should be checked under Add vcpkg integration to existing CMake profiles.
- Click OK to finish adding the repository. CLion will automatically sync with vcpkg and install any required dependencies.
-
Run script:
./scripts/generate_mac.sh
-
Open the project:
open build/SolarSystemTour.xcodeproj
-
Build and run.
-
Run script:
scripts\generate_windows.bat
-
Open the solution:
start build\SolarSystemTour.sln -
Build and run.
-
Ensure
.vscodehas:settings.jsontasks.jsonlaunch.jsonCMakePresets.json
-
Configure CMake:
Ctrl+Shift+P -> CMake: Configure -
Build:
CMake: Build
-
Debug:
Debug -> Start Debugging
./scripts/generate_linux.sh
cmake --build build
./build/SolarSystemTour./scripts/generate_mac.sh
cmake --build build
./build/SolarSystemTourscripts\generate_windows.bat
cmake --build build
build\SolarSystemTour.exe-
Fork the repository.
-
Create a new branch:
git checkout -b feature-branch
-
Commit changes:
git add . git commit -m "Description of changes"
-
Push changes:
git push origin feature-branch
-
Submit a pull request.
Follow these steps to set up and start developing the SolarSystemTour project on your preferred platform and IDE. 🚀