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.

 

2 comments

Hi,

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

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

Cheers,

Pavlo

0

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

i'm using linux

0

Please sign in to leave a comment.

Have more questions?

Submit a request