CMAKE for / DEF and / NODEFAULTLIB

How to add the "DEF" and "NODEFAULTLIB" linker flags to the vs2012 project via CMAKE?

+4
source share
1 answer

You can add them to CMAKE_EXE_LINKER_FLAGS :

 if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEF:my_defs.def /NODEFAULTLIB") endif() 
+6
source

Source: https://habr.com/ru/post/1502047/


All Articles