Fixed: MFC can't be found

This commit is contained in:
kervala 2013-10-30 20:46:19 +01:00
parent 61f021f635
commit 588d262dbf

View file

@ -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