use stb as default image codec

This commit is contained in:
yyc12345 2023-09-06 15:17:39 +08:00
parent 7f67902bf5
commit 8a75eb9f21
4 changed files with 17 additions and 31 deletions

View File

@ -100,7 +100,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(FFMPEG_WIN32_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -119,7 +119,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(FFMPEG_WIN32_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -138,7 +138,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(FFMPEG_WIN64_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -159,7 +159,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(FFMPEG_WIN64_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>

View File

@ -2,31 +2,17 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros">
<FFMPEG_WIN32_HEADER_PATH>D:\CppLib\FFmpeg\Win32\include</FFMPEG_WIN32_HEADER_PATH>
<FFMPEG_WIN64_HEADER_PATH>D:\CppLib\FFmpeg\x64\include</FFMPEG_WIN64_HEADER_PATH>
<FFMPEG_WIN32_LIB_PATH>D:\CppLib\FFmpeg\Win32\lib</FFMPEG_WIN32_LIB_PATH>
<FFMPEG_WIN64_LIB_PATH>D:\CppLib\FFmpeg\x64\lib</FFMPEG_WIN64_LIB_PATH>
<STB_PATH>D:\CppLib\stb</STB_PATH>
<ZLIB_PATH>D:\zlib</ZLIB_PATH>
</PropertyGroup>
<PropertyGroup />
<ItemDefinitionGroup />
<ItemGroup>
<BuildMacro Include="FFMPEG_WIN32_HEADER_PATH">
<Value>$(FFMPEG_WIN32_HEADER_PATH)</Value>
</BuildMacro>
<BuildMacro Include="FFMPEG_WIN64_HEADER_PATH">
<Value>$(FFMPEG_WIN64_HEADER_PATH)</Value>
</BuildMacro>
<BuildMacro Include="FFMPEG_WIN32_LIB_PATH">
<Value>$(FFMPEG_WIN32_LIB_PATH)</Value>
</BuildMacro>
<BuildMacro Include="FFMPEG_WIN64_LIB_PATH">
<Value>$(FFMPEG_WIN64_LIB_PATH)</Value>
</BuildMacro>
<BuildMacro Include="ZLIB_PATH">
<Value>$(ZLIB_PATH)</Value>
</BuildMacro>
<BuildMacro Include="STB_PATH">
<Value>$(STB_PATH)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@ -73,7 +73,7 @@ This project require:
* The compiler supporting C++20
* Littile-endian architecture system.
* zlib
* FFmpeg (In Windows, download dev package in [there](https://github.com/yt-dlp/FFmpeg-Builds).)
* [stb](https://github.com/nothings/stb) (For image read / write)
* iconv (non-Windows system required)
It can be compiled on Windows via sln file, or on Linux platform via CMake file.

View File

@ -100,7 +100,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(FFMPEG_WIN32_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -108,7 +108,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>zlibwapi.lib;avcodec.lib;avformat.lib;avutil.lib;swscale.lib;avdevice.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>zlibwapi.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ZLIB_PATH)\contrib\vstudio\vc14\x86\ZlibDllReleaseWithoutAsm;$(SolutionDir)out\$(Platform)\$(Configuration)\LibCmo;$(FFMPEG_WIN32_LIB_PATH)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@ -120,7 +120,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(FFMPEG_WIN32_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -130,7 +130,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>zlibwapi.lib;avcodec.lib;avformat.lib;avutil.lib;swscale.lib;avdevice.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>zlibwapi.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ZLIB_PATH)\contrib\vstudio\vc14\x86\ZlibDllReleaseWithoutAsm;$(SolutionDir)out\$(Platform)\$(Configuration)\LibCmo;$(FFMPEG_WIN32_LIB_PATH)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@ -140,7 +140,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(FFMPEG_WIN64_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -148,7 +148,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>zlibwapi.lib;avcodec.lib;avformat.lib;avutil.lib;swscale.lib;avdevice.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>zlibwapi.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ZLIB_PATH)\contrib\vstudio\vc14\x64\ZlibDllReleaseWithoutAsm;$(SolutionDir)out\$(Platform)\$(Configuration)\LibCmo;$(FFMPEG_WIN64_LIB_PATH)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
@ -160,7 +160,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(FFMPEG_WIN64_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZLIB_PATH);../LibCmo;$(STB_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@ -170,7 +170,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>zlibwapi.lib;avcodec.lib;avformat.lib;avutil.lib;swscale.lib;avdevice.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>zlibwapi.lib;LibCmo.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(ZLIB_PATH)\contrib\vstudio\vc14\x64\ZlibDllReleaseWithoutAsm;$(SolutionDir)out\$(Platform)\$(Configuration)\LibCmo;$(FFMPEG_WIN64_LIB_PATH)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>