OpenAL: Move Windows binaries to lib folder and fix CMake detection

The module FindOpenAL is looking for the dll in a folder called lib, not x64.
This is only used on Windows x64, it's fine to remove the platform name.
This commit is contained in:
Florent Castelli 2017-02-03 04:50:12 +01:00
parent 8bd41ad606
commit 3842a9b71c
6 changed files with 9 additions and 6 deletions

View File

@ -484,6 +484,9 @@ else()
endif()
if(ENABLE_OPENAL)
if(WIN32)
set(ENV{OPENALDIR} ${CMAKE_CURRENT_LIST_DIR}/Externals/OpenAL)
endif()
find_package(OpenAL)
if(OPENAL_FOUND)
add_definitions(-DHAVE_OPENAL=1)

View File

@ -49,7 +49,7 @@
<BaseAddress>0x00400000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<FixedBaseAddress>true</FixedBaseAddress>
<AdditionalLibraryDirectories>$(ExternalsDir)ffmpeg\lib;$(ExternalsDir)OpenAL\$(PlatformName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ExternalsDir)ffmpeg\lib;$(ExternalsDir)OpenAL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>iphlpapi.lib;winmm.lib;setupapi.lib;opengl32.lib;glu32.lib;rpcrt4.lib;comctl32.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Windows</SubSystem>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/NODEFAULTLIB:libcmt</AdditionalOptions>
@ -219,7 +219,7 @@
<ItemGroup>
<DataSysFiles Include="$(DolphinRootDir)Data\**\Sys\**\*.*" />
<DataTxtFiles Include="$(DolphinRootDir)Data\*.txt" />
<ExternalDlls Include="$(ExternalsDir)OpenAL\$(PlatformName)\*.dll" />
<ExternalDlls Include="$(ExternalsDir)OpenAL\lib\*.dll" />
<BinaryFiles Include="$(TargetPath)" />
<AllInputFiles Include="@(DataSysFiles);@(DataTxtFiles);@(ExternalDlls);@(BinaryFiles)" />
</ItemGroup>

View File

@ -40,7 +40,7 @@
<BaseAddress>0x00400000</BaseAddress>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<FixedBaseAddress>true</FixedBaseAddress>
<AdditionalLibraryDirectories>$(ExternalsDir)ffmpeg\lib;$(ExternalsDir)OpenAL\$(PlatformName);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ExternalsDir)ffmpeg\lib;$(ExternalsDir)OpenAL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>iphlpapi.lib;winmm.lib;setupapi.lib;opengl32.lib;glu32.lib;rpcrt4.lib;comctl32.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/NODEFAULTLIB:libcmt %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">/NODEFAULTLIB:libcmt %(AdditionalOptions)</AdditionalOptions>
@ -291,7 +291,7 @@
<ItemGroup>
<DataSysFiles Include="$(DolphinRootDir)Data\**\Sys\**\*.*" />
<DataTxtFiles Include="$(DolphinRootDir)Data\license.txt" />
<ExternalDlls Include="$(ExternalsDir)OpenAL\$(PlatformName)\*.dll" />
<ExternalDlls Include="$(ExternalsDir)OpenAL\lib\*.dll" />
<BinaryFiles Include="$(TargetPath)" />
<AllInputFiles Include="@(DataSysFiles);@(DataTxtFiles);@(ExternalDlls);@(BinaryFiles)" />
</ItemGroup>

View File

@ -48,7 +48,7 @@
The following libs are needed since we pull in pretty much the entire
dolphin codebase.
-->
<AdditionalLibraryDirectories>$(ExternalsDir)OpenAL\$(PlatformName);$(ExternalsDir)ffmpeg\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ExternalsDir)OpenAL\lib;$(ExternalsDir)ffmpeg\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>iphlpapi.lib;winmm.lib;setupapi.lib;opengl32.lib;glu32.lib;rpcrt4.lib;comctl32.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/NODEFAULTLIB:libcmt %(AdditionalOptions)</AdditionalOptions>
@ -104,7 +104,7 @@
OutDir :)
-->
<ItemGroup>
<ExternalDlls Include="$(ExternalsDir)OpenAL\$(PlatformName)\*.dll" />
<ExternalDlls Include="$(ExternalsDir)OpenAL\lib\*.dll" />
</ItemGroup>
<!--Either method of running requires the runtime deps to be copied to pwd-->
<Target Name="CopyDeps" AfterTargets="AfterBuild" Inputs="@(ExternalDlls)" Outputs="@(ExternalDlls -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')">