mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-24 13:45:47 +00:00
re-enable linking against SDLmain
This commit is contained in:
parent
827e8f2a4b
commit
5c6ed37b99
4 changed files with 9 additions and 20 deletions
|
@ -12,11 +12,6 @@
|
|||
|
||||
#define AQUARIA_CUSTOM_BUILD_ID ""
|
||||
|
||||
// no console window in release mode (note for MSVC: use together with linker SubSystem setting)
|
||||
#ifdef NDEBUG
|
||||
# define AQUARIA_WIN32_NOCONSOLE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ static void CheckConfig(void)
|
|||
}
|
||||
|
||||
|
||||
#if defined(BBGE_BUILD_WINDOWS) && defined(AQUARIA_WIN32_NOCONSOLE)
|
||||
#if defined(BBGE_BUILD_WINDOWS) && !defined(BBGE_BUILD_SDL)
|
||||
int WINAPI WinMain( HINSTANCE hInstance, // Instance
|
||||
HINSTANCE hPrevInstance, // Previous Instance
|
||||
LPSTR lpCmdLine, // Command Line Parameters
|
||||
|
@ -80,7 +80,7 @@ static void CheckConfig(void)
|
|||
|
||||
#else
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
extern "C" int main(int argc,char *argv[])
|
||||
{
|
||||
std::string dsqParam = ""; // fileSystem
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#ifdef BBGE_BUILD_SDL
|
||||
|
||||
#include "SDL.h"
|
||||
#undef main // SDL defines main to SDL_main. This is the only place where SDL.h is included, so this is ok.
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -12,12 +12,6 @@ IF(APPLE)
|
|||
SET(MACOSX TRUE)
|
||||
ENDIF(APPLE)
|
||||
|
||||
# HACK: in case mingw is not correctly detected, fix this.
|
||||
IF(${CMAKE_GENERATOR} MATCHES ".*[mM][iI][nN][gG][wW].*") # really ugly hack to match "mingw" case-insensitive
|
||||
set(MINGW 1)
|
||||
message(STATUS "MinGW detection hack - we are using MinGW")
|
||||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
OPTION(AQUARIA_NO_CONSOLE "No console window?" FALSE)
|
||||
ENDIF(WIN32)
|
||||
|
@ -128,21 +122,23 @@ OPTION(AQUARIA_INTERNAL_SDL "Always use included SDL library" FALSE)
|
|||
if(NOT AQUARIA_INTERNAL_SDL)
|
||||
find_package(SDL)
|
||||
endif(NOT AQUARIA_INTERNAL_SDL)
|
||||
if (NOT SDL_FOUND)
|
||||
if (NOT SDL_FOUND OR NOT SDLMAIN_FOUND)
|
||||
if(MACOSX)
|
||||
set(SDLDIR "${EXTLIBDIR}/SDL12")
|
||||
set(SDL_INCLUDE_DIR "${SDLDIR}/include")
|
||||
message(STATUS "Using internal copy of SDL")
|
||||
set(SDL_LIBRARY "${SDLDIR}/lib/macosx/libSDL-1.2.0.dylib")
|
||||
set(SDL_LIBRARY "${SDLDIR}/lib/macosx/libSDL-1.2.0.dylib;${SDLDIR}/lib/macosx/libSDLmain.a")
|
||||
elseif(WIN32)
|
||||
set(SDLDIR "${EXTLIBDIR}/SDL12")
|
||||
set(SDL_INCLUDE_DIR "${SDLDIR}/include" CACHE PATH "SDL include directory" FORCE)
|
||||
message(STATUS "Using internal copy of SDL")
|
||||
set(SDL_LIBRARY "${SDLDIR}/lib/win32/SDL.lib" CACHE PATH "Where the SDL library can be found")
|
||||
set(SDLMAIN_LIBRARY "${SDLDIR}/lib/win32/SDLmain.lib" CACHE FILEPATH "Where the SDLmain library can be found" FORCE)
|
||||
set(SDL_LIBRARY "${SDLDIR}/lib/win32/SDL.lib" CACHE FILEPATH "Where the SDL library can be found" FORCE)
|
||||
set(SDL_LIBRARY ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user
|
||||
else(MACOSX)
|
||||
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
|
||||
endif(MACOSX)
|
||||
endif (NOT SDL_FOUND)
|
||||
endif (NOT SDL_FOUND OR NOT SDLMAIN_FOUND)
|
||||
|
||||
### OpenAL
|
||||
|
||||
|
@ -216,7 +212,6 @@ IF(WIN32)
|
|||
ADD_DEFINITIONS(-DBBGE_BUILD_WINDOWS=1)
|
||||
IF(AQUARIA_NO_CONSOLE)
|
||||
SET(EXETYPE WIN32)
|
||||
ADD_DEFINITIONS(-DAQUARIA_WIN32_NOCONSOLE=1)
|
||||
ENDIF(AQUARIA_NO_CONSOLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
@ -419,7 +414,7 @@ SET(BBGE_SRCS_UNUSED
|
|||
${BBGEDIR}/PointSprites.cpp
|
||||
)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR MINGW)
|
||||
IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET_SOURCE_FILES_PROPERTIES(
|
||||
${BBGEDIR}/FmodOpenALBridge.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-fpermissive"
|
||||
|
|
Loading…
Reference in a new issue