diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ecf4a52..9e46cb10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -182,8 +182,8 @@ jobs: -DCMAKE_TOOLCHAIN_FILE=$(pwd)/$BUILD_DIR/generators/conan_toolchain.cmake \ -DCMAKE_POLICY_DEFAULT_CMP0091=NEW \ -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_EXAMPLE_PLUGINS=TRUE - -DOFX_SUPPORTS_OPENGLRENDER=TRUE + -DBUILD_EXAMPLE_PLUGINS=TRUE \ + -DOFX_SUPPORTS_OPENGLRENDER=TRUE \ -DOFX_SUPPORTS_CUDARENDER=$CUDA fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 12bc5664..26975ab6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.16.0) -if(APPLE) - project(openfx VERSION 1.4.0 LANGUAGES CXX) # no CUDA -else() +if(OFX_SUPPORTS_CUDARENDER AND NOT APPLE) project(openfx VERSION 1.4.0 LANGUAGES CXX CUDA) +else() + project(openfx VERSION 1.4.0 LANGUAGES CXX) # no CUDA endif() set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(CMAKE_CXX_STANDARD 14) diff --git a/Examples/GPUGain/GPUGain.cpp b/Examples/GPUGain/GPUGain.cpp index 8e60ce67..f907e4a7 100644 --- a/Examples/GPUGain/GPUGain.cpp +++ b/Examples/GPUGain/GPUGain.cpp @@ -46,13 +46,13 @@ GainExample::GainExample(OFX::ImageEffect& p_Instance) { } -#ifndef __APPLE__ +#ifdef OFX_SUPPORTS_CUDARENDER extern void RunCudaKernel(void* p_Stream, int p_Width, int p_Height, float* p_Gain, const float* p_Input, float* p_Output); #endif void GainExample::processImagesCUDA() { -#ifndef __APPLE__ +#ifdef OFX_SUPPORTS_CUDARENDER const OfxRectI& bounds = _srcImg->getBounds(); const int width = bounds.x2 - bounds.x1; const int height = bounds.y2 - bounds.y1;