SDL2_Mixer with Clion on Windows

Answered

I am trying to add sound to my program,

I am running Clion on Windows. And although every other SDL2 package works fine, the SDL2_Mixer is giving me a headache.

I have gotten the FindSDL2_mixer.cmake. However, when I load the CMakeLists.txt, CLion says:

 

include could not find load file:

E:/Network_Programming/BLADECARD/Cmake/FindPackageHandleStandardArgs.cmake

 

What the hell is "FindPackageHandleStandardArgs.cmake", there is no document anywhere say I have to install it first, so I have no idea what to do. Please help.

 

0
1 comment

Hello!

I would like to note that it's rather CMake's question than CLion's one.

The FindSDL2_mixer.cmake you're referring to contains the following lines:

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer REQUIRED_VARS SDL2_MIXER_LIBRARIES SDL2_MIXER_INCLUDE_DIRS VERSION_VAR SDL2_MIXER_VERSION_STRING)

Here is the Cmake documentation about the FindPackageHandleStandardArgs module: https://cmake.org/cmake/help/v3.11/module/FindPackageHandleStandardArgs.html.

You need to set the CMAKE_MODULE_PATH variable to the correct path (where FindPackageHandleStandardArgs.cmake can be found). Not sure what CMake you use, custom or bundled, but the bundled CMake includes FindPackageHandleStandardArgs.cmake (in <CLion installation directory>/bin/cmake/share/cmake-3.10/Modules).

0

Please sign in to leave a comment.