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:
parent
42c877f714
commit
94df40ecfe
2 changed files with 7 additions and 7 deletions
|
@ -87,9 +87,9 @@ static void CheckConfig(void)
|
||||||
std::string dsqParam = ""; // fileSystem
|
std::string dsqParam = ""; // fileSystem
|
||||||
std::string extraDataDir = "";
|
std::string extraDataDir = "";
|
||||||
std::string appImageExtraDir = "";
|
std::string appImageExtraDir = "";
|
||||||
const char *appImageDir = 0;
|
const char *appImageDir = nullptr;
|
||||||
|
|
||||||
const char *envPath = 0;
|
const char *envPath = nullptr;
|
||||||
#ifdef BBGE_BUILD_UNIX
|
#ifdef BBGE_BUILD_UNIX
|
||||||
envPath = getenv("AQUARIA_DATA_PATH");
|
envPath = getenv("AQUARIA_DATA_PATH");
|
||||||
if (envPath)
|
if (envPath)
|
||||||
|
|
|
@ -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(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 "${SDLDIR}/lib/win32/SDL.lib" CACHE FILEPATH "Where the SDL library can be found" FORCE)
|
||||||
endif(AQUARIA_USE_SDL2)
|
endif(AQUARIA_USE_SDL2)
|
||||||
if(MSYS)
|
set(SDL_LIBRARY ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user
|
||||||
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)
|
else(MACOSX)
|
||||||
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
|
message(SEND_ERROR "We don't have a prebuilt SDL for this platform.")
|
||||||
endif(MACOSX)
|
endif(MACOSX)
|
||||||
|
@ -813,5 +809,9 @@ ADD_EXECUTABLE(aquaria ${EXETYPE}
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(aquaria ${OPTIONAL_LIBS})
|
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 ...
|
# end of CMakeLists.txt ...
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue