IF( WIN32 )
  cmake_minimum_required(VERSION 2.6.0)
  # Macro used to set include directories on windows.
  MACRO( STRIP_AND_ADD_LIBRARY_DIRECTORIES )
    FOREACH(TEMP_LIST_ITEM ${ARGV})
      STRING(REGEX REPLACE  "[/]([^/])*\\.lib$" "" TEMP_LINK_DIR ${TEMP_LIST_ITEM})
      STRING( COMPARE NOTEQUAL ${TEMP_LIST_ITEM} ${TEMP_LINK_DIR} LINK_STRING_NOT_EQUAL )
      IF( ${LINK_STRING_NOT_EQUAL} )
        LINK_DIRECTORIES( ${TEMP_LINK_DIR} )
      ENDIF( ${LINK_STRING_NOT_EQUAL} )
    ENDFOREACH(TEMP_LIST_ITEM ${ARGV})
  ENDMACRO( STRIP_AND_ADD_LIBRARY_DIRECTORIES )
ENDIF( WIN32 )
