# Always include srcdir and builddir in include path
SET(CMAKE_INCLUDE_CURRENT_DIR ON)

# Put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources
# are preferred over the already installed ones
SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)

IF(WIN32 AND NOT (DEFINED WINDOWS_VERSION))
   SET(WINDOWS_VERSION 0x0501 CACHE STRING "Windows version") # 0x0501 corresponds to Windows XP
ENDIF()

IF(WIN32)
   SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
   SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
ENDIF()

IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
   SET(CMAKE_BUILD_TYPE RelWithDebInfo)
ENDIF()

IF(POLICY CMP0011)
   CMAKE_POLICY(SET CMP0011 NEW)
ENDIF()

IF(POLICY CMP0012)
   CMAKE_POLICY(SET CMP0012 NEW)
ENDIF()

IF(POLICY CMP0020)
   CMAKE_POLICY(SET CMP0020 NEW)
ENDIF()

IF(POLICY CMP0028)
   CMAKE_POLICY(SET CMP0028 NEW)
ENDIF()
