开发者

Setting up SDL on Visual Studio with CMake

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