Jump to content
  • Advertisement
Sign in to follow this  
atulshanbhag

Help setup SDL2 for CLion(JetBrains) (uses CMake)

This topic is 1156 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Please give instructions to set up CLion for using SDL2 library.I am fairly new to CLion and this is also my first time with a full-fledged IDE, so I have very little experience. I am currently learning SDL2 and therefore need to set it up. I have absolutely no clue where to start from.

I have CLion with latest mingw but I do not know which of these to download SDL2-devel-2.0.3-VC.zip (Visual C++ 32/64-bit)
SDL2-devel-2.0.3-mingw.tar.gz (MinGW 32/64-bit) since Clion also uses CMake (like visual c++).

How do I edit the CMakeList? Please help.

 

Share this post


Link to post
Share on other sites
Advertisement

CMake can use either Visual Studio or mingw. I don't know which CLion uses, but you say you have CLion "with latest mingw" so you have CLion set up to use mingw? In that case you need the mingw version of SDL2.

 

You'll probably also want a FindSDL2.cmake file to put in the project's CMake/modules folder. I used this one https://code.google.com/p/dolphin-emu/source/browse/CMakeTests/FindSDL2.cmake but I think I've only tried it in Linux and OS X with Unix Makefiles so far.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!