How do I add my libraries to the project?

Since CLion relies on CMake build system, you can do this with CMake commands. To add libraries to your project, use find_package (if you use separate libraries, for example, installed in the system) and target_link_libraries CMake commands. In target_link_libraries, specify either the variable generated by find_packages or library target name (if your library is also built by CMake and has the same parent project, so library target is accessible).

Find more details and samples in our Quick CMake Tutorial.




Whould be great if you could provide Clion + SDL solution, for beginners,

I checked JetBrains Quick Tutorial but i still can't handle it




P.S. to my previous message, your edit button ain't working.

i'm using linux


Pavlo, since CLion just works with CMake projects, all you need is to have a correct CMake project with SDL included. If it compiles correctly thought CMale, CLion will be able to run CMake on it and get all the necessary information.

This thread on SO has some useful information and links.


Please sign in to leave a comment.

Have more questions?

Submit a request