Build against system libjsoncpp
authorMike Hommey <mh@glandium.org>
Tue, 9 May 2017 08:41:13 +0000 (10:41 +0200)
committerCarsten Schoenert <c.schoenert@t-online.de>
Wed, 27 Mar 2019 17:22:51 +0000 (17:22 +0000)
Gbp-Pq: Topic debian-hacks
Gbp-Pq: Name Build-against-system-libjsoncpp.patch

config/system-headers.mozbuild
toolkit/components/jsoncpp/src/lib_json/moz.build
toolkit/crashreporter/minidump-analyzer/moz.build

index 0872969ae1593d4961136d260a5aeb0c20d86670..ac7c2687658569833275ee4a77ea56f028c6b870 100644 (file)
@@ -363,6 +363,7 @@ system_headers = [
     'jar-ds.h',
     'jarfile.h',
     'jar.h',
+    'json/json.h',
     'JavaControl.h',
     'JavaEmbedding/JavaControl.h',
     'JavaVM/jni.h',
index 6920229e1ea1f0912815b74a67414960880f9817..5e20a3d42fd9f60b4fc80a09b127545e2ac643d5 100644 (file)
@@ -4,50 +4,6 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-UNIFIED_SOURCES += [
-    'json_reader.cpp',
-    'json_value.cpp',
-    'json_writer.cpp'
-]
-
-LOCAL_INCLUDES += [
-    '/toolkit/components/jsoncpp/include',
-]
-
-# This code is only used in the stand-alone minidump analyzer executable so
-# enabling exceptions should be fine.
-if CONFIG['CC_TYPE'] == 'clang-cl':
-    CXXFLAGS += [
-        '-Xclang',
-        '-fcxx-exceptions',
-    ]
-elif CONFIG['CC_TYPE'] not in ('msvc', 'clang-cl'):
-    CXXFLAGS += [
-        '-fexceptions',
-    ]
-
-# Required to build with exceptions enabled
-DisableStlWrapping()
-
 Library('jsoncpp')
 
-# Suppress warnings in third-party code.
-if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
-    CXXFLAGS += [
-        '-wd4005', # macro redefinition
-    ]
-elif CONFIG['CC_TYPE'] in ('clang', 'gcc'):
-    CXXFLAGS += [
-        '-Wno-unused-local-typedefs',
-        '-Wno-shadow',
-    ]
-
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
-    CXXFLAGS += [
-        '-Wno-c++11-narrowing',
-    ]
-
-if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
-    CXXFLAGS += [
-        '-Wno-implicit-fallthrough',
-    ]
+OS_LIBS += ['jsoncpp']
index 70f3b259a9d865cbb3a66b02fc7bf2899109578b..923b48bfb66dd532e1719a5d9361a3ede7a9d5de 100644 (file)
@@ -52,7 +52,7 @@ USE_LIBS += [
 ]
 
 LOCAL_INCLUDES += [
-    '/toolkit/components/jsoncpp/include',
+    '%/usr/include/jsoncpp',
 ]
 
 if CONFIG['OS_TARGET'] != 'WINNT':