--- a/src/hugin1/base_wx/platform.h
+++ b/src/hugin1/base_wx/platform.h
@@ -29,7 +29,7 @@
 
 #include "panoinc_WX.h"
 
-#ifdef __WXMAC__
+#if defined __WXMAC__ && defined HUGIN_OSX_BUNDLED
 #include <CoreFoundation/CFString.h>
 #include <wx/mac/private.h>
 wxString MacGetPathTOBundledResourceFile(CFStringRef filename);