From 4bbe8aa2ab70a6eb847ee5751735422d0ba623cd Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sat, 28 Sep 2019 12:27:53 +1000 Subject: [PATCH] Visual Studio 16 release-mode cmake fixup: libvcruntime.lib, msvcrt.lib --- build/cmake/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 6865d30..0310fcc 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -121,6 +121,8 @@ if (MSVC) target_compile_options (glew_s PRIVATE -GS-) # remove stdlib dependency target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) + target_link_libraries (glew LINK_PRIVATE libvcruntime.lib) + target_link_libraries (glew LINK_PRIVATE msvcrt.lib ) string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))) # remove stdlib dependency on windows with GCC and Clang (for similar reasons