Skip to content

Commit

Permalink
Fix non-CUDA builds
Browse files Browse the repository at this point in the history
Signed-off-by: Gary Oberbrunner <[email protected]>
  • Loading branch information
garyo committed Dec 29, 2023
1 parent c5e920e commit 143d081
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Examples/GPUGain/GPUGain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 143d081

Please sign in to comment.