diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-14 17:28:44 +0100 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-14 17:28:44 +0100 |
commit | dc5a039f7bc2319b477346c835c2204f9ac17474 (patch) | |
tree | 24178ff1a1aa2c2944722a8f61da861141c4f6eb | |
parent | Implemented basic chat-component parsing (diff) | |
download | AltCraft-dc5a039f7bc2319b477346c835c2204f9ac17474.tar AltCraft-dc5a039f7bc2319b477346c835c2204f9ac17474.tar.gz AltCraft-dc5a039f7bc2319b477346c835c2204f9ac17474.tar.bz2 AltCraft-dc5a039f7bc2319b477346c835c2204f9ac17474.tar.lz AltCraft-dc5a039f7bc2319b477346c835c2204f9ac17474.tar.xz AltCraft-dc5a039f7bc2319b477346c835c2204f9ac17474.tar.zst AltCraft-dc5a039f7bc2319b477346c835c2204f9ac17474.zip |
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/main.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a6da6b1..cc8ba3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,9 +36,10 @@ if (CMAKE_COMPILER_IS_GNUCXX) set(PLATFORM_LIBRARIES "pthread" "stdc++fs") endif () -if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") -endif(MSVC) +if(MSVC AND CMAKE_BUILD_TYPE MATCHES Release) + target_compile_definitions(AltCraft PRIVATE USE_SDL_MAIN) + set_target_properties(AltCraft PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS") +endif(MSVC AND CMAKE_BUILD_TYPE MATCHES Release) target_link_libraries(AltCraft ${PLATFORM_LIBRARIES}) diff --git a/src/main.cpp b/src/main.cpp index 0e1a1ac..eac2417 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,7 +32,9 @@ void initLogger() { LOG(INFO) << "Logger is configured"; } +#ifndef USE_SDL_MAIN #undef main +#endif int main(int argc, char** argv) { srand(time(0)); |