🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## cmake设置入口是main还是winmain ``` if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") add_executable(${PROJECT_OUTNAME} ${PROJECT_SOURCES}) elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") add_executable(${PROJECT_OUTNAME} WIN32 ${PROJECT_SOURCES}) #WIN32 So the console window does not open on Windows endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") ```