Files
SingularityViewer/indra/cmake/FindJsonCpp.cmake
Aleric Inglewood fce64f8f12 Add LLWebProfile and responders.
Adds finding and using libjsoncpp. Note that the old cmake file
found libjson, not the same thing.

Adds Debug Setting WebProfileNonProductionURL (next to already existing
WebProfileURL) to mimic V3's behavior and use a different URL for aditi.
These Debug Settings are using by (the new) getProfileURL() (copied
from V3 with just a minor fix).

Adds HippoGridInfo::isInProductionGrid() next to the existing
LLViewerLogin::isInProductionGrid that always returned true.
The former should only be called SL grids and then only returns
true for agni (and false for aditi et al). The latter was changed
to now always return true except on SL when the grid isn't agni.
The first is used for SL-only cases, the latter for things like
colors and for godmode decision logic.

V3's llwebprofile.cpp was fixed to compile on singu, with only real
difference that I dropped the Content-Type headers for the GET methods.
2012-11-16 02:00:06 +01:00

40 lines
1.3 KiB
CMake

# -*- cmake -*-
# - Find JSONCpp
# Find the JSONCpp includes and library
# This module defines
# JSONCPP_FOUND, System has libjsoncpp.
# JSONCPP_INCLUDE_DIRS - The libjsoncpp include directories.
# JSONCPP_LIBRARIES - The libraries needed to use libjsoncpp.
# JSONCPP_DEFINITIONS - Compiler switches required for using libjsoncpp.
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_JSONCPP jsoncpp)
SET(JSONCPP_DEFINITIONS ${PC_JSONCPP_CFLAGS_OTHER})
FIND_PATH(JSONCPP_INCLUDE_DIR json/reader.h
HINTS ${PC_JSONCPP_INCLUDE_DIR} ${PC_JSONCPP_INCLUDE_DIRS}
PATH_SUFFIXES jsoncpp)
# Get the GCC compiler version
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE _gcc_COMPILER_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Try to find a library that was compiled with the same compiler version as we currently use.
FIND_LIBRARY(JSONCPP_LIBRARY
NAMES libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so libjsoncpp.so
HINTS ${PC_JSONCPP_LIBDIR} ${PC_JSONCPP_LIBRARY_DIRS}
PATHS /usr/lib /usr/local/lib)
SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
SET(JSONCPP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(JSONCPP DEFAULT_MSG
JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
MARK_AS_ADVANCED(JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)