1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 09:16:48 +00:00

Fix duplicate main in executable linking for Windows

This commit is contained in:
Louis M 2024-06-10 20:29:31 -04:00
parent 42c877f714
commit 94df40ecfe
2 changed files with 7 additions and 7 deletions

View file

@ -87,9 +87,9 @@ static void CheckConfig(void)
std::string dsqParam = ""; // fileSystem
std::string extraDataDir = "";
std::string appImageExtraDir = "";
const char *appImageDir = 0;
const char *appImageDir = nullptr;
const char *envPath = 0;
const char *envPath = nullptr;
#ifdef BBGE_BUILD_UNIX
envPath = getenv("AQUARIA_DATA_PATH");
if (envPath)

View file

@ -206,11 +206,7 @@ if(NOT SDL_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)
endif(AQUARIA_USE_SDL2)
if(MSYS)
set(SDL_LIBRARY -lmingw32 ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user
else(MSYS)
set(SDL_LIBRARY ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user
endif(MSYS())
else(MACOSX)
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
endif(MACOSX)
@ -813,5 +809,9 @@ ADD_EXECUTABLE(aquaria ${EXETYPE}
)
TARGET_LINK_LIBRARIES(aquaria ${OPTIONAL_LIBS})
IF(WIN32_TRUE)
SET(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-static")
ENDIF(WIN32_TRUE)
# end of CMakeLists.txt ...