aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorPaweł Bylica <chfast@gmail.com>2016-10-20 17:58:25 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-21 05:18:13 +0800
commit4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75 (patch)
tree2cd568e291ce79d337c15721dee47993c16179bf /cmake
parent5875890576eb95dd73bc04b5e864975cd7a55f43 (diff)
downloaddexon-solidity-4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75.tar
dexon-solidity-4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75.tar.gz
dexon-solidity-4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75.tar.bz2
dexon-solidity-4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75.tar.lz
dexon-solidity-4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75.tar.xz
dexon-solidity-4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75.tar.zst
dexon-solidity-4bde0a2d36297c4b3fa17c7dac2bb1681e1e7f75.zip
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")