开发者

Setting up SDL on Visual Studio with CMake

开发者 https://www.devze.com 2023-01-25 13:12 出处:网络
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

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

精彩评论

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