Skip to content

Commit 040afb8

Browse files
author
oana.stanoi
committed
Link with "msvcr[n]" available on the system, instead of a specific hardcoded dependency
1 parent 65a769f commit 040afb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BackwardConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ if(WIN32)
216216
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--pdb= ")
217217
add_compile_options(-gcodeview)
218218
else()
219-
set(MINGW_MSVCR_LIBRARY "msvcr90$<$<CONFIG:DEBUG>:d>" CACHE STRING "Mingw MSVC runtime import library")
219+
find_library(MINGW_MSVCR_LIBRARY ucrtbase msvcr140 msvcr120 msvcr110 msvcr100 msvcr90 REQUIRED DOC "Mingw MSVC runtime import library")
220220
list(APPEND _BACKWARD_LIBRARIES ${MINGW_MSVCR_LIBRARY})
221221
endif()
222222
endif()

0 commit comments

Comments
 (0)