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 4c5fec7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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 4c5fec7

Please sign in to comment.