My primary IDE is Visual Studio 10.0, so MSVC is my compiler. I'm building a CMake-based project, and need to install SDL and SDL_Mixer. What's the proper way to go about this, so CMake recognizes I have these 开发者_开发百科things installed?
Thanks!
To make sure your development machine will only compile if you have sdl set the REQUIRED flag on the find_package call like:
find_package ( SDL REQUIRED )
find_package ( SDL_mixer REQUIRED )
To make sure that SDL and SDL_mixer finds your install, set the environmental variables SDLDIR and SDLMIXERDIR to the correct directories. More information on the findSDL package can be found in the CMake documentation.
精彩评论