From 6feaaf29154bfc59a19f0d75cb6dadd86915eeae Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 7 Apr 2014 13:44:36 +0800 Subject: [PATCH] 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 (cherry picked from commit c3035912833eabe1f6dadbea23c78e595aac79dc) --- cogl/cogl-sdl.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/cogl/cogl-sdl.h b/cogl/cogl-sdl.h index 220e00466..44d308db9 100644 --- a/cogl/cogl-sdl.h +++ b/cogl/cogl-sdl.h @@ -52,15 +52,6 @@ #include #include -#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 /**