aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-06-06 16:06:15 +0800
committerGitHub <noreply@github.com>2018-06-06 16:06:15 +0800
commit59b35fa5b21c444bce5d28b2388ef8b4f7bae929 (patch)
tree0a0efc8b0b4e9468db0b5efbbb0ae4d0173f4bd9
parent3d8d6429efe45daf6a27ad575938d65e266955c1 (diff)
parenta104e5fb03650042ba106c7334c02cbe0110bd91 (diff)
downloaddexon-solidity-59b35fa5b21c444bce5d28b2388ef8b4f7bae929.tar.gz
dexon-solidity-59b35fa5b21c444bce5d28b2388ef8b4f7bae929.tar.zst
dexon-solidity-59b35fa5b21c444bce5d28b2388ef8b4f7bae929.zip
Merge pull request #4235 from sifmelcara/fix/cmake-install-libdir
Fix cmake when custom CMAKE_INSTALL_LIBDIR is given
-rw-r--r--cmake/jsoncpp.cmake10
1 files changed, 2 insertions, 8 deletions
diff --git a/cmake/jsoncpp.cmake b/cmake/jsoncpp.cmake
index cc2da7e7..0c110b53 100644
--- a/cmake/jsoncpp.cmake
+++ b/cmake/jsoncpp.cmake
@@ -6,15 +6,8 @@ else()
set(JSONCPP_CMAKE_COMMAND ${CMAKE_COMMAND})
endif()
-include(GNUInstallDirs)
-set(libdir ${CMAKE_INSTALL_LIBDIR})
-if(CMAKE_LIBRARY_ARCHITECTURE)
- # Do not use Debian multiarch library dir.
- string(REPLACE "/${CMAKE_LIBRARY_ARCHITECTURE}" "" libdir ${libdir})
-endif()
-
set(prefix "${CMAKE_BINARY_DIR}/deps")
-set(JSONCPP_LIBRARY "${prefix}/${libdir}/${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}")
+set(JSONCPP_LIBRARY "${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}jsoncpp${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(JSONCPP_INCLUDE_DIR "${prefix}/include")
if(NOT MSVC)
@@ -36,6 +29,7 @@ ExternalProject_Add(jsoncpp-project
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+ -DCMAKE_INSTALL_LIBDIR=lib
# Build static lib but suitable to be included in a shared lib.
-DCMAKE_POSITION_INDEPENDENT_CODE=${BUILD_SHARED_LIBS}
-DJSONCPP_WITH_TESTS=OFF