--- OpenShadingLanguage-Release-1.4.0.orig/src/cmake/flexbison.cmake	2013-11-25 18:41:29.000000000 +0000
+++ OpenShadingLanguage-Release-1.4.0/src/cmake/flexbison.cmake	2014-01-03 20:21:43.305332000 +0000
@@ -29,6 +29,8 @@
         # MESSAGE (STATUS "  src list now ${${srclist}}")
         # MESSAGE (STATUS "  compiler headers = ${${compiler_headers}}")
 
+        # Do not do this as it adds C:/msys64/include to the search path
+        # for all compilation.
         # Be really sure that we prefer the FlexLexer.h that comes with
         # the flex binary we're using, not some other one in the system.
         GET_FILENAME_COMPONENT ( FLEX_UP ${FLEX_EXECUTABLE} PATH )
@@ -37,7 +39,10 @@
         if (VERBOSE)
             message (STATUS "Flex include dir = ${FLEX_INCLUDE_DIR}")
         endif ()
-        include_directories ( ${FLEX_INCLUDE_DIR} )
+        # include_directories ( ${FLEX_INCLUDE_DIR} )
+        # Instead try ..
+        MESSAGE (STATUS "  FLEX_INCLUDE_DIR ${FLEX_INCLUDE_DIR}")
+        file(COPY ${FLEX_INCLUDE_DIR}/FlexLexer.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
 
         # include_directories ( ${CMAKE_CURRENT_BINARY_DIR} )
         include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} )
