...
 
Commits (2)
......@@ -16,4 +16,8 @@ CMakeLists.txt.user
src/config
/cmake-build-*
/build*
\ No newline at end of file
/build*
src/cmake-build-*
src/build*
\ No newline at end of file
# General information
This repository contains a basic project setup.
## Adding your own executables
You can add your own executable by creating a folder in *src/executables* and adding your source files. You have to copy the CMakeLists.txt from another executable. Afterwards rerun cmake.
## Adding your own libraries
You can add your own library by creating a folder in *src/libraries* and adding your source files. For libraries, all headers should be placed in a folder *libraryname/include/libraryname* and all source files in *libraryname/src* You have to copy the CMakeLists.txt from another library. Afterwards rerun cmake.
## Dependencies
You can specify dependencies by creating a file *depencies.txt* in your project directory. For examples, check the existing executables and libraries.
Dependencies are transitive, so if you include library A, that depends itself on library B, then your project will depend on library B automatically as well.
# IDEs
## Recommended IDEs
### Visual Studio Code
- https://code.visualstudio.com/
- Alternative Build without Microsoft Telemetry: https://github.com/VSCodium/vscodium
### CLion
- (https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
## Other IDEs
### Qt Creator
- https://www.qt.io/offline-installers
- Choose Qt Creator on the left side and download the appropriate binary
### Eclipse
- https://www.eclipse.org/downloads/
- Choose the C/C++ Installation
- Recent versions of Eclipse for C++ have been known to not work properly
# Setup
## Quick setup Mac OS X
NOCH ZU TESTEN!
Needs more testing!
- install dependencies via homebrew or macports (e.g. ```brew install homebrew/versions/glfw3 glm cmake assimp```)
### Clion setup
#### Clion setup (recommended)
- install dependencies via homebrew or macports (e.g. ```brew install homebrew/versions/glfw3 glm```)
- download and install [Clion IDE](https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
- click "Check out from Version Control" and clone the repository (```git@gitlab.uni-koblenz.de:cg/ss19cg3.git``` or ```https://gitlab.uni-koblenz.de/cg/ss19cg3.git```)
- click "Check out from Version Control" and clone the repository (```git@gitlab.uni-koblenz.de:cg/ss20cg3.git``` or ```https://gitlab.uni-koblenz.de/cg/ss20cg3.git```)
### Visual Studio Code setup (https://code.visualstudio.com/)
- Install extensions: C/C++ (ms-vscode.cpptools), CMake Tools (ms-vscode.cmake-tools)
- Open the repository's *src* folder in VS Code
- Follow the popup instructions to configure Intellisense
- *Ctrl + p* opens the command bar
- *CMake: Build* will build the project. You will be asked to select the appropriate compiler. Choose the one corresponding to your installation
- *CMake: Run without debugging* will run an executable that you can specify with *CMake: Set Debug Target*
### Console setup
#### Console setup
- install dependencies via homebrew or macports (e.g. ```brew install homebrew/versions/glfw3 glm```)
- clone repository to some place (with ```git clone git@gitlab.uni-koblenz.de:cg/ss19cg3.git``` or ```git clone https://gitlab.uni-koblenz.de/cg/ss19cg3.git```)
- clone repository to some place (with ```git clone git@gitlab.uni-koblenz.de:cg/ss20cg3.git``` or ```git clone https://gitlab.uni-koblenz.de/cg/ss20cg3.git```)
- prompt in CG3 folder and create a build folder: ```mkdir & cd build```
- run cmake ```cmake ..```
- type ```make```. To utilize more CPU-Cores you might add -jX to the make call. eg: ```make -j4```
### Qt Creator setup
- Open the *src/CMakeLists.txt* as a project
Happy Coding!
---
......@@ -22,37 +84,63 @@ Happy Coding!
- clone repository to some place
- download the dependencies (https://owncloud.uni-koblenz-landau.de/owncloud/s/AycR2askPsMMsyJ)
- **Important**: Supported Compilers are Visual Studio 17 and MinGW-w64 (https://mingw-w64.org/doku.php)
- SetEnvironment.bat sets environment variables: OpenGL_ROOT GLM_ROOT GLFW3_ROOT ASSIMP_ROOT
- run setup_win.bat to setup your project!
- - SetEnvironment.bat sets environment variables: OpenGL_ROOT GLM_ROOT GLFW3_ROOT ASSIMP_ROOT
- **Important**: Supported Compilers are Visual Studio 17 and MinGW-w64 (http://mingw-w64.org/doku.php)
- Recommended installation: MSys2
### Clion setup
- download and install [Clion IDE](https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
- Open the file *src/CMakeLists.txt* and choose *Open as Project*
### Visual Studio Code setup (https://code.visualstudio.com/)
- Install extensions: C/C++ (ms-vscode.cpptools), CMake Tools (ms-vscode.cmake-tools)
- Open the repository's *src* folder in VS Code
- Follow the popup instructions to configure Intellisense
- *Ctrl + p* opens the command bar
- *CMake: Build* will build the project. You will be asked to select the appropriate compiler. Choose the one corresponding to your installation (e.g. "GCC for x86_64-mingw32 9.2.0")
- *CMake: Run without debugging* will run an executable that you can specify with *CMake: Set Debug Target*
### Qt Creator setup
- Open the *src/CMakeLists.txt* as a project
Happy Coding!
---
## Quick setup Linux (dependencies for ubuntu)
Tested on Ubuntu 16.04 Should work very similar on different distributions
#### Clion setup
- use your package-manager to install the dependencies (GLM, GLFW, GLEW, assimp, Xrandr, Xi)
Ubuntu: ```sudo apt-get install libglm-dev libglfw3-dev libglew-dev libassimp-dev libxrandr-dev libxi-dev```
Tested on Ubuntu 18.04 Should work very similar on different distributions
### Clion setup
- use your package-manager to install the dependencies (GLM, GLFW, assimp, Xrandr, Xi)
Ubuntu: ```sudo apt-get install libglm-dev libglfw3-dev libassimp-dev libxrandr-dev libxi-dev```
- download and install [Clion IDE](https://www.jetbrains.com/clion/) (register with your ...@uni-koblenz.de address to get a free student license)
- click "Check out from Version Control" and clone the repository
- click "Check out from Version Control" and clone the repository or open the *src/CmakeLists.txt* from your already cloned repository
### Console setup
#### Console setup
- clone repository to some place
- use your package-manager to install the dependencies (GLM, GLFW, GLEW, assimp, Xrandr, Xi)
Ubuntu: ```sudo apt-get install libglm-dev libglfw3-dev libglew-dev libassimp-dev libxrandr-dev libxi-dev```
- use your package-manager to install the dependencies (GLM, GLFW, assimp, Xrandr, Xi)
Ubuntu: ```sudo apt-get install libglm-dev libglfw3-dev libassimp-dev libxrandr-dev libxi-dev```
- prompt in CG3 folder and execute the setup_linux.sh shellscript: "sh setup_linux.sh"
- chose your prefered IDE or generate make files.
### Qt Creator setup
- Open the *src/CMakeLists.txt* as a project
Happy Coding!
---
### Troubleshooting
If on Git clone you are prompted for a password like git@gitlab.com's password: something is wrong with your SSH setup. You can try to clone the repository with the https link (https://gitlab.uni-koblenz.de/cg/ss19cg3.git)
# Troubleshooting
If on Git clone you are prompted for a password like git@gitlab.com's password: something is wrong with your SSH setup. You can try to clone the repository with the https link (https://gitlab.uni-koblenz.de/cg/ss20cg3.git)
or you should ...
- ensure that you generated your SSH key pair correctly and added the public SSH key to your GitLab profile
- try manually registering your private SSH key using ssh-agent as documented earlier in this document
......