Skip to content

Commit

Permalink
📝 Update CLion documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasGilg committed Jun 10, 2020
1 parent 8cf4252 commit d239c53
Showing 1 changed file with 61 additions and 44 deletions.
105 changes: 61 additions & 44 deletions docs/ide-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,94 +17,111 @@ Below you find some instructions on how to setup your preferred IDE for CosmoSco

### Linux

You have to add the following lines to the `clion.sh` file, which is located in you CLion `bin` folder:

```bash
export LD_LIBRARY_PATH=../lib:../lib/DriverPlugins:$LD_LIBRARY_PATH
export VISTACORELIBS_DRIVER_PLUGIN_DIRS=../lib/DriverPlugins
```

- (_optional_) If you want a debug build run `export COSMOSCOUT_DEBUG_BUILD=true`
- Run: `./make_externals.sh`
- Run: `./make.sh`
- Go to: _Settings_ -> _Build, Execution, Deployment_ -> _CMake_
- Release Profile
- _Generation path_: `build/linux-Release`
- _Build options_: `--parallel 8`
- _CMAKE options_:
- **Build Type**: `Release`
- **Generation path**: `build/linux-Release`
- **Build options**: `--parallel <your core count>`
- **Environment**: If you haven't set `BOOST_ROOT` as a system wide environment variable you need to set it here!
- **CMake options**:
```bash
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="<path to cosmoscout>/install/linux-Release"
-DCOSMOSCOUT_EXTERNALS_DIR="<path to cosmoscout>/install/linux-externals-Release"
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
```

- Debug Profile
- _Generation path_: `build/linux-Debug`
- _Build options_: `--parallel 8`
- _CMAKE options_:
- **Build Type**: `Debug`
- **Generation path**: `build/linux-Debug`
- **Build options**: `--parallel <your core count>`
- **Environment**: If you haven't set `BOOST_ROOT` as a system wide environment variable you need to set it here!
- **CMake options**:
```
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX="<path to cosmoscout>/install/linux-Debug"
-DCOSMOSCOUT_EXTERNALS_DIR="<path to cosmoscout>/install/linux-externals-Release"
-DCOSMOSCOUT_EXTERNALS_DIR="<path to cosmoscout>/install/linux-externals-Debug"
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
```
- Go to: _Run/Debug Configuration_ -> _CMake Application_ -> _cosmoscout_
- Release profile
- _Target_: `cosmoscout`
- _Executable_ -> _Select other_: `<path to cosmoscout>/install/linux-Release/bin/cosmoscout`
- _Program arguments_: `--settings=../share/config/simple_desktop.json -vista vista.ini`
- _Working directory_: `<path to cosmoscout>/install/linux-Release/bin`
- _Before launch_ -> __+__ -> _Install_
- **Target**: `cosmoscout`
- **Executable** -> _Select other_ -> `<path to cosmoscout>/install/linux-Release/bin/cosmoscout`
- **Program arguments**: `--settings=../share/config/simple_desktop.json -vista vista.ini`
- **Environment variables**: `LD_LIBRARY_PATH=../lib:../lib/DriverPlugins:$LD_LIBRARY_PATH;VISTACORELIBS_DRIVER_PLUGIN_DIRS=../lib/DriverPlugins`
- **Before launch** -> __--__ -> _Build_
- **Before launch** -> __+__ -> _Install_
- Debug profile
- _Target_: `cosmoscout`
- _Executable_ -> _Select other_: `<path to cosmoscout>/install/linux-Debug/bin/cosmoscout`
- _Program arguments_: `--settings=../share/config/simple_desktop.json -vista vista.ini`
- _Working directory_: `<path to cosmoscout>/install/linux-Debug/bin`
- _Before launch_ -> __+__ -> _Install_
- **Target**: `cosmoscout`
- **Executable** -> _Select other_ -> `<path to cosmoscout>/install/linux-Debug/bin/cosmoscout`
- **Program arguments**: `--settings=../share/config/simple_desktop.json -vista vista.ini`
- **Environment variables**: `LD_LIBRARY_PATH=../lib:../lib/DriverPlugins:$LD_LIBRARY_PATH;VISTACORELIBS_DRIVER_PLUGIN_DIRS=../lib/DriverPlugins`
- **Before launch** -> __--__ -> _Build_
- **Before launch** -> __+__ -> _Install_
### Windows
Currently CLion only supports debugging with MinGW and Cygwin. Sadly CosmoScout only runs on MSVC so only a release
build will be possible for now.
Following this restriction you need to install Visual Studio beforehand. If you are not bound to a specific version use
the latest Visual Studio.
You need to install Visual Studio beforehand. If you are not bound to a specific version use the latest Visual Studio.
The following will use `-G "Visual Studio 16 2019" -A x64` as the compilation target, you can replace it with your
highest available (and supported) version.
- (_optional_) If you want a debug build run `set COSMOSCOUT_DEBUG_BUILD=true`
- Run: `.\make_externals.bat -G "Visual Studio 16 2019" -A x64`
- Run: `.\make.bat -G "Visual Studio 16 2019" -A x64`
- Go to: _Settings_ -> _Build, Execution, Deployment_ -> _Toolchain_
- Add Visual Studio if it is not in the list yet. And make sure it is at the top.
- If Visual Studio is installed correctly everything else here should be set automagically.
- Go to: _Settings_ -> _Build, Execution, Deployment_ -> _CMake_
- Release Profile
- _Generation path_: `build\windows-Release`
- _Build options_: `--parallel 8`
- _CMAKE options_:
- **Build Type**: `Release`
- **Generation path**: `build\windows-Release`
- **Build options**: `--parallel <your core count>`
- **Environment**: If you haven't set `BOOST_ROOT` as a system wide environment variable you need to set it here!
- **CMake options**:
```
-DCMAKE_BUILD_TYPE=Release
-G "Visual Studio 16 2019" -A x64
-DCMAKE_INSTALL_PREFIX="<path to cosmoscout>\install\windows-Release"
-DCOSMOSCOUT_EXTERNALS_DIR="<path to cosmoscout>\install\windows-externals-Release"
```

