macOS build fixes

This commit is contained in:
Jack Andersen 2018-10-18 14:56:27 -10:00
parent 9d91cd459e
commit a832504456
3 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # because of c++17
project(boo)
cmake_policy(SET CMP0074 NEW)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@ -21,6 +22,9 @@ if (IPP_FOUND)
include_directories(${IPP_INCLUDE_DIRS})
list(APPEND _BOO_SYS_INCLUDES ${IPP_INCLUDE_DIRS})
list(APPEND _BOO_SYS_LIBS ${IPP_LIBRARIES})
message(STATUS "Building with IPP support")
else()
message(WARNING "IPP not found; skipping support")
endif ()
set(WITH_LSR_BINDINGS OFF)

View File

@ -2,6 +2,7 @@
# Licence for this file: LGPL v2.1 See LICENCE for details.
cmake_minimum_required (VERSION 2.8 FATAL_ERROR)
cmake_policy(SET CMP0075 OLD)
#project (soxr C)
#set (DESCRIPTION_SUMMARY "High quality, one-dimensional sample-rate conversion library")

View File

@ -447,8 +447,6 @@ struct TestApplicationCallback : IApplicationCallback
#elif BOO_HAS_METAL
if (plat == IGraphicsDataFactory::Platform::Metal)
{
MetalDataFactory::Context& metalF = dynamic_cast<MetalDataFactory::Context&>(ctx);
static const char* VS =
"#include <metal_stdlib>\n"
"using namespace metal;\n"
@ -473,9 +471,11 @@ struct TestApplicationCallback : IApplicationCallback
" return tex.sample(samp, d.out_uv);\n"
"}\n";
pipeline = metalF.newShaderPipeline(VS, FS, nullptr, nullptr, vfmt,
BlendFactor::One, BlendFactor::Zero, Primitive::TriStrips,
boo::ZTest::LEqual, true, true, true, boo::CullMode::None);
auto vertexMetal = MetalDataFactory::CompileMetal(VS, PipelineStage::Vertex);
auto vertexShader = ctx.newShaderStage(vertexMetal, PipelineStage::Vertex);
auto fragmentMetal = MetalDataFactory::CompileMetal(FS, PipelineStage::Fragment);
auto fragmentShader = ctx.newShaderStage(fragmentMetal, PipelineStage::Fragment);
pipeline = ctx.newShaderPipeline(vertexShader, fragmentShader, descs, info);
} else
#endif
{}