- 38 名前:蟻人間 mailto:sage [2021/06/16(水) 19:13:45.91 ID:Qk2ktN9D.net]
- >>35
/MT, /MD, /MTd, /MDdについてだが、CMake 3.15よりMSVC_RUNTIME_LIBRARYという変数が使えるらしい。 https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html https://stackoverflow.com/a/56490614 ターゲットを分けて、それぞれについてset_propertyすれば可能。 add_executable(foo1 foo.c) set_property(TARGET foo2 PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") add_executable(foo2 foo.c) set_property(TARGET foo2 PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDLL$<$<CONFIG:Debug>:Debug>") ... 3.15より前は、ちょっとややこしいコードになる。
|

|