A few objects in the libmem windows-msvc static library use the wrong runtime library.
This leads to a warning at link time: LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs.
It's caused by:
In some places, I had used KEYSTONE_CMAKE_ARGS instead of CAPSTONE_CMAKE_ARGS.
The Capstone v4 CMakeLists.txt contains hardcoded /MT flags (this is clearly a mistake, and has been fixed in v5).
With this commit, the Capstone CMakeLists.txt is patched before calling ExternalProject_Add to void the hardcoded /MT flags.
This is a bit hacky, but it works. And it seems much easier than forking capstone only to change that.
I've tested all the scenarios now and everything works.
A few objects in the libmem windows-msvc static library use the wrong runtime library. This leads to a warning at link time:
LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs
.It's caused by:
KEYSTONE_CMAKE_ARGS
instead ofCAPSTONE_CMAKE_ARGS
.CMakeLists.txt
contains hardcoded/MT
flags (this is clearly a mistake, and has been fixed in v5).With this commit, the Capstone
CMakeLists.txt
is patched before callingExternalProject_Add
to void the hardcoded/MT
flags. This is a bit hacky, but it works. And it seems much easier than forking capstone only to change that.I've tested all the scenarios now and everything works.