PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/indra/cmake/FindMono.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 68 lines | 49 code | 5 blank | 14 comment | 0 complexity | 1c6ee7bd59d18052f21393a933dd65bd MD5 | raw file
 1# - Try to find the mono, mcs, gmcs and gacutil
 2#
 3# defines
 4#
 5# MONO_FOUND - system has mono, mcs, gmcs and gacutil
 6# MONO_PATH - where to find 'mono'
 7# MCS_PATH - where to find 'mcs'
 8# GMCS_PATH - where to find 'gmcs'
 9# GACUTIL_PATH - where to find 'gacutil'
10#
11# copyright (c) 2007 Arno Rehn arno@arnorehn.de
12#
13# Redistribution and use is allowed according to the terms of the GPL license.
14# Removed the check for gmcs
15
16FIND_PROGRAM (MONO_EXECUTABLE mono
17             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
18             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
19             /bin
20             /usr/bin
21             /usr/local/bin
22)
23FIND_PROGRAM (MCS_EXECUTABLE mcs
24             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
25             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
26             /bin
27             /usr/bin
28             /usr/local/bin
29)
30FIND_PROGRAM (GMCS_EXECUTABLE gmcs
31             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
32             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
33             /bin
34             /usr/bin
35             /usr/local/bin
36)
37FIND_PROGRAM (GACUTIL_EXECUTABLE gacutil
38             "$ENV{PROGRAMFILES}/Mono-1.9.1/bin"
39             "$ENV{PROGRAMFILES}/Mono-1.2.6/bin"
40             /bin
41             /usr/bin
42             /usr/local/bin
43)
44FIND_PROGRAM (ILASM_EXECUTABLE
45             NAMES ilasm.bat ilasm
46             NO_DEFAULT_PATH
47             PATHS "$ENV{PROGRAMFILES}/Mono-1.9.1/bin" "$ENV{PROGRAMFILES}/Mono-1.2.6/bin" /bin /usr/bin /usr/local/bin
48)
49
50SET (MONO_FOUND FALSE)
51
52IF (MONO_EXECUTABLE AND MCS_EXECUTABLE AND GACUTIL_EXECUTABLE)
53        SET (MONO_FOUND TRUE)
54ENDIF (MONO_EXECUTABLE AND MCS_EXECUTABLE AND GACUTIL_EXECUTABLE)
55
56IF (MONO_FOUND)
57        IF (NOT Mono_FIND_QUIETLY)
58                MESSAGE(STATUS "Found mono: ${MONO_EXECUTABLE}")
59                MESSAGE(STATUS "Found mcs: ${MCS_EXECUTABLE}")
60                MESSAGE(STATUS "Found gacutil: ${GACUTIL_EXECUTABLE}")
61        ENDIF (NOT Mono_FIND_QUIETLY)
62ELSE (MONO_FOUND)
63        IF (Mono_FIND_REQUIRED)
64                MESSAGE(FATAL_ERROR "Could not find one or more of the following programs: mono, mcs, gacutil")
65        ENDIF (Mono_FIND_REQUIRED)
66ENDIF (MONO_FOUND)
67
68MARK_AS_ADVANCED(MONO_EXECUTABLE MCS_EXECUTABLE GACUTIL_EXECUTABLE)