修改项目为Cmake管理,添加spdlog和SDL两个库
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@ -2,6 +2,12 @@
|
||||
.vs/
|
||||
bin/
|
||||
bin-int/
|
||||
.idea/
|
||||
|
||||
|
||||
# Clion
|
||||
cmake-build-debug/
|
||||
cmake-build-release/
|
||||
|
||||
# Files
|
||||
*.user
|
||||
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
[submodule "Hazel/vendor/spdlog"]
|
||||
path = Hazel/vendor/spdlog
|
||||
url = https://github.com/gabime/spdlog
|
||||
[submodule "Hazel/vendor/SDL"]
|
||||
path = Hazel/vendor/SDL
|
||||
url = https://github.com/libsdl-org/SDL
|
||||
20
CMakeLists.txt
Normal file
20
CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(MyProject)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251")
|
||||
|
||||
add_subdirectory(Hazel/vendor/spdlog)
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin-int)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin-int)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
add_compile_options(/utf-8)
|
||||
|
||||
|
||||
add_subdirectory(Hazel)
|
||||
add_subdirectory(Sandbox)
|
||||
31
Hazel.sln
31
Hazel.sln
@ -1,31 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.13.35825.156 d17.13
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hazel", "Hazel\Hazel.vcxproj", "{849C6C03-8690-44EE-AD89-7022698623BC}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sandbox", "Sandbox\Sandbox.vcxproj", "{67A786AC-E29D-4DEC-9CD8-4654B86AB54A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{849C6C03-8690-44EE-AD89-7022698623BC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{849C6C03-8690-44EE-AD89-7022698623BC}.Debug|x64.Build.0 = Debug|x64
|
||||
{849C6C03-8690-44EE-AD89-7022698623BC}.Release|x64.ActiveCfg = Release|x64
|
||||
{849C6C03-8690-44EE-AD89-7022698623BC}.Release|x64.Build.0 = Release|x64
|
||||
{67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Debug|x64.Build.0 = Debug|x64
|
||||
{67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Release|x64.ActiveCfg = Release|x64
|
||||
{67A786AC-E29D-4DEC-9CD8-4654B86AB54A}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FAA4817D-A037-4E07-9AE8-B264EF56EEBF}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
28
Hazel/CMakeLists.txt
Normal file
28
Hazel/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
project(Hazel)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
||||
|
||||
add_library(Hazel SHARED ${SOURCES})
|
||||
|
||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries" FORCE)
|
||||
add_subdirectory(vendor/SDL)
|
||||
set(SDL3_SHARED ON CACHE BOOL "Build SDL as shared library" FORCE)
|
||||
|
||||
|
||||
target_include_directories(Hazel
|
||||
PUBLIC
|
||||
vendor/spdlog/include
|
||||
vendor/SDL/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src # 暴露头文件给其他项目
|
||||
)
|
||||
|
||||
|
||||
target_link_libraries(Hazel PUBLIC spdlog::spdlog SDL3::SDL3)
|
||||
|
||||
target_compile_definitions(Hazel PRIVATE HZ_BUILD_DLL)# 编译DLL时定义
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(Hazel PUBLIC HZ_PLATFORM_WINDOWS)# 编译DLL时定义
|
||||
endif ()
|
||||
|
||||
|
||||
@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\Hazel.h" />
|
||||
<ClInclude Include="src\Hazel\Application.h" />
|
||||
<ClInclude Include="src\Hazel\Core.h" />
|
||||
<ClInclude Include="src\Hazel\EntryPoint.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Hazel\Application.cpp" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{849c6c03-8690-44ee-ad89-7022698623bc}</ProjectGuid>
|
||||
<RootNamespace>Hazel</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)-$(Platform)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(SolutionDir)bin-int\$(Configuration)-$(Platform)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)bin\${Configuration)-$(Platform)\$(Project)\</OutDir>
|
||||
<IntDir>$(SolutionDir)bin-int\${Configuration)-$(Platform)\$(Project)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HZ_PLATFORM_WINDOWS;HZ_BUILD_DLL;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HZ_PLATFORM_WINDOWS;HZ_BUILD_DLL;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\Hazel\Core.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Hazel\Application.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Hazel.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Hazel\EntryPoint.h">
|
||||
<Filter>头文件</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\Hazel\Application.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// For use by Hazel Applications
|
||||
|
||||
#include "Hazel/Application.h"
|
||||
#include "Hazel/Log.h"
|
||||
|
||||
|
||||
// ------------------------ Entry Point ------------------------
|
||||
|
||||
@ -2,13 +2,9 @@
|
||||
|
||||
namespace Hazel {
|
||||
|
||||
Application::Application() {
|
||||
Application::Application() = default;
|
||||
|
||||
}
|
||||
|
||||
Application::~Application() {
|
||||
|
||||
}
|
||||
Application::~Application() = default;
|
||||
|
||||
void Application::Run() {
|
||||
while (true)
|
||||
|
||||
@ -2,14 +2,44 @@
|
||||
|
||||
#ifdef HZ_PLATFORM_WINDOWS
|
||||
|
||||
#include <stdio.h>
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
extern Hazel::Application* Hazel::CreateApplication();
|
||||
|
||||
int main(int argc, char** argv[]) {
|
||||
printf("hazel engine!");
|
||||
int main(int argc, char* argv[]) {
|
||||
Hazel::Log::init();
|
||||
|
||||
HZ_CORE_TRACE("hello");
|
||||
HZ_CORE_DEBUG("hello");
|
||||
HZ_CORE_INFO("hello");
|
||||
HZ_CORE_WARN("hello");
|
||||
HZ_CORE_ERROR("hello");
|
||||
HZ_CORE_FATAL("hello");
|
||||
|
||||
HZ_CLIENT_TRACE("hello");
|
||||
HZ_CLIENT_DEBUG("hello");
|
||||
HZ_CLIENT_INFO("hello");
|
||||
HZ_CLIENT_WARN("hello");
|
||||
HZ_CLIENT_ERROR("hello");
|
||||
HZ_CLIENT_FATAL("hello");
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
SDL_Window* window = SDL_CreateWindow("demo", 800, 600, 0);
|
||||
|
||||
bool should_quit = false;
|
||||
|
||||
while (!should_quit) {
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event)) {
|
||||
if (event.type == SDL_EVENT_QUIT) {
|
||||
should_quit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
auto app = Hazel::CreateApplication();
|
||||
app->Run();
|
||||
// app->Run();
|
||||
}
|
||||
|
||||
#endif // HZ_PLATFORM_WINDOWS
|
||||
|
||||
20
Hazel/src/Hazel/Log.cpp
Normal file
20
Hazel/src/Hazel/Log.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include "Log.h"
|
||||
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
|
||||
|
||||
namespace Hazel {
|
||||
|
||||
std::shared_ptr<spdlog::logger> Log::s_CoreLogger;
|
||||
std::shared_ptr<spdlog::logger> Log::s_ClientLogger;
|
||||
|
||||
void Log::init() {
|
||||
spdlog::set_pattern("%^[%T] %n: %v%$");
|
||||
s_CoreLogger = spdlog::stdout_color_mt("Hazel");
|
||||
s_CoreLogger->set_level(spdlog::level::trace);
|
||||
|
||||
s_ClientLogger = spdlog::stdout_color_mt("App");
|
||||
s_ClientLogger->set_level(spdlog::level::trace);
|
||||
|
||||
}
|
||||
}
|
||||
43
Hazel/src/Hazel/Log.h
Normal file
43
Hazel/src/Hazel/Log.h
Normal file
@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "Core.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
|
||||
|
||||
namespace Hazel {
|
||||
|
||||
|
||||
class HAZEL_API Log
|
||||
{
|
||||
public:
|
||||
|
||||
static void init();
|
||||
|
||||
inline static std::shared_ptr<spdlog::logger>& getCoreLogger() { return s_CoreLogger; }
|
||||
inline static std::shared_ptr<spdlog::logger>& getClientLogger() { return s_ClientLogger; }
|
||||
|
||||
private:
|
||||
static std::shared_ptr<spdlog::logger> s_CoreLogger;
|
||||
static std::shared_ptr<spdlog::logger> s_ClientLogger;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#define HZ_CORE_TRACE(...) ::Hazel::Log::getCoreLogger()->trace(__VA_ARGS__)
|
||||
#define HZ_CORE_DEBUG(...) ::Hazel::Log::getCoreLogger()->debug(__VA_ARGS__)
|
||||
#define HZ_CORE_INFO(...) ::Hazel::Log::getCoreLogger()->info(__VA_ARGS__)
|
||||
#define HZ_CORE_WARN(...) ::Hazel::Log::getCoreLogger()->warn(__VA_ARGS__)
|
||||
#define HZ_CORE_ERROR(...) ::Hazel::Log::getCoreLogger()->error(__VA_ARGS__)
|
||||
#define HZ_CORE_FATAL(...) ::Hazel::Log::getCoreLogger()->critical(__VA_ARGS__)
|
||||
|
||||
|
||||
#define HZ_CLIENT_TRACE(...) ::Hazel::Log::getClientLogger()->trace(__VA_ARGS__)
|
||||
#define HZ_CLIENT_DEBUG(...) ::Hazel::Log::getClientLogger()->debug(__VA_ARGS__)
|
||||
#define HZ_CLIENT_INFO(...) ::Hazel::Log::getClientLogger()->info(__VA_ARGS__)
|
||||
#define HZ_CLIENT_WARN(...) ::Hazel::Log::getClientLogger()->warn(__VA_ARGS__)
|
||||
#define HZ_CLIENT_ERROR(...) ::Hazel::Log::getClientLogger()->error(__VA_ARGS__)
|
||||
#define HZ_CLIENT_FATAL(...) ::Hazel::Log::getClientLogger()->critical(__VA_ARGS__)
|
||||
1
Hazel/vendor/SDL
vendored
Submodule
1
Hazel/vendor/SDL
vendored
Submodule
Submodule Hazel/vendor/SDL added at 9da46bc37f
1
Hazel/vendor/spdlog
vendored
Submodule
1
Hazel/vendor/spdlog
vendored
Submodule
Submodule Hazel/vendor/spdlog added at bb8694b50f
9
Sandbox/CMakeLists.txt
Normal file
9
Sandbox/CMakeLists.txt
Normal file
@ -0,0 +1,9 @@
|
||||
set(PROJECT_NAME "Sandbox")
|
||||
project(${PROJECT_NAME})
|
||||
|
||||
|
||||
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
||||
|
||||
add_executable(${PROJECT_NAME} ${SOURCES})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Hazel)
|
||||
@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{67a786ac-e29d-4dec-9cd8-4654b86ab54a}</ProjectGuid>
|
||||
<RootNamespace>Sandbox</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)-$(Platform)\$(ProjectName)\</OutDir>
|
||||
<IntDir>$(SolutionDir)bin-int\$(Configuration)-$(Platform)\$(ProjectName)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)bin\${Configuration)-$(Platform)\$(Project)\</OutDir>
|
||||
<IntDir>$(SolutionDir)bin-int\${Configuration)-$(Platform)\$(Project)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HZ_PLATFORM_WINDOWS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Hazel\src</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>HZ_PLATFORM_WINDOWS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Hazel\src</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Hazel\Hazel.vcxproj">
|
||||
<Project>{849c6c03-8690-44ee-ad89-7022698623bc}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\SandboxApp.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="源文件">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="头文件">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="资源文件">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\SandboxApp.cpp">
|
||||
<Filter>源文件</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,5 +1,6 @@
|
||||
#include <Hazel.h>
|
||||
|
||||
|
||||
class Sandbox : public Hazel::Application
|
||||
{
|
||||
public:
|
||||
@ -10,14 +11,9 @@ private:
|
||||
|
||||
};
|
||||
|
||||
Sandbox::Sandbox()
|
||||
{
|
||||
Sandbox::Sandbox() = default;
|
||||
|
||||
}
|
||||
|
||||
Sandbox::~Sandbox()
|
||||
{
|
||||
}
|
||||
Sandbox::~Sandbox() = default;
|
||||
|
||||
Hazel::Application* Hazel::CreateApplication() {
|
||||
return new Sandbox();
|
||||
|
||||
Reference in New Issue
Block a user