<div dir="ltr">Hello All,<div><br></div><div>I want to use CMake to manage my MFC projects, and I added the following code:<br><br></div><div>    set( CMAKE_MFC_FLAG 2)<br></div><div><div>    add_executable(MFCDemo WIN32</div><div>        ${MFC_RESOURCE_FILES}</div><div>        ${MFC_HEADER_FILES}</div><div>        ${MFC_SOURCE_FILES}</div><div>        )</div></div><div><div>    target_compile_definitions(MFCDemo</div><div>        PUBLIC -D_AFXDLL=1</div><div>        PUBLIC -D_UNICODE</div><div>        PUBLIC -DUNICODE</div><div>        )</div></div><div><br></div><div>It works.</div><div>However, my question is that: In addition to the MFC executable, I still have some non-MFC executables,</div><div>and once CMAKE_MFC_FLAG is set, all the add_executables' property should be "Use MFC in a Shared DLL".</div><div>In fact, I want only one MFC executable, and make sure all other executables are "Use Standard Windows Library".</div><div>Is there any way to implement it? It seems CMAKE_MFC_FLAG does not work with set_target_property or other commands.</div><div><br></div><div>Thanks,</div><div>Peixuan Zhang</div></div>