diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index 07dd29f69b..0007ee3cc5 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -132,6 +132,18 @@ SET(wxWidgets_LIBRARIES "") SET(wxWidgets_LIBRARY_DIRS "") SET(wxWidgets_CXX_FLAGS "") +# Using SYSTEM with INCLUDE_DIRECTORIES in conjunction with wxWidgets on +# the Mac produces compiler errors. Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM +# to prevent UsewxWidgets.cmake from using SYSTEM. +# +# See cmake mailing list discussions for more info: +# http://www.cmake.org/pipermail/cmake/2008-April/021115.html +# http://www.cmake.org/pipermail/cmake/2008-April/021146.html +# +IF(APPLE) + SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1) +ENDIF(APPLE) + # DEPRECATED: This is a patch to support the DEPRECATED use of # wxWidgets_USE_LIBS. #