1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

CMake: multiple improvements for builds and project generation

- Change default build output directory name from "build" to "bin"
- Implement new function vcmi_get_cmake_debug_info
- Link client with SDL2main on Windows and disable debug console
- Remove all old MinGW-specific options since they outdated and MXE work fine
- Set AUTOGEN_TARGETS_FOLDER for better Xcode and Visual Studio projects
- Remove useless vcmitestFiles custom target for less garbage in project files
This commit is contained in:
Arseniy Shestakov
2017-08-11 05:31:23 +03:00
parent 56f89270db
commit 7dca95c8cc
6 changed files with 49 additions and 29 deletions

View File

@@ -219,9 +219,10 @@ static void SDLLogCallback(void* userdata,
logGlobal->debug("SDL(category %d; priority %d) %s", category, priority, message);
}
#if defined(VCMI_WINDOWS) && !defined (__GNUC__)
int wmain(int argc, wchar_t* argv[])
#elif defined(VCMI_APPLE) || defined(VCMI_ANDROID)
//#if defined(VCMI_WINDOWS) && !defined (__GNUC__)
//int wmain(int argc, wchar_t* argv[])
//#el
#if defined(VCMI_APPLE) || defined(VCMI_ANDROID)
int SDL_main(int argc, char *argv[])
#else
int main(int argc, char * argv[])

View File

@@ -133,6 +133,7 @@ if(WIN32)
OUTPUT_NAME "VCMI_client"
PROJECT_LABEL "VCMI_client"
)
target_link_libraries(vcmiclient ${SDLMAIN_LIBRARY})
endif()
target_link_libraries(vcmiclient vcmi ${Boost_LIBRARIES} ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLTTF_LIBRARY} ${ZLIB_LIBRARIES} ${FFMPEG_LIBRARIES} ${FFMPEG_EXTRA_LINKING_OPTIONS} ${SYSTEM_LIBS})