summaryrefslogtreecommitdiff
path: root/indra/cmake/FindMono.cmake
blob: f0a0705481aaf21eaabef1708ff1cad59f48cbb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# - Try to find the mono, mcs, gmcs and gacutil
#
# defines
#
# MONO_FOUND - system has mono, mcs, gmcs and gacutil
# MONO_PATH - where to find 'mono'
# MCS_PATH - where to find 'mcs'
# GMCS_PATH - where to find 'gmcs'
# GACUTIL_PATH - where to find 'gacutil'
#
# copyright (c) 2007 Arno Rehn arno@arnorehn.de
#
# Redistribution and use is allowed according to the terms of the GPL license.
# Removed the check for gmcs

FIND_PROGRAM (MONO_EXECUTABLE mono
             "C:/Program Files/Mono-1.9.1/bin"
             "C:/Program Files/Mono-1.2.6/bin"
             /bin
             /usr/bin
             /usr/local/bin
)
FIND_PROGRAM (MCS_EXECUTABLE mcs
             "C:/Program Files/Mono-1.9.1/bin"
             "C:/Program Files/Mono-1.2.6/bin"
             /bin
             /usr/bin
             /usr/local/bin
)
FIND_PROGRAM (GMCS_EXECUTABLE gmcs
             "C:/Program Files/Mono-1.9.1/bin"
             "C:/Program Files/Mono-1.2.6/bin"
             /bin
             /usr/bin
             /usr/local/bin
)
FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
             "C:/Program Files/Mono-1.9.1/bin"
             "C:/Program Files/Mono-1.2.6/bin"
             /bin
             /usr/bin
             /usr/local/bin
)
FIND_PROGRAM (ILASM_EXECUTABLE
             ilasm
             NO_DEFAULT_PATH
             PATHS "C:/Program Files/Mono-1.9.1/bin" "C:/Apps/Mono-1.2.6/bin" "C:/Program Files/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin
)

SET (MONO_FOUND FALSE)

IF (MONO_EXECUTABLE AND MCS_EXECUTABLE AND GACUTIL_EXECUTABLE)
        SET (MONO_FOUND TRUE)
ENDIF (MONO_EXECUTABLE AND MCS_EXECUTABLE AND GACUTIL_EXECUTABLE)

IF (MONO_FOUND)
        IF (NOT Mono_FIND_QUIETLY)
                MESSAGE(STATUS "Found mono: ${MONO_EXECUTABLE}")
                MESSAGE(STATUS "Found mcs: ${MCS_EXECUTABLE}")
                MESSAGE(STATUS "Found gacutil: ${GACUTIL_EXECUTABLE}")
        ENDIF (NOT Mono_FIND_QUIETLY)
ELSE (MONO_FOUND)
        IF (Mono_FIND_REQUIRED)
                MESSAGE(FATAL_ERROR "Could not find one or more of the following programs: mono, mcs, gacutil")
        ENDIF (Mono_FIND_REQUIRED)
ENDIF (MONO_FOUND)

MARK_AS_ADVANCED(MONO_EXECUTABLE MCS_EXECUTABLE GACUTIL_EXECUTABLE)