dep/cubeb: Linux build fix

This commit is contained in:
Connor McLaughlin 2022-08-05 21:55:48 +10:00
parent a37c330f4b
commit 3cc020069b
11 changed files with 33 additions and 53 deletions

View file

@ -9,7 +9,6 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(BUILD_RUST_LIBS "Build rust backends" OFF)
option(BUNDLE_SPEEX "Bundle the speex library" OFF)
option(LAZY_LOAD_LIBS "Lazily load shared libraries" ON)
option(USE_SANITIZERS "Use sanitizers" ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
@ -20,19 +19,6 @@ set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(USE_SANITIZERS)
if(NOT COMMAND add_sanitizers)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/sanitizers-cmake/cmake")
find_package(Sanitizers)
if(NOT COMMAND add_sanitizers)
message(FATAL_ERROR "Could not find sanitizers-cmake: run\n\tgit submodule update --init --recursive\nin base git checkout")
endif()
endif()
else()
macro(add_sanitizers UNUSED)
endmacro()
endif()
if (BUILD_RUST_LIBS)
if(EXISTS "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs")
set(USE_PULSE_RUST 1)
@ -74,8 +60,6 @@ set_target_properties(cubeb PROPERTIES
SOVERSION ${cubeb_VERSION_MAJOR}
)
add_sanitizers(cubeb)
include(GenerateExportHeader)
generate_export_header(cubeb EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/exports/cubeb_export.h)
target_include_directories(cubeb

View file

@ -17,13 +17,13 @@
<ClInclude Include="src\cubeb_strings.h" />
<ClInclude Include="src\cubeb_utils.h" />
<ClInclude Include="src\cubeb_utils_win.h" />
<ClInclude Include="src\speex\arch.h" />
<ClInclude Include="src\speex\fixed_generic.h" />
<ClInclude Include="src\speex\resample_neon.h" />
<ClInclude Include="src\speex\resample_sse.h" />
<ClInclude Include="src\speex\speex_config_types.h" />
<ClInclude Include="src\speex\speex_resampler.h" />
<ClInclude Include="src\speex\stack_alloc.h" />
<ClInclude Include="subprojects\speex\arch.h" />
<ClInclude Include="subprojects\speex\fixed_generic.h" />
<ClInclude Include="subprojects\speex\resample_neon.h" />
<ClInclude Include="subprojects\speex\resample_sse.h" />
<ClInclude Include="subprojects\speex\speex_config_types.h" />
<ClInclude Include="subprojects\speex\speex_resampler.h" />
<ClInclude Include="subprojects\speex\stack_alloc.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\cubeb.c" />
@ -34,28 +34,24 @@
<ClCompile Include="src\cubeb_utils.cpp" />
<ClCompile Include="src\cubeb_wasapi.cpp" />
<ClCompile Include="src\cubeb_winmm.c" />
<ClCompile Include="src\speex\resample.c" />
<ClCompile Include="subprojects\speex\resample.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{72F9423C-91EE-4487-AAC6-555ED6F61AA1}</ProjectGuid>
</PropertyGroup>
<Import Project="..\msvc\vsprops\StaticLibrary.props" />
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<PreprocessorDefinitions>USE_WASAPI;USE_WINMM;OUTSIDE_SPEEX;FLOATING_POINT;RANDOM_PREFIX=speex;EXPORT=;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;$(ProjectDir)subprojects;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<Lib>
<AdditionalDependencies>ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<Import Project="..\msvc\vsprops\Targets.props" />
</Project>

View file

@ -2,27 +2,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClInclude Include="include\cubeb\cubeb.h" />
<ClInclude Include="src\speex\fixed_generic.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="src\speex\resample_neon.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="src\speex\resample_sse.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="src\speex\speex_config_types.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="src\speex\speex_resampler.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="src\speex\stack_alloc.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="src\speex\arch.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="include\cubeb\cubeb_export.h" />
<ClInclude Include="src\cubeb-internal.h" />
<ClInclude Include="src\cubeb-speex-resampler.h" />
@ -37,6 +16,27 @@
<ClInclude Include="src\cubeb_strings.h" />
<ClInclude Include="src\cubeb_utils.h" />
<ClInclude Include="src\cubeb_utils_win.h" />
<ClInclude Include="subprojects\speex\resample_neon.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="subprojects\speex\resample_sse.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="subprojects\speex\speex_config_types.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="subprojects\speex\speex_resampler.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="subprojects\speex\stack_alloc.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="subprojects\speex\arch.h">
<Filter>speex</Filter>
</ClInclude>
<ClInclude Include="subprojects\speex\fixed_generic.h">
<Filter>speex</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="speex">
@ -44,9 +44,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\speex\resample.c">
<Filter>speex</Filter>
</ClCompile>
<ClCompile Include="src\cubeb_wasapi.cpp" />
<ClCompile Include="src\cubeb_winmm.c" />
<ClCompile Include="src\cubeb.c" />
@ -55,5 +52,8 @@
<ClCompile Include="src\cubeb_resampler.cpp" />
<ClCompile Include="src\cubeb_strings.c" />
<ClCompile Include="src\cubeb_utils.cpp" />
<ClCompile Include="subprojects\speex\resample.c">
<Filter>speex</Filter>
</ClCompile>
</ItemGroup>
</Project>