aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/MonoEmbed.cmake
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/cmake/MonoEmbed.cmake
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/cmake/MonoEmbed.cmake')
-rw-r--r--linden/indra/cmake/MonoEmbed.cmake57
1 files changed, 57 insertions, 0 deletions
diff --git a/linden/indra/cmake/MonoEmbed.cmake b/linden/indra/cmake/MonoEmbed.cmake
new file mode 100644
index 0000000..0f1f233
--- /dev/null
+++ b/linden/indra/cmake/MonoEmbed.cmake
@@ -0,0 +1,57 @@
1# -*- cmake -*-
2
3include(Prebuilt)
4use_prebuilt_binary(libmono)
5
6SET(GLIB_2_0 glib-2.0)
7
8if (WINDOWS)
9 SET(MONO_LIB mono)
10else (WINDOWS)
11 SET(MONO_LIB mono)
12 SET(M_LIBRARIES m)
13 SET(GTHREAD_2_0 gthread-2.0)
14endif(WINDOWS)
15
16
17IF (DARWIN)
18
19 FIND_LIBRARY(MONO_LIBRARY NAMES Mono)
20 # Find_file doesnt work as expected. Hardcode relative to Mono.framework.
21 #FIND_FILE(GLIB_CONFIG glibconfig.h ${MONO_LIBRARY})
22 #FIND_FILE(MONO_GLIB_LIBRARY glib.h ${MONO_LIBRARY})
23 SET(MONO_GLIB_LIBRARY ${MONO_LIBRARY}/Headers/glib-2.0/)
24 SET(GLIB_CONFIG ${MONO_LIBRARY}/Libraries/glib-2.0/include/)
25 SET(MONO_LIB_DIRECTORY ${MONO_LIBRARY}/Libraries)
26
27 IF (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
28 MESSAGE(STATUS "Found Mono for embedding")
29 INCLUDE_DIRECTORIES(${MONO_GLIB_LIBRARY} ${GLIB_CONFIG})
30 LINK_DIRECTORIES(${MONO_LIB_DIRECTORY})
31 ELSE (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
32 MESSAGE(FATAL_ERROR "Mono not found for embedding")
33 MESSAGE(${MONO_LIBRARY})
34 MESSAGE(${MONO_GLIB_LIBRARY})
35 MESSAGE(${GLIB_CONFIG})
36 ENDIF (MONO_LIBRARY AND MONO_GLIB_LIBRARY AND GLIB_CONFIG)
37
38ELSE (DARWIN)
39
40 SET(MONO_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
41 SET(GLIB_2_0_PLATFORM_INCLUDE_DIR
42 ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/glib-2.0)
43 SET(GLIB_2_0_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/glib-2.0)
44
45 INCLUDE_DIRECTORIES(
46 ${MONO_INCLUDE_DIR}
47 ${GLIB_2_0_PLATFORM_INCLUDE_DIR}
48 ${GLIB_2_0_INCLUDE_DIR})
49
50ENDIF (DARWIN)
51
52SET(MONO_LIBRARIES
53 ${MONO_LIB}
54 ${M_LIBRARIES}
55 ${GLIB_2_0}
56 ${GTHREAD_2_0}
57)