clion.rst 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. .. _doc_configuring_an_ide_clion:
  2. CLion
  3. =====
  4. `CLion <https://www.jetbrains.com/clion/>`_ is a commercial
  5. `JetBrains <https://www.jetbrains.com/>`_ IDE for C++.
  6. Importing the project
  7. ---------------------
  8. CLion requires a ``CMakeLists.txt`` file as a project file, which is problematic
  9. for Godot because it uses the SCons buildsystem instead of CMake. However,
  10. there is a ``CMakeLists.txt`` configuration for :ref:`Android Studio <doc_configuring_an_ide_android_studio>`
  11. which can also be used by CLion.
  12. - From the CLion's welcome window choose the option to import an existing
  13. project. If you've already opened another project, choose **File > Open**
  14. from the top menu.
  15. - Navigate to ``<Godot root directory>/platform/android/java/lib`` (the
  16. ``CMakeLists.txt`` file is located there) and select it (but *not* the
  17. ``CMakeLists.txt`` file itself), then click **OK**.
  18. .. figure:: img/clion_1_open.png
  19. :align: center
  20. The folder containing the ``CMakeLists.txt`` file.
  21. - If this popup window appears, select **This Window** to open the project:
  22. .. figure:: img/clion_2_this_window.png
  23. :align: center
  24. - Choose **Tools > CMake > Change Project Root** from the top menu and select
  25. the Godot root folder.
  26. .. figure:: img/clion_3_change_project_root.png
  27. :align: center
  28. - You should be now be able to see all the project files. Autocomplete should
  29. work once the project has finished indexing.
  30. If you run into any issues, ask for help in one of
  31. `Godot's community channels <https://godotengine.org/community>`__.