From b684c129641a2439ae3e27026066d6aebee9739b Mon Sep 17 00:00:00 2001 From: woogerboy21 Date: Tue, 3 Oct 2017 09:23:33 -0400 Subject: [PATCH] Correct VS2017 Compile Issue (#2878) A line in the servatrice CMAKE file was removed in a prior commit causing a compile error in newer versions of visual studio. This returns the line. --- servatrice/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/servatrice/CMakeLists.txt b/servatrice/CMakeLists.txt index 95a827be..2e2b562f 100644 --- a/servatrice/CMakeLists.txt +++ b/servatrice/CMakeLists.txt @@ -109,7 +109,11 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Build servatrice binary and link it ADD_EXECUTABLE(servatrice MACOSX_BUNDLE ${servatrice_SOURCES} ${servatrice_RESOURCES_RCC} ${servatrice_MOC_SRCS}) -TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT}) +if(MSVC) + TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT} Qt5::WinMain) +else() + TARGET_LINK_LIBRARIES(servatrice cockatrice_common ${CMAKE_THREAD_LIBS_INIT}) +endif() qt5_use_modules(servatrice ${SERVATRICE_LIBS}) # install rules