diff options
author | Patrick Sapinski | 2010-08-24 03:04:20 -0400 |
---|---|---|
committer | McCabe Maxsted | 2010-08-30 17:04:59 -0700 |
commit | ded1245db74ae4c97d174c5779f8572ee2f032fa (patch) | |
tree | f42c33f233ed68e715a0ac4c74ddc043f43a68da /linden/indra/cmake/FindJsonCpp.cmake | |
parent | Added debug setting UseLegacyChatLogsFolder for saving chat.txt and IM logs i... (diff) | |
download | meta-impy-ded1245db74ae4c97d174c5779f8572ee2f032fa.zip meta-impy-ded1245db74ae4c97d174c5779f8572ee2f032fa.tar.gz meta-impy-ded1245db74ae4c97d174c5779f8572ee2f032fa.tar.bz2 meta-impy-ded1245db74ae4c97d174c5779f8572ee2f032fa.tar.xz |
added spellcheck + translation from Emerald Viewer. references to modularsystems.sl should be changed!
Diffstat (limited to '')
-rw-r--r-- | linden/indra/cmake/FindJsonCpp.cmake | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/linden/indra/cmake/FindJsonCpp.cmake b/linden/indra/cmake/FindJsonCpp.cmake new file mode 100644 index 0000000..cf84b30 --- /dev/null +++ b/linden/indra/cmake/FindJsonCpp.cmake | |||
@@ -0,0 +1,60 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | # - Find JSONCpp | ||
4 | # Find the JSONCpp includes and library | ||
5 | # This module defines | ||
6 | # JSONCPP_INCLUDE_DIR, where to find json.h, etc. | ||
7 | # JSONCPP_LIBRARIES, the libraries needed to use jsoncpp. | ||
8 | # JSONCPP_FOUND, If false, do not try to use jsoncpp. | ||
9 | # also defined, but not for general use are | ||
10 | # JSONCPP_LIBRARY, where to find the jsoncpp library. | ||
11 | |||
12 | FIND_PATH(JSONCPP_INCLUDE_DIR jsoncpp/json.h | ||
13 | /usr/local/include | ||
14 | /usr/include | ||
15 | ) | ||
16 | |||
17 | # Get the GCC compiler version | ||
18 | EXEC_PROGRAM(${CMAKE_CXX_COMPILER} | ||
19 | ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion | ||
20 | OUTPUT_VARIABLE _gcc_COMPILER_VERSION | ||
21 | OUTPUT_STRIP_TRAILING_WHITESPACE | ||
22 | ) | ||
23 | |||
24 | # Try to find a library that was compiled with the same compiler version as we currently use. | ||
25 | SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so) | ||
26 | IF (STANDALONE) | ||
27 | # On standalone, assume that the system installed library was compiled with the used compiler. | ||
28 | SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so) | ||
29 | ENDIF (STANDALONE) | ||
30 | FIND_LIBRARY(JSONCPP_LIBRARY | ||
31 | NAMES ${JSONCPP_NAMES} | ||
32 | PATHS /usr/lib /usr/local/lib | ||
33 | ) | ||
34 | |||
35 | IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR) | ||
36 | SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY}) | ||
37 | SET(JSONCPP_FOUND "YES") | ||
38 | ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR) | ||
39 | SET(JSONCPP_FOUND "NO") | ||
40 | ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR) | ||
41 | |||
42 | |||
43 | IF (JSONCPP_FOUND) | ||
44 | IF (NOT JSONCPP_FIND_QUIETLY) | ||
45 | MESSAGE(STATUS "Found JSONCpp: ${JSONCPP_LIBRARIES}") | ||
46 | ENDIF (NOT JSONCPP_FIND_QUIETLY) | ||
47 | ELSE (JSONCPP_FOUND) | ||
48 | IF (JSONCPP_FIND_REQUIRED) | ||
49 | MESSAGE(FATAL_ERROR "Could not find JSONCpp library") | ||
50 | ENDIF (JSONCPP_FIND_REQUIRED) | ||
51 | ENDIF (JSONCPP_FOUND) | ||
52 | |||
53 | # Deprecated declarations. | ||
54 | SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} ) | ||
55 | GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH) | ||
56 | |||
57 | MARK_AS_ADVANCED( | ||
58 | JSONCPP_LIBRARY | ||
59 | JSONCPP_INCLUDE_DIR | ||
60 | ) | ||