From 68c38d452b736670b91c3f8a80804d076f7ccf6a Mon Sep 17 00:00:00 2001 From: dhewg Date: Fri, 20 Jul 2012 16:24:20 +0200 Subject: [PATCH] cmake: set SDL_BUILDING_LIBRARY for win32 and osx While that's a lie it makes FindSDL skip SDLmain, which we have in tree and compile ourselves. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 317099b..7f31a1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,10 @@ include_directories(${VORBISFILE_INCLUDE_DIR}) find_package(OpenAL REQUIRED) include_directories(${OPENAL_INCLUDE_DIR}) +if(APPLE OR WIN32) + # skip SDLmain + set(SDL_BUILDING_LIBRARY TRUE) +endif() find_package(SDL REQUIRED) include_directories(${SDL_INCLUDE_DIR})