mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
MSVC Builds: Don't Link to SDL Automatically
Remove #pragma directives that causes any applications that use Cogl to link to the SDL libraries when Cogl was built with the SDL winsys. This is mainly due to the availability of both SDL-1.x and SDL-2.x support in the SDL winsys, where different libraries are linked for SDL-1.x and SDL-2.x. To avoid having to link to the SDL/SDL2 libraries when the application code is not directly using SDL/SDL2, define SDL_MAIN_HANDLED in the CFLAGS so that SDL's wrapper main() implementation will not be used when the application is being built. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit c3035912833eabe1f6dadbea23c78e595aac79dc)
This commit is contained in:
parent
b2d74eed58
commit
6feaaf2915
@ -52,15 +52,6 @@
|
||||
#include <cogl/cogl-onscreen.h>
|
||||
#include <SDL.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* We need to link to SDL.lib/SDLmain.lib
|
||||
* if we are using Cogl
|
||||
* that uses the SDL winsys
|
||||
*/
|
||||
#pragma comment (lib, "SDL.lib")
|
||||
#pragma comment (lib, "SDLmain.lib")
|
||||
#endif
|
||||
|
||||
COGL_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user