代码拉取完成,页面将自动刷新
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)
#生成pdb
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Z7")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /POT:ICF")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /POT:ICF")
set(CMAKE_CONFIGURATION_TYPES "Release")
######################使用多处理器编译########################
if(MSVC)
OPTION(USE_MP "use multiple" ON)
OPTION(ProjectConfig_Global_COMPILE_FLAGS_WITH_MP
"Set The Global Option COMPILE_FLAGS /MP to target." ON)
if(ProjectConfig_Global_COMPILE_FLAGS_WITH_MP OR USE_MP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
set(VS_STARTUP_PROJECT ${PROJECT_NAME})
ENDIF(MSVC)
#set Qt dir
set(CMAKE_PREFIX_PATH $ENV{QTDIR5113_64})
#设置宽字符
add_definitions(-DUNICODE -D_UNICODE)
function(GetOutputDir dir)
if(WIN32)
set(dir ${PROJECT_SOURCE_DIR}/bin/Windows)
elseif(UNIX)
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
set(dir ${PROJECT_SOURCE_DIR}/bin/Uos)
else()
set(dir ${PROJECT_SOURCE_DIR}/bin/Ubuntu)
endif()
endif()
endfunction()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。