1CMAKE_MFC_FLAG
2--------------
3
4Use the MFC library for an executable or dll.
5
6Enables the use of the Microsoft Foundation Classes (MFC).
7It should be set to ``1`` for the static MFC library, and
8``2`` for the shared MFC library.  This is used in Visual Studio
9project files.
10
11Usage example:
12
13.. code-block:: cmake
14
15  add_definitions(-D_AFXDLL)
16  set(CMAKE_MFC_FLAG 2)
17  add_executable(CMakeSetup WIN32 ${SRCS})
18
19Contents of ``CMAKE_MFC_FLAG`` may use
20:manual:`generator expressions <cmake-generator-expressions(7)>`.
21