项目初始化
						commit
						be44a69100
					
				| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					out/
 | 
				
			||||||
 | 
					.vs/
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,23 @@
 | 
				
			||||||
 | 
					# CMakeList.txt: mazzGame 的 CMake 项目,在此处包括源代码并定义
 | 
				
			||||||
 | 
					# 项目特定的逻辑。
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					cmake_minimum_required (VERSION 3.8)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 如果支持,请为 MSVC 编译器启用热重载。
 | 
				
			||||||
 | 
					if (POLICY CMP0141)
 | 
				
			||||||
 | 
					  cmake_policy(SET CMP0141 NEW)
 | 
				
			||||||
 | 
					  set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					project ("mazzGame")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					aux_source_directory(${PROJECT_SOURCE_DIR}/src sourceCodeList)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 将源代码添加到此项目的可执行文件。
 | 
				
			||||||
 | 
					add_executable (mazzGame ${sourceCodeList})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if (CMAKE_VERSION VERSION_GREATER 3.12)
 | 
				
			||||||
 | 
					  set_property(TARGET mazzGame PROPERTY CXX_STANDARD 20)
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# TODO: 如有需要,请添加测试并安装目标。
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,101 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "version": 3,
 | 
				
			||||||
 | 
					    "configurePresets": [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "windows-base",
 | 
				
			||||||
 | 
					            "hidden": true,
 | 
				
			||||||
 | 
					            "generator": "Ninja",
 | 
				
			||||||
 | 
					            "binaryDir": "${sourceDir}/out/build/${presetName}",
 | 
				
			||||||
 | 
					            "installDir": "${sourceDir}/out/install/${presetName}",
 | 
				
			||||||
 | 
					            "cacheVariables": {
 | 
				
			||||||
 | 
					                "CMAKE_C_COMPILER": "cl.exe",
 | 
				
			||||||
 | 
					                "CMAKE_CXX_COMPILER": "cl.exe"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "condition": {
 | 
				
			||||||
 | 
					                "type": "equals",
 | 
				
			||||||
 | 
					                "lhs": "${hostSystemName}",
 | 
				
			||||||
 | 
					                "rhs": "Windows"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "x64-debug",
 | 
				
			||||||
 | 
					            "displayName": "x64 Debug",
 | 
				
			||||||
 | 
					            "inherits": "windows-base",
 | 
				
			||||||
 | 
					            "architecture": {
 | 
				
			||||||
 | 
					                "value": "x64",
 | 
				
			||||||
 | 
					                "strategy": "external"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "cacheVariables": {
 | 
				
			||||||
 | 
					                "CMAKE_BUILD_TYPE": "Debug"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "x64-release",
 | 
				
			||||||
 | 
					            "displayName": "x64 Release",
 | 
				
			||||||
 | 
					            "inherits": "x64-debug",
 | 
				
			||||||
 | 
					            "cacheVariables": {
 | 
				
			||||||
 | 
					                "CMAKE_BUILD_TYPE": "Release"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "x86-debug",
 | 
				
			||||||
 | 
					            "displayName": "x86 Debug",
 | 
				
			||||||
 | 
					            "inherits": "windows-base",
 | 
				
			||||||
 | 
					            "architecture": {
 | 
				
			||||||
 | 
					                "value": "x86",
 | 
				
			||||||
 | 
					                "strategy": "external"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "cacheVariables": {
 | 
				
			||||||
 | 
					                "CMAKE_BUILD_TYPE": "Debug"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "x86-release",
 | 
				
			||||||
 | 
					            "displayName": "x86 Release",
 | 
				
			||||||
 | 
					            "inherits": "x86-debug",
 | 
				
			||||||
 | 
					            "cacheVariables": {
 | 
				
			||||||
 | 
					                "CMAKE_BUILD_TYPE": "Release"
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "linux-debug",
 | 
				
			||||||
 | 
					            "displayName": "Linux Debug",
 | 
				
			||||||
 | 
					            "generator": "Ninja",
 | 
				
			||||||
 | 
					            "binaryDir": "${sourceDir}/out/build/${presetName}",
 | 
				
			||||||
 | 
					            "installDir": "${sourceDir}/out/install/${presetName}",
 | 
				
			||||||
 | 
					            "cacheVariables": {
 | 
				
			||||||
 | 
					                "CMAKE_BUILD_TYPE": "Debug"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "condition": {
 | 
				
			||||||
 | 
					                "type": "equals",
 | 
				
			||||||
 | 
					                "lhs": "${hostSystemName}",
 | 
				
			||||||
 | 
					                "rhs": "Linux"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "vendor": {
 | 
				
			||||||
 | 
					                "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
 | 
				
			||||||
 | 
					                    "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            "name": "macos-debug",
 | 
				
			||||||
 | 
					            "displayName": "macOS Debug",
 | 
				
			||||||
 | 
					            "generator": "Ninja",
 | 
				
			||||||
 | 
					            "binaryDir": "${sourceDir}/out/build/${presetName}",
 | 
				
			||||||
 | 
					            "installDir": "${sourceDir}/out/install/${presetName}",
 | 
				
			||||||
 | 
					            "cacheVariables": {
 | 
				
			||||||
 | 
					                "CMAKE_BUILD_TYPE": "Debug"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "condition": {
 | 
				
			||||||
 | 
					                "type": "equals",
 | 
				
			||||||
 | 
					                "lhs": "${hostSystemName}",
 | 
				
			||||||
 | 
					                "rhs": "Darwin"
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            "vendor": {
 | 
				
			||||||
 | 
					                "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
 | 
				
			||||||
 | 
					                    "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					// mazzGame.cpp: 定义应用程序的入口点。
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "mazzGame.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						std::cout << "Hello CMake." << std::endl;
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,8 @@
 | 
				
			||||||
 | 
					// mazzGame.h: 标准系统包含文件的包含文件
 | 
				
			||||||
 | 
					// 或项目特定的包含文件。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <iostream>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// TODO: 在此处引用程序需要的其他标头。
 | 
				
			||||||
		Loading…
	
		Reference in New Issue