Add macOS support for CoreCLR by providing the native dylib name of SDL2 libraries

Fix Linux library name to match what's expected when just installing the
non-dev package of SDL2.
This commit is contained in:
Manu 2016-07-04 14:51:45 +09:00
Родитель 01848217d3
Коммит b40a78c222
6 изменённых файлов: 38 добавлений и 4 удалений

Просмотреть файл

@ -75,6 +75,27 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|macOS' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\macOS\Debug</OutputPath>
<DefineConstants>DEBUG;SDL_MACOS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|macOS' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\macOS\Release</OutputPath>
<DefineConstants>SDL_MACOS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>

Просмотреть файл

@ -9,10 +9,12 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Linux = Debug|Linux
Debug|macOS = Debug|macOS
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Linux = Release|Linux
Release|macOS = Release|macOS
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
@ -21,6 +23,8 @@ Global
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|Any CPU.Build.0 = Debug|Linux
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|Linux.ActiveCfg = Debug|Linux
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|Linux.Build.0 = Debug|Linux
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|macOS.ActiveCfg = Debug|macOS
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|macOS.Build.0 = Debug|macOS
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x64.ActiveCfg = Debug|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x64.Build.0 = Debug|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Debug|x86.ActiveCfg = Debug|x86
@ -29,6 +33,7 @@ Global
{85480198-8711-4355-830E-72FD794AD3F6}.Release|Any CPU.Build.0 = Release|Any CPU
{85480198-8711-4355-830E-72FD794AD3F6}.Release|Linux.ActiveCfg = Release|Linux
{85480198-8711-4355-830E-72FD794AD3F6}.Release|Linux.Build.0 = Release|Linux
{85480198-8711-4355-830E-72FD794AD3F6}.Release|macOS.ActiveCfg = Release|macOS
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x64.ActiveCfg = Release|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x64.Build.0 = Release|x64
{85480198-8711-4355-830E-72FD794AD3F6}.Release|x86.ActiveCfg = Release|x86

Просмотреть файл

@ -44,7 +44,9 @@ namespace SDL2
/// Used by DllImport to load the native library.
/// </summary>
#if SDL_LINUX
private const string nativeLibName = "libSDL2-2.0.so";
private const string nativeLibName = "libSDL2-2.0.so.0";
#elif SDL_MACOS
private const string nativeLibName = "libSDL2-2.0.0.dylib";
#else
private const string nativeLibName = "SDL2.dll";
#endif

Просмотреть файл

@ -39,7 +39,9 @@ namespace SDL2
/* Used by DllImport to load the native library. */
#if SDL_LINUX
private const string nativeLibName = "libSDL2_image-2.0.so";
private const string nativeLibName = "libSDL2_image-2.0.so.0";
#elif SDL_MACOS
private const string nativeLibName = "libSDL2_image-2.0.0.dylib";
#else
private const string nativeLibName = "SDL2_image.dll";
#endif

Просмотреть файл

@ -39,7 +39,9 @@ namespace SDL2
/* Used by DllImport to load the native library. */
#if SDL_LINUX
private const string nativeLibName = "libSDL2_mixer-2.0.so";
private const string nativeLibName = "libSDL2_mixer-2.0.so.0";
#elif SDL_MACOS
private const string nativeLibName = "libSDL2_mixer-2.0.0.dylib";
#else
private const string nativeLibName = "SDL2_mixer.dll";
#endif

Просмотреть файл

@ -39,7 +39,9 @@ namespace SDL2
/* Used by DllImport to load the native library. */
#if SDL_LINUX
private const string nativeLibName = "libSDL2_ttf-2.0.so";
private const string nativeLibName = "libSDL2_ttf-2.0.so.0";
#elif SDL_MACOS
private const string nativeLibName = "libSDL2_ttf-2.0.0.dylib";
#else
private const string nativeLibName = "SDL2_ttf.dll";
#endif