- Debug Profile
- **Build Type**: `Debug`
- **Generation path**: `build\windows-Debug`
- **Build options**: `--parallel <your core count>`
- **Environment**: If you haven't set `BOOST_ROOT` as a system wide environment variable you need to set it here!
- **CMake options**:
```
-G "Visual Studio 16 2019" -A x64
-DCMAKE_INSTALL_PREFIX="<path to cosmoscout>\install\windows-Debug"
-DCOSMOSCOUT_EXTERNALS_DIR="<path to cosmoscout>\install\windows-externals-Debug"
```
- Go to: _Run/Debug Configuration_ -> _CMake Application_ -> _cosmoscout_
- _Target_: `cosmoscout`
- _Executable_ -> _Select other_: `<path to cosmoscout>\install\windows-Release\bin\cosmoscout.exe`
- _Program arguments_: `--settings=../share/config/simple_desktop.json -vista vista.ini`
- _Working directory_: `<path to cosmoscout>\install\windows-Release\bin`
- _Environment variables_: `VISTACORELIBS_DRIVER_PLUGIN_DIRS=..\lib\DriverPlugins;PATH=..\lib\;%PATH%`
- (If you haven't set `BOOST_ROOT` as a system wide environment variable you need to add that too here.)
- _Before launch_ -> __+__ -> _Install_
- Release profile
- **Target**: `cosmoscout`
- **Executable** -> _Select other_: `<path to cosmoscout>\install\windows-Release\bin\cosmoscout.exe`
- **Program arguments**: `--settings=../share/config/simple_desktop.json -vista vista.ini`
- **Environment variables**: `VISTACORELIBS_DRIVER_PLUGIN_DIRS=..\lib\DriverPlugins;PATH=..\lib\;%PATH%`
- **Before launch** -> __--__ -> _Build_
- **Before launch** -> __+__ -> _Install_
- Debug profile
- **Target**: `cosmoscout`
- **Executable** -> _Select other_: `<path to cosmoscout>\install\windows-Debug\bin\cosmoscout.exe`
- **Program arguments**: `--settings=../share/config/simple_desktop.json -vista vista.ini`
- **Environment variables**: `VISTACORELIBS_DRIVER_PLUGIN_DIRS=..\lib\DriverPlugins;PATH=..\lib\;%PATH%`
- **Before launch** -> __--__ -> _Build_
- **Before launch** -> __+__ -> _Install_
### Plugins
For CLion, we can recommended these plugins for the development of CosmoScout VR:
- [.gitignore](https://plugins.jetbrains.com/plugin/7495--ignore/)
- [Awesome Console](https://plugins.jetbrains.com/plugin/7677-awesome-console/)
- [CMake Simple Highlighter](https://plugins.jetbrains.com/plugin/10089-cmake-simple-highlighter)
- [CodeGlance](https://plugins.jetbrains.com/plugin/7275-codeglance/)
- [GitToolBox](https://plugins.jetbrains.com/plugin/7499-gittoolbox/)
- [GLSL Support](https://plugins.jetbrains.com/plugin/6993-glsl-support/)
- [Rainbow Brackets](https://plugins.jetbrains.com/plugin/10080-rainbow-brackets)
## <img src="https://simpleicons.org/icons/eclipseide.svg" alt="Simple Icons" width=24 height=18> Eclipse (Linux only)
Expand Down

0 comments on commit d239c53

Please sign in to comment.