Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/clew.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,13 @@ int clewInit()
{
#ifdef _WIN32
const char *path = "OpenCL.dll";
const char *path2 = 0;
#elif defined(__APPLE__)
const char *path = "/Library/Frameworks/OpenCL.framework/OpenCL";
const char *path2 = 0;
#else
const char *path = "libOpenCL.so";
const char *path2 = "libOpenCL.so.1";
#endif

int error = 0;
Expand All @@ -177,6 +180,10 @@ int clewInit()

// Load library
module = CLEW_DYNLIB_OPEN(path);
if (module == NULL && path2 != 0)
{
module = CLEW_DYNLIB_OPEN(path2);
}

// Check for errors
if (module == NULL)
Expand Down