project "Engine-Core"
	language "C++"
	cppdialect "C++17"
	systemversion "latest"
	kind "StaticLib"
	
	files 
	{
		"src/**.cpp",
		"include/**.h",
		"include/**.hpp",
		"vendor/imgui/imgui.cpp",
		"vendor/imgui/imgui_draw.cpp",
		"vendor/imgui/imgui_tables.cpp",
		"vendor/imgui/imgui_widgets.cpp",
		"vendor/imgui/imgui-SFML.cpp"
	}

	--visual studio--
	filter {"action:vs*", "system:windows"}
		targetdir (vs_corelibdir)
		objdir (vs_intdir)
		includedirs 
		{
			"src",
			vs_include_dir, 
			vs_sfmldir .. "/include", 
			vs_imguidir
		}

		libdirs {vs_sfmldir .."/lib"}

	filter {"action:vs*", "system:windows", "configurations:Debug"}
		postbuildcommands 
		{
			'{COPY} "%{prj.location}/vendor/sfml/lib/*.pdb" "%{cfg.targetdir}"'
		}

	--not visual studio --
  filter {"not action:vs*", "system:windows"}
    targetdir (corelibdir)
    objdir (intdir)
    includedirs 
    {
			"src",
			sfmldir .. "/include", 
      include_dir, 
      imguidir 
    }

		libdirs {sfmldir .."/lib"}

	--windows specific settings--
	filter{"system:windows"}
		defines {"PLATFORM_WINDOWS", "SFML_STATIC"}
		staticruntime "on"

	filter {"system:windows", "configurations:debug"}
		defines{"_DEBUG", "_CONSOLE"}
		links 
		{
			"sfml-main-d",
			"sfml-graphics-s-d",
			"sfml-window-s-d",
			"opengl32",
			"gdi32",
			"freetype",
			"sfml-audio-s-d",
			"flac",
			"vorbisfile",
			"vorbis",
			"ogg",
			"sfml-system-s-d",
			"winmm"
		}
		
	filter {"system:windows", "configurations:release"}
		defines{"NDEBUG"}
		links 
		{
			"sfml-main",
			"sfml-graphics-s",
			"sfml-window-s",
			"opengl32",
			"gdi32",
			"freetype",
			"sfml-audio-s",
			"flac",
			"vorbisfile",
			"vorbis",
			"ogg",
			"sfml-system-s",
			"winmm"
		}


  --linux specific settings--
	filter {"system:linux"}
		defines {"PLATFORM_LINUX"}
		targetdir (corelibdir)
		objdir (intdir)
    includedirs 
    {
			"src",
      include_dir, 
      imguidir 
    }
		
		links 
		{
			"sfml-graphics",
			"sfml-window",
			"sfml-audio",
			"sfml-system",
			"OpenGL",
		}

    
  --config settings--
  filter "configurations:debug"
    defines {"LOG_ENABLE", "CORE_DEBUG"}
		symbols "on"
		runtime "Debug"
		targetname "Core-d"

  filter "configurations:release"
    defines {"CORE_RELEASE"}
		optimize "Speed"
		inlining "Auto"
		symbols "off"
		runtime "Release"
		targetname "Core"