#WINDOWS 	= 	Windows Desktop
#WINRT 		= 	Windows RT
#WP8 	  	= 	Windows Phone 8
#ANDROID    =	Android
#IOS		=	iOS
#MACOSX		=	MacOS X
#LINUX      =   Linux
IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
	IF(WINRT)
		SET(SYSTEM_STRING "Windows RT")
	ELSEIF(WP8)
		SET(SYSTEM_STRING "Windows Phone 8")
	ELSE()
		SET(WINDOWS TRUE)
		SET(SYSTEM_STRING "Windows Desktop")
	ENDIF()
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "Android")
	IF(ANDROID)
	ELSE()
		SET(LINUX TRUE)
	ENDIF()
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
	SET(MAC_IOS TRUE)
	IF(IOS)
	ELSE()
		SET(MACOSX TRUE)
		SET(APPLE TRUE)
		SET(SYSTEM_STRING "Mac OSX")
	ENDIF()
ELSE()
	MESSAGE(FATAL_ERROR "Unknown build platform, CMake will exit. \"" ${CMAKE_SYSTEM_NAME} "\"")
ENDIF()

IF(LINUX)
	ADD_DEFINITIONS(-DPLATFORM_LINUX)
	SET(SYSTEM_STRING "Linux")
ELSEIF(ANDROID)
	ADD_DEFINITIONS(-DPLATFORM_ANDROID)
	SET(SYSTEM_STRING "Android")
ELSEIF(IOS)
	ADD_DEFINITIONS(-DPLATFORM_IOS)
	SET(SYSTEM_STRING "IOS")
ELSE()
ENDIF()

IF(CMAKE_CROSSCOMPILING)
	SET(BUILDING_STRING "It appears you are cross compiling for ${SYSTEM_STRING} with ${COMPILER_STRING}")
ELSE()
	SET(BUILDING_STRING "It appears you are builing natively for ${SYSTEM_STRING} with ${COMPILER_STRING}")
ENDIF()
