CMAKE_MFC_FLAG.rst 481 B

12345678910111213141516
  1. CMAKE_MFC_FLAG
  2. --------------
  3. Tell cmake to use MFC for an executable or dll.
  4. This can be set in a ``CMakeLists.txt`` file and will enable MFC in the
  5. application. It should be set to ``1`` for the static MFC library, and ``2``
  6. for the shared MFC library. This is used in Visual Studio
  7. project files. The CMakeSetup dialog used MFC and the ``CMakeLists.txt``
  8. looks like this:
  9. ::
  10. add_definitions(-D_AFXDLL)
  11. set(CMAKE_MFC_FLAG 2)
  12. add_executable(CMakeSetup WIN32 ${SRCS})