vc mfc 项目cmake配置,增加包含目录

CMakeLists.txt写入

cmake_minimum_required (VERSION 2.6)
project (test1)
set (test1_VERSION_MAJOR 1)
set (test1_VERSION_MINOR 0)
add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-D_AFXDLL)
include_directories(${test1_SOURCE_DIR})
include_directories(inc)
include_directories(src)
link_libraries(fltlib.lib)
set(CMAKE_MFC_FLAG 1)
set(
files
test1.cpp
test1.rc
test1Dlg.cpp
stdafx.cpp
)
add_executable(test1 WIN32 ${files})
link_directories(.)
link_directories(..)

# cmake --help-variable CMAKE_MFC_FLAG

你可能感兴趣的:(mfc,VC)