mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 13:54:58 +08:00
CMake: allow for setting OCL/OGL versions when defined OCL/OGL headers
It fixes warnings from https://github.com/intel/compute-runtime/issues/496 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f7925b9f15
commit
670295e697
@@ -352,6 +352,10 @@ if(NOT DEFINED KHRONOS_HEADERS_DIR)
|
||||
else()
|
||||
message(FATAL_ERROR "Khronos OpenCL headers not available!")
|
||||
endif()
|
||||
elseif(DEFINED CL_TARGET_OPENCL_VERSION)
|
||||
add_definitions(-DCL_TARGET_OPENCL_VERSION=${CL_TARGET_OPENCL_VERSION})
|
||||
else()
|
||||
add_definitions(-DCL_TARGET_OPENCL_VERSION=300)
|
||||
endif()
|
||||
message(STATUS "Khronos OpenCL headers dir: ${KHRONOS_HEADERS_DIR}")
|
||||
set(OCL_HEADERS_DIR ${KHRONOS_HEADERS_DIR})
|
||||
@@ -362,6 +366,10 @@ if(NOT DEFINED KHRONOS_GL_HEADERS_DIR)
|
||||
set(KHRONOS_GL_HEADERS_DIR ${GL_DIR})
|
||||
add_definitions(-DGL_TARGET_OPENGL_VERSION=210)
|
||||
endif()
|
||||
elseif(DEFINED GL_TARGET_OPENGL_VERSION)
|
||||
add_definitions(-DGL_TARGET_OPENGL_VERSION=${GL_TARGET_OPENGL_VERSION})
|
||||
else()
|
||||
add_definitions(-DGL_TARGET_OPENGL_VERSION=210)
|
||||
endif()
|
||||
message(STATUS "Khronos OpenGL headers dir: ${KHRONOS_GL_HEADERS_DIR}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user