From 588d262dbff793d0ea651e92dcb50284cf8fb827 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 30 Oct 2013 20:46:19 +0100 Subject: [PATCH] Fixed: MFC can't be found --- code/CMakeModules/FindCustomMFC.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/CMakeModules/FindCustomMFC.cmake b/code/CMakeModules/FindCustomMFC.cmake index 6f2f163d3..621bf49ae 100644 --- a/code/CMakeModules/FindCustomMFC.cmake +++ b/code/CMakeModules/FindCustomMFC.cmake @@ -8,14 +8,11 @@ IF(CustomMFC_FIND_REQUIRED) SET(MFC_FIND_REQUIRED TRUE) ENDIF(CustomMFC_FIND_REQUIRED) -# Try to find MFC using official module, MFC_FOUND is set -FIND_PACKAGE(MFC) - IF(NOT MFC_DIR) # If MFC have been found, remember their directory - IF(MFC_FOUND AND VC_DIR) + IF(VC_DIR) SET(MFC_STANDARD_DIR "${VC_DIR}/atlmfc") - ENDIF(MFC_FOUND AND VC_DIR) + ENDIF(VC_DIR) FIND_PATH(MFC_DIR include/afxwin.h @@ -45,6 +42,9 @@ IF(MFC_FOUND) # Set definitions for using MFC in DLL SET(MFC_DEFINITIONS -D_AFXDLL) + + # Set CMake flag to use MFC DLL + SET(CMAKE_MFC_FLAG 2) ENDIF(MFC_FOUND) # TODO: create a macro which set MFC_DEFINITIONS, MFC_LIBRARY_DIR and MFC_INCLUDE_DIR for a project