Browse Source

Define DYNLINK for MacOS X. Proper OpenCLLibName for this platform.

maciej-izak 7 years ago
parent
commit
63c8dff2f1
2 changed files with 7 additions and 1 deletions
  1. 6 1
      PasOpenCL/CL.pas
  2. 1 0
      PasOpenCL/OpenCL.inc

+ 6 - 1
PasOpenCL/CL.pas

@@ -70,7 +70,12 @@ const
   OpenCLLibName = 'libOpenCL.so';
 {$ENDIF}
 {$IFDEF DARWIN}
-  {$linkframework OpenCL}
+{$IFDEF DYNLINK}
+const
+  OpenCLLibName = '/usr/lib/libOpenCL.dylib';
+{$ELSE}
+{$linkframework OpenCL}
+{$ENDIF}
 {$ENDIF}
 
 {$IFDEF DEFINE_8087CW_NOT_IMPLEMENTED}

+ 1 - 0
PasOpenCL/OpenCL.inc

@@ -27,6 +27,7 @@
 {$DEFINE extdecl := cdecl}
 {$ENDIF}
 {$IFDEF DARWIN}
+{$DEFINE DYNLINK}
 {$DEFINE extdecl := cdecl}
 {$ENDIF}