Skip to content

Commit

Permalink
COMP: Fix GPUCommon compile errors
Browse files Browse the repository at this point in the history
C:\Dev\ITK-git\Modules\Core\GPUCommon\include\itkOpenCLUtil.h(40,12): fatal error C1083: Cannot open include file: 'CL/opencl.h': No such file or directory
  • Loading branch information
dzenanz committed May 18, 2022
1 parent 1548b38 commit 9e78df2
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Modules/Core/GPUCommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,14 @@ if(ITK_USE_GPU AND APPLE AND NOT ITK_COMPILER_HAS_BLOCKS)
endif()

if(ITK_USE_GPU)
set(ITKGPUCommon_LIBRARIES ITKGPUCommon ${OpenCL_LIBRARIES})
if(APPLE)
set(ITKGPUCommon_LIBRARIES ITKGPUCommon "-framework OpenCL")
list(APPEND ITKGPUCommon_LIBRARIES "-framework OpenCL")
elseif(WINDOWS)
set(ITKGPUCommon_LIBRARIES ITKGPUCommon cfgmgr32 OneCoreUAP)
else()
set(ITKGPUCommon_LIBRARIES ITKGPUCommon)
list(APPEND ITKGPUCommon_LIBRARIES cfgmgr32 OneCoreUAP)
endif()

set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS})

if(WINDOWS)
set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES} cfgmgr32 OneCoreUAP)
else()
set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES})
endif()
set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS})
endif()

if(NOT ITK_SOURCE_DIR)
Expand Down

0 comments on commit 9e78df2

Please sign in to comment.