1

I am trying to import a library on windows that has different runtime versions. (/MD, /MT, ) both debug and release with cmake.

Does anyone know a solution?

the lib has

#mylib_md_debug.lib
#mylib_mt_debug.lib
#mylib_md_release.lib
#mylib_mt_release.lib

add_library(mylib STATIC IMPORTED)

set_target_properties(mylib PROPERTIES
IMPORTED_LOCATION $<$<CXX_COMPILER_ID:MSVC>:>???
panagiotis
  • 1,041
  • 7
  • 5
  • 1
    You might import each library individually, and set the `MSVC_RUNTIME_LIBRARY` accordingly, as seen [here](https://stackoverflow.com/a/56490614/3987854). – Kevin Jul 24 '20 at 11:32

0 Answers0