How do I add linker-flags "DEF" and "NODEFAULTLIB" to vs2012 project via CMAKE?
You can append them to CMAKE_EXE_LINKER_FLAGS
:
if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} /DEF:my_defs.def /NODEFAULTLIB")
endif()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With