aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexander Arlt <alexander.arlt@arlt-labs.com>2018-02-16 07:03:12 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-04-23 18:10:39 +0800
commit0b49fd34931bd27c47b2f9dea39f4c75b3b2937f (patch)
treecbe0342fb088823881495389987cf79a099c064c /cmake
parent2fae248dbe50bed93268529724c1e3691f3c4a3f (diff)
downloaddexon-solidity-0b49fd34931bd27c47b2f9dea39f4c75b3b2937f.tar.gz
dexon-solidity-0b49fd34931bd27c47b2f9dea39f4c75b3b2937f.tar.zst
dexon-solidity-0b49fd34931bd27c47b2f9dea39f4c75b3b2937f.zip
CMake: Update jsoncpp to v1.8.4
Diffstat (limited to 'cmake')
-rw-r--r--cmake/jsoncpp.cmake16
1 files changed, 5 insertions, 11 deletions
diff --git a/cmake/jsoncpp.cmake b/cmake/jsoncpp.cmake
index 6ddf4c74..7a9d7e40 100644
--- a/cmake/jsoncpp.cmake
+++ b/cmake/jsoncpp.cmake
@@ -6,15 +6,9 @@ else()
set(JSONCPP_CMAKE_COMMAND ${CMAKE_COMMAND})
endif()
-# Disable implicit fallthrough warning in jsoncpp for gcc >= 7 until the upstream handles it properly
-if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
- set(JSONCCP_EXTRA_FLAGS -Wno-implicit-fallthrough)
-else()
- set(JSONCCP_EXTRA_FLAGS "")
-endif()
-
+include(GNUInstallDirs)
set(prefix "${CMAKE_BINARY_DIR}/deps")
-set(JSONCPP_LIBRARY "${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}")
+set(JSONCPP_LIBRARY "${prefix}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(JSONCPP_INCLUDE_DIR "${prefix}/include")
set(byproducts "")
@@ -25,9 +19,9 @@ endif()
ExternalProject_Add(jsoncpp-project
PREFIX "${prefix}"
DOWNLOAD_DIR "${CMAKE_SOURCE_DIR}/deps/downloads"
- DOWNLOAD_NAME jsoncpp-1.7.7.tar.gz
- URL https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz
- URL_HASH SHA256=087640ebcf7fbcfe8e2717a0b9528fff89c52fcf69fa2a18cc2b538008098f97
+ DOWNLOAD_NAME jsoncpp-1.8.4.tar.gz
+ URL https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz
+ URL_HASH SHA256=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
CMAKE_COMMAND ${JSONCPP_CMAKE_COMMAND}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}