From 680cf4bab75c3ac355226a85a79b7ac39e50d26c Mon Sep 17 00:00:00 2001 From: Xiao Qi Date: Tue, 1 Nov 2022 13:49:45 +0800 Subject: [PATCH] Removed solution, only project --- ModelCompileLibrary/premake5.lua | 71 ----------------- premake5.lua | 79 ++++++++++++++++--- .../src => src}/Libraries/SHMeshCompiler.cpp | 0 .../src => src}/Libraries/SHMeshCompiler.h | 0 .../src => src}/SHAssetMacros.h | 0 .../src => src}/Types/SHAnimationAsset.h | 0 .../src => src}/Types/SHMeshAsset.h | 0 {ModelCompileLibrary/src => src}/main.cpp | 0 8 files changed, 69 insertions(+), 81 deletions(-) delete mode 100644 ModelCompileLibrary/premake5.lua rename {ModelCompileLibrary/src => src}/Libraries/SHMeshCompiler.cpp (100%) rename {ModelCompileLibrary/src => src}/Libraries/SHMeshCompiler.h (100%) rename {ModelCompileLibrary/src => src}/SHAssetMacros.h (100%) rename {ModelCompileLibrary/src => src}/Types/SHAnimationAsset.h (100%) rename {ModelCompileLibrary/src => src}/Types/SHMeshAsset.h (100%) rename {ModelCompileLibrary/src => src}/main.cpp (100%) diff --git a/ModelCompileLibrary/premake5.lua b/ModelCompileLibrary/premake5.lua deleted file mode 100644 index cffb7e6..0000000 --- a/ModelCompileLibrary/premake5.lua +++ /dev/null @@ -1,71 +0,0 @@ -project "ModelCompileLibrary" - kind "ConsoleApp" - language "C++" - cppdialect "C++20" - targetdir (outputdir) - objdir (interdir) - systemversion "latest" - - files - { - "%{prj.location}/src/**.h", - "%{prj.location}/src/**.cpp", - } - - externalincludedirs - { - "%{IncludeDir.assimp}\\include" - } - - includedirs - { - "%{prj.location}/src", - } - - externalwarnings "Off" - - libdirs - { - "%{IncludeDir.assimp}/lib/Debug", - "%{IncludeDir.assimp}/lib/Release" - } - - flags - { - "MultiProcessorCompile" - } - - filter "configurations:Debug" - postbuildcommands - { - "xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Debug\\assimp-vc142-mtd.dll\" \"$(OutDir)\"" - } - - filter "configurations:Release" - postbuildcommands - { - "xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\"" - } - - filter "configurations:Publish" - postbuildcommands - { - "xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\"" - } - - warnings 'Extra' - - filter "configurations:Debug" - symbols "On" - defines {"_DEBUG"} - links{"assimp-vc142-mtd.lib"} - - filter "configurations:Release" - optimize "On" - defines{"_RELEASE"} - links{"assimp-vc142-mt.lib"} - - filter "configurations:Publish" - optimize "On" - defines{"_RELEASE, _PUBLISH"} - links{"assimp-vc142-mt.lib"} \ No newline at end of file diff --git a/premake5.lua b/premake5.lua index c4972c2..b986215 100644 --- a/premake5.lua +++ b/premake5.lua @@ -1,9 +1,14 @@ IncludeDir = {} -IncludeDir["assimp"] = "%{wks.location}\\Dependencies\\assimp" +IncludeDir["assimp"] = "%{wks.location}\\Dependencies\\assimp" -workspace "ModelCompileLibrary" - architecture "x64" - startproject "Assimp Compile Application" +project "ModelCompileLibrary" + kind "ConsoleApp" + language "C++" + cppdialect "C++20" + targetdir (outputdir) + objdir (interdir) + systemversion "latest" + configurations { @@ -11,13 +16,67 @@ workspace "ModelCompileLibrary" "Release", "Publish" } - - flags + + files { - "MultiProcessorCompile" + "%{prj.location}/src/**.h", + "%{prj.location}/src/**.cpp", + } + + externalincludedirs + { + "%{IncludeDir.assimp}\\include" } - outputdir = "%{wks.location}/bin/%{cfg.buildcfg}" - interdir = "%{wks.location}/bin_int" + includedirs + { + "%{prj.location}/src", + } - include "ModelCompileLibrary" \ No newline at end of file + externalwarnings "Off" + + libdirs + { + "%{IncludeDir.assimp}/lib/Debug", + "%{IncludeDir.assimp}/lib/Release" + } + + flags + { + "MultiProcessorCompile" + } + + filter "configurations:Debug" + postbuildcommands + { + "xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Debug\\assimp-vc142-mtd.dll\" \"$(OutDir)\"" + } + + filter "configurations:Release" + postbuildcommands + { + "xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\"" + } + + filter "configurations:Publish" + postbuildcommands + { + "xcopy /r /y /q \"%{IncludeDir.assimp}\\bin\\Release\\assimp-vc142-mt.dll\" \"$(OutDir)\"" + } + + warnings 'Extra' + + filter "configurations:Debug" + symbols "On" + defines {"_DEBUG"} + links{"assimp-vc142-mtd.lib"} + + filter "configurations:Release" + optimize "On" + defines{"_RELEASE"} + links{"assimp-vc142-mt.lib"} + + filter "configurations:Publish" + optimize "On" + defines{"_RELEASE, _PUBLISH"} + links{"assimp-vc142-mt.lib"} \ No newline at end of file diff --git a/ModelCompileLibrary/src/Libraries/SHMeshCompiler.cpp b/src/Libraries/SHMeshCompiler.cpp similarity index 100% rename from ModelCompileLibrary/src/Libraries/SHMeshCompiler.cpp rename to src/Libraries/SHMeshCompiler.cpp diff --git a/ModelCompileLibrary/src/Libraries/SHMeshCompiler.h b/src/Libraries/SHMeshCompiler.h similarity index 100% rename from ModelCompileLibrary/src/Libraries/SHMeshCompiler.h rename to src/Libraries/SHMeshCompiler.h diff --git a/ModelCompileLibrary/src/SHAssetMacros.h b/src/SHAssetMacros.h similarity index 100% rename from ModelCompileLibrary/src/SHAssetMacros.h rename to src/SHAssetMacros.h diff --git a/ModelCompileLibrary/src/Types/SHAnimationAsset.h b/src/Types/SHAnimationAsset.h similarity index 100% rename from ModelCompileLibrary/src/Types/SHAnimationAsset.h rename to src/Types/SHAnimationAsset.h diff --git a/ModelCompileLibrary/src/Types/SHMeshAsset.h b/src/Types/SHMeshAsset.h similarity index 100% rename from ModelCompileLibrary/src/Types/SHMeshAsset.h rename to src/Types/SHMeshAsset.h diff --git a/ModelCompileLibrary/src/main.cpp b/src/main.cpp similarity index 100% rename from ModelCompileLibrary/src/main.cpp rename to src/main.cpp