Hey!
Working on a course final project (3d animations with opengl) and wanted to add sound with SDL2 (doing this in pairs, I have Windows and my partner has mac so I just figured PlaySound isn’t gonna work and SDL2 should be a better solution anyway)
Trying to build the project using cmake but for some reason seems like SDL_mixer doesn’t link properly as I get linking errors for SDL_mixer.h functions.
I’ve added the following to the cmakelist:
find_package(SDL2 REQUIRED)
include_directories(${SDL2_INCLUDE_DIRS})find_package(SDL2_mixer REQUIRED)
include_directories(${SDL2_MIXER_INCLUDE_DIRS})link_directories(${SDL2_LIBRARY_DIRS} ${SDL2_mixer_LIBRARY_DIRS})
target_link_libraries(${PROJECT_NAME}_bin ${SDL2_LIBRARIES} ${SDL2_mixer_LIBRARIES})
which made the IDE able to locate them but cmake still doesn’t budge,
any help?
Thanks!