Improve sdl (#1816)
* Allow libsdl_<libs> to work in static (or with statically built libsdl) * libsdl_image: Fix libsdl_image * Some fixes * Some fixes * More fixes * Fix SDL find defines * Update xmake.lua * Update xmake.lua * More fixes * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * fixes and logs * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua * improve sdl * pass freetype * fix sep * add verbose * Update xmake.lua * fix missing zlib * fix wasm * fix ttf * fix sdl_ttf * fix path * improve shared * revert ci * format * fix sdl gfx * fix sdl gfx * improve sdl ttf * fix gfx * improve sdl ttf * improve sdl ttf * improve sdl ttf * fix net * improve wasm and bsd * improve gfx * test * Update xmake.lua * fix gfx * port sdl gfx * export dll * Update xmake.lua --------- Co-authored-by: SirLynix <lynix680@gmail.com>pull/1831/head
parent
1342f3d21e
commit
cad11b9cac
8 changed files with 239 additions and 430 deletions
@ -1,176 +0,0 @@ |
||||
diff --git a/SDL2_gfx.sln b/SDL2_gfx.sln
|
||||
index 786f339..bd7635b 100644
|
||||
--- a/SDL2_gfx.sln
|
||||
+++ b/SDL2_gfx.sln
|
||||
@@ -15,12 +15,18 @@ Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
+ Debug|x64 = Debug|x64
|
||||
+ Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Release|Win32.Build.0 = Release|Win32
|
||||
+ {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
+ {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Debug|x64.Build.0 = Debug|x64
|
||||
+ {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Release|x64.ActiveCfg = Release|x64
|
||||
+ {AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}.Release|x64.Build.0 = Release|x64
|
||||
{AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AE22EFD3-6F6D-48C0-AF3D-EF190406BEDC}.Release|Win32.ActiveCfg = Release|Win32
|
||||
diff --git a/SDL2_gfx.vcxproj b/SDL2_gfx.vcxproj
|
||||
index e842d8a..4ae0cfa 100644
|
||||
--- a/SDL2_gfx.vcxproj
|
||||
+++ b/SDL2_gfx.vcxproj
|
||||
@@ -9,24 +9,42 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
+ <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">
|
||||
<ProjectGuid>{AE22EFD3-6E6D-48C0-AF3D-EF190406BEDC}</ProjectGuid>
|
||||
<RootNamespace>SDL2_gfx</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
- <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
- <PlatformToolset>v141</PlatformToolset>
|
||||
+ <PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
- <PlatformToolset>v141</PlatformToolset>
|
||||
+ <PlatformToolset>v142</PlatformToolset>
|
||||
+ </PropertyGroup>
|
||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
+ <CharacterSet>Unicode</CharacterSet>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
+ <PlatformToolset>v142</PlatformToolset>
|
||||
+ </PropertyGroup>
|
||||
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
+ <CharacterSet>Unicode</CharacterSet>
|
||||
+ <PlatformToolset>v142</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@@ -37,6 +55,12 @@
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
+ </ImportGroup>
|
||||
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
+ </ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
@@ -46,6 +70,12 @@
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
|
||||
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
|
||||
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
|
||||
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -104,6 +134,63 @@
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
+ <ClCompile>
|
||||
+ <Optimization>Disabled</Optimization>
|
||||
+ <AdditionalIncludeDirectories>..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORT;USE_MMX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <MinimalRebuild>true</MinimalRebuild>
|
||||
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
+ <PrecompiledHeader>
|
||||
+ </PrecompiledHeader>
|
||||
+ <WarningLevel>Level3</WarningLevel>
|
||||
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
+ </ClCompile>
|
||||
+ <Link>
|
||||
+ <AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalLibraryDirectories>..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
+ <GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
+ <SubSystem>Windows</SubSystem>
|
||||
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
+ <DataExecutionPrevention>
|
||||
+ </DataExecutionPrevention>
|
||||
+ <ImportLibrary>
|
||||
+ </ImportLibrary>
|
||||
+ <TargetMachine>MachineX64</TargetMachine>
|
||||
+ </Link>
|
||||
+ <PostBuildEvent>
|
||||
+ <Command>
|
||||
+ </Command>
|
||||
+ </PostBuildEvent>
|
||||
+ </ItemDefinitionGroup>
|
||||
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
+ <ClCompile>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <AdditionalIncludeDirectories>..\SDL2-2.0.5\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
+ <IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
+ <FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
+ <PrecompiledHeader>
|
||||
+ </PrecompiledHeader>
|
||||
+ <WarningLevel>Level3</WarningLevel>
|
||||
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
+ </ClCompile>
|
||||
+ <Link>
|
||||
+ <AdditionalDependencies>SDL2.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
+ <AdditionalLibraryDirectories>..\SDL2-2.0.5\VisualC\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
+ <GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
+ <SubSystem>Windows</SubSystem>
|
||||
+ <OptimizeReferences>true</OptimizeReferences>
|
||||
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
+ <TargetMachine>MachineX64</TargetMachine>
|
||||
+ </Link>
|
||||
+ <PostBuildEvent>
|
||||
+ <Command>
|
||||
+ </Command>
|
||||
+ </PostBuildEvent>
|
||||
+ </ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SDL2_framerate.c" />
|
||||
<ClCompile Include="SDL2_gfxPrimitives.c" />
|
||||
@@ -121,10 +208,12 @@
|
||||
<CustomBuildStep Include="ChangeLog">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
<CustomBuildStep Include="README">
|
||||
<FileType>Document</FileType>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</CustomBuildStep>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
@ -0,0 +1,15 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0aac377..94a44f4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -348,8 +348,8 @@ if(SDL2TTF_INSTALL)
|
||||
endif()
|
||||
# Only install a SDL2_ttf.pc file in Release mode
|
||||
install(CODE "
|
||||
- file(COPY_FILE \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_ttf-$<CONFIG>.pc\"
|
||||
- \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_ttf.pc\" ONLY_IF_DIFFERENT)
|
||||
+ file(COPY \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_ttf-$<CONFIG>.pc\"
|
||||
+ DESTINATION \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_ttf.pc\")
|
||||
file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${PC_DESTDIR}\"
|
||||
TYPE FILE
|
||||
FILES \"${CMAKE_CURRENT_BINARY_DIR}/SDL2_ttf.pc\")" CONFIG Release)
|
Loading…
Reference in new issue