aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-11-08 20:47:52 +0800
committerGitHub <noreply@github.com>2016-11-08 20:47:52 +0800
commit7a30e8cf6edd3749e908913794aa6b195ba7520b (patch)
tree4ed6b70b663c2b344f81d019f8764584b02b69c3 /cmake
parentdd0879fe438af22d6db49826e800ccd14c3780e7 (diff)
parent598154ed17f4155406ec1c047f3294c316ebd658 (diff)
downloaddexon-solidity-7a30e8cf6edd3749e908913794aa6b195ba7520b.tar
dexon-solidity-7a30e8cf6edd3749e908913794aa6b195ba7520b.tar.gz
dexon-solidity-7a30e8cf6edd3749e908913794aa6b195ba7520b.tar.bz2
dexon-solidity-7a30e8cf6edd3749e908913794aa6b195ba7520b.tar.lz
dexon-solidity-7a30e8cf6edd3749e908913794aa6b195ba7520b.tar.xz
dexon-solidity-7a30e8cf6edd3749e908913794aa6b195ba7520b.tar.zst
dexon-solidity-7a30e8cf6edd3749e908913794aa6b195ba7520b.zip
Merge pull request #1252 from ethereum/jsoncpp-from-source
Build jsoncpp from source using jsoncpp.cmake script
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindJsoncpp.cmake50
-rw-r--r--cmake/UseJsoncpp.cmake10
-rw-r--r--cmake/UseSolidity.cmake3
3 files changed, 1 insertions, 62 deletions
diff --git a/cmake/FindJsoncpp.cmake b/cmake/FindJsoncpp.cmake
deleted file mode 100644
index e8258b71..00000000
--- a/cmake/FindJsoncpp.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-# Find jsoncpp
-#
-# Find the jsoncpp includes and library
-#
-# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
-#
-# This module defines
-# JSONCPP_INCLUDE_DIRS, where to find header, etc.
-# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
-# JSONCPP_FOUND, If false, do not try to use jsoncpp.
-
-# only look in default directories
-find_path(
- JSONCPP_INCLUDE_DIR
- NAMES json/json.h
- PATH_SUFFIXES jsoncpp
- DOC "jsoncpp include dir"
-)
-
-find_library(
- JSONCPP_LIBRARY
- NAMES jsoncpp
- DOC "jsoncpp library"
-)
-
-set(JSONCPP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
-set(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
-
-# debug library on windows
-# same naming convention as in qt (appending debug library with d)
-# boost is using the same "hack" as us with "optimized" and "debug"
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-
- find_library(
- JSONCPP_LIBRARY_DEBUG
- NAMES jsoncppd
- DOC "jsoncpp debug library"
- )
-
- set(JSONCPP_LIBRARIES optimized ${JSONCPP_LIBRARIES} debug ${JSONCPP_LIBRARY_DEBUG})
-
-endif()
-
-# handle the QUIETLY and REQUIRED arguments and set JSONCPP_FOUND to TRUE
-# if all listed variables are TRUE, hide their existence from configuration view
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(jsoncpp DEFAULT_MSG
- JSONCPP_LIBRARY JSONCPP_INCLUDE_DIR)
-mark_as_advanced (JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY)
-
diff --git a/cmake/UseJsoncpp.cmake b/cmake/UseJsoncpp.cmake
deleted file mode 100644
index 6f605283..00000000
--- a/cmake/UseJsoncpp.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-function(eth_apply TARGET REQUIRED)
- find_package (Jsoncpp 0.60)
- eth_show_dependency(JSONCPP JsonCpp)
- if (JSONCPP_FOUND)
- target_include_directories(${TARGET} SYSTEM BEFORE PUBLIC ${JSONCPP_INCLUDE_DIRS})
- target_link_libraries(${TARGET} ${JSONCPP_LIBRARIES})
- elseif (NOT ${REQUIRED} STREQUAL "OPTIONAL")
- message(FATAL_ERROR "Jsoncpp library not found")
- endif()
-endfunction()
diff --git a/cmake/UseSolidity.cmake b/cmake/UseSolidity.cmake
index 9780464c..5080f71b 100644
--- a/cmake/UseSolidity.cmake
+++ b/cmake/UseSolidity.cmake
@@ -15,8 +15,7 @@ function(eth_apply TARGET REQUIRED SUBMODULE)
target_include_directories(${TARGET} PUBLIC ${Solidity_INCLUDE_DIRS})
if (${SUBMODULE} STREQUAL "solevmasm")
- eth_use(${TARGET} ${REQUIRED} Jsoncpp)
- target_link_libraries(${TARGET} ${Solidity_SOLEVMASM_LIBRARIES})
+ target_link_libraries(${TARGET} ${Solidity_SOLEVMASM_LIBRARIES} jsoncpp)
endif()
if (${SUBMODULE} STREQUAL "lll")