-
Notifications
You must be signed in to change notification settings - Fork 23
Build on any OS with CLion
Marcus Hudritsch edited this page Jan 12, 2021
·
20 revisions
- All C++ projects can also be built with the platform-independent IDE CLion from JetBrains. The advantage is that CLion uses cmake directly and does not create an additional project definition. For Windows without Visual Studio download the MinGW version with the GNU toolchain. For Windows, we recommend to build and work with Visual Studio.
- Clone the SLProject GIT repository into a directory of your choice.
- Open the CLion IDE.
- Choose Import Project from Sources on the Welcome screen.
- Select the top-level CMakeLists.txt file in the SLProject root folder.
- Choose Open Existing Project
- Wait for the configuration to complete.
- Press the Hammer Button on the top toolbar to build all projects.
- Press the Run Button on the top toolbar to run the selected app|configuration.
- The CLion defines by default only the Debug configuration. To define also the Release configuration you have to add a line the hidden file .idea/workspace.xml as follows:
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" ENABLED="true" />
<configuration PROFILE_NAME="Release" CONFIG_NAME="Release" ENABLED="true" />
</configurations>
</component>