message(STATUS "Looking for mono...")
find_path(mono_HEADERS "mono/jit/jit.h" HINTS "/usr/include" "C:\\Program Files\\Mono\\include" "/Library/Frameworks/Mono.framework/Versions/Current/include" PATH_SUFFIXES "mono-2.0")
set(mono_LIBRARY_HINTS "/usr/lib" "C:\\Program Files\\Mono\\lib" "/Library/Frameworks/Mono.framework/Versions/Current/lib")
find_library(mono_LIBRARIES NAMES monosgen-2.0 mono-2.0-sgen HINTS ${mono_LIBRARY_HINTS})
find_path(mono_ASSEMBLIES "mono/4.5" HINTS ${mono_LIBRARY_HINTS})
set(mono_FOUND ${mono_HEADERS} AND ${mono_LIBRARIES} AND ${mono_ASSEMBLIES})
if(WIN32)
    find_file(mono_DLL NAMES mono-2.0-sgen.dll HINTS "C:\\Program Files\\Mono\\bin")
    set(mono_FOUND ${mono_FOUND} AND ${mono_DLL})
endif()
if(mono_FOUND)
    message(STATUS "Found mono headers: ${mono_HEADERS}")
    message(STATUS "Found mono libraries: ${mono_LIBRARIES}")
    message(STATUS "Found mono assemblies: ${mono_ASSEMBLIES}")
    if(WIN32)
        message(STATUS "Found mono DLL: ${mono_DLL}")
    endif()
else()
    message(FATAL_ERROR "Could not find mono!")
endif()
