Skip to content

Commit cafa652

Browse files
committed
fix build on MacOS
1 parent 1cc6bc1 commit cafa652

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/core/qgsopenclutils.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,18 @@
1919
#define SIP_NO_FILE
2020

2121
#define CL_HPP_ENABLE_EXCEPTIONS
22+
23+
#include <QtGlobal>
24+
#ifdef Q_OS_MAC
25+
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
26+
#define CL_HPP_TARGET_OPENCL_VERSION 120
27+
#define CL_TARGET_OPENCL_VERSION 120
28+
#else
2229
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
2330
#define CL_HPP_TARGET_OPENCL_VERSION 220
2431
#define CL_TARGET_OPENCL_VERSION 200
32+
#endif
33+
2534
#include <CL/cl2.hpp>
2635

2736
#include "qgis_core.h"

0 commit comments

Comments
 (0)