fixed darwin lib name
authordavilla <davilla@4pi.com>
Thu, 13 Oct 2011 06:39:48 +0000 (02:39 -0400)
committerdavilla <davilla@4pi.com>
Thu, 13 Oct 2011 06:39:48 +0000 (02:39 -0400)
include/cecloader.h

index ceba1e3db7358ffee787953bc848ab6ca78a6f05..9316befcfae81355bdcb47e3216665e04b2f1515 100644 (file)
@@ -79,10 +79,18 @@ CEC::ICECAdapter *LoadLibCec(const char *strName, CEC::cec_logical_address iLogi
 
   if (!g_libCEC)
   {
+#if defined(__APPLE__)
+    g_libCEC = dlopen("libcec.dylib", RTLD_LAZY);
+#else
     g_libCEC = dlopen("libcec.so", RTLD_LAZY);
+#endif
     if (!g_libCEC)
     {
+#if defined(__APPLE__)
+      cout << "cannot find libcec.dylib" << endl;
+#else
       cout << "cannot find libcec.so" << endl;
+#endif
       return NULL;
     }
   }