Update JSON build deps.

Update JSON build dependencies, change the dockerfile and other
CI files that relate to this.  Also update target mtxclient
revision.
This commit is contained in:
redsky17 2019-02-24 16:42:37 -05:00
parent 4e17b7df72
commit ee12e01939
7 changed files with 37 additions and 36 deletions

View File

@ -7,6 +7,9 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew install qt5 lmdb clang-format ninja libsodium cmark
brew upgrade boost cmake icu4c || true
brew tap nlohmann/json
brew install nlohmann_json
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
@ -35,12 +38,12 @@ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
./configure && make && make check && sudo make install
popd
sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty
sudo apt-get update -qq
sudo apt-get install -qq -y \
qt${QT_PKG}base \
qt${QT_PKG}tools \
qt${QT_PKG}svg \
qt${QT_PKG}multimedia \
liblmdb-dev
qtbase5-dev \
qttools5-dev \
libqt5svg5-dev \
qtmultimedia5-dev \
liblmdb-dev \
nlohmann-json-dev
fi

View File

@ -24,7 +24,8 @@ fi
# Build & install dependencies
cmake -GNinja -Hdeps -B.deps \
-DUSE_BUNDLED_BOOST=${USE_BUNDLED_BOOST} \
-DUSE_BUNDLED_CMARK=${USE_BUNDLED_CMARK}
-DUSE_BUNDLED_CMARK=${USE_BUNDLED_CMARK} \
-DUSE_BUNDLED_JSON=${USE_BUNDLED_JSON}
cmake --build .deps
# Build nheko

View File

@ -1,6 +1,6 @@
language: cpp
sudo: required
dist: trusty
dist: bionic
notifications:
webhooks:
@ -20,6 +20,7 @@ matrix:
- DEPLOYMENT=1
- USE_BUNDLED_BOOST=0
- USE_BUNDLED_CMARK=0
- USE_BUNDLED_JSON=0
- os: linux
compiler: gcc
env:
@ -30,6 +31,7 @@ matrix:
- DEPLOYMENT=1
- USE_BUNDLED_BOOST=1
- USE_BUNDLED_CMARK=1
- USE_BUNDLED_JSON=0
addons:
apt:
sources: ["ubuntu-toolchain-r-test"]
@ -43,6 +45,7 @@ matrix:
- QT_PKG=57
- USE_BUNDLED_BOOST=1
- USE_BUNDLED_CMARK=1
- USE_BUNDLED_JSON=0
addons:
apt:
sources: ["ubuntu-toolchain-r-test"]
@ -56,6 +59,7 @@ matrix:
- QT_PKG=59
- USE_BUNDLED_BOOST=1
- USE_BUNDLED_CMARK=1
- USE_BUNDLED_JSON=0
addons:
apt:
sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"]
@ -109,4 +113,4 @@ deploy:
on:
condition: "$TRAVIS_OS_NAME == osx && $DEPLOYMENT == 1"
repo: Nheko-Reborn/nheko
tags: true
tags: true

View File

@ -11,6 +11,7 @@ RUN \
RUN \
apt-get install -y \
nlohmann-json-dev \
make \
pkg-config \
ninja-build \

View File

@ -57,6 +57,7 @@ build_script:
- cmake -G "Visual Studio 15 2017 Win64" -Hdeps -B.deps
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DUSE_BUNDLED_BOOST=OFF
-DUSE_BUNDLED_JSON=OFF
- cmake --build .deps --config Release
# Build nheko
@ -67,6 +68,7 @@ build_script:
-DTWEENY_INCLUDE_DIR=.deps/usr/include
-DCMARK_INCLUDE_DIR=C:/projects/nheko/.deps/usr/include
-DCMARK_LIBRARY=C:/projects/nheko/.deps/usr/lib/cmark.lib
-DJSON_INCLUDE_DIR=.deps/usr/include
- cmake --build build --config Release
after_build:

4
deps/CMakeLists.txt vendored
View File

@ -45,10 +45,10 @@ set(BOOST_SHA256
set(
MTXCLIENT_URL
https://github.com/Nheko-Reborn/mtxclient/archive/67d39691666bcdf3cc660db19ccc0d9941df13fd.tar.gz
https://github.com/Nheko-Reborn/mtxclient/archive/5dc567a4a494a2152658c6586e0d7637ecba85b4.tar.gz
)
set(MTXCLIENT_HASH
4aeb69a3261aec96bd1fbce2fedc10e3771d87a5a82657bab8bc6006b7f1ad10)
afea7b9681657233f6e833cccd161af66e320654be0c6bcffba855420e37f415)
set(
TWEENY_URL
https://github.com/mobius3/tweeny/archive/b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf.tar.gz

40
deps/cmake/Json.cmake vendored
View File

@ -1,29 +1,19 @@
ExternalProject_Add(
Json
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/Json
GIT_REPOSITORY https://github.com/nlohmann/json.git
# For shallow git clone (without downloading whole history)
# GIT_SHALLOW 1
# For point at certain tag
GIT_TAG v3.2.0
#disables auto update on every build
UPDATE_DISCONNECTED 1
#disable following
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_DIR "" INSTALL_COMMAND ""
)
# Update json target
add_custom_target(external-Json-update
COMMENT "Updated Nlohmann/Json"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Json/src/Json
COMMAND ${GIT_EXECUTABLE} pull
DEPENDS Json)
Json
#ExternalProject_Add(
# json
#
#
# DOWNLOAD_COMMAND file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/include/json.hpp
# EXPECTED_HASH SHA256=${JSON_HEADER_HASH})
#)
GIT_REPOSITORY ${JSON_URL}
GIT_TAG ${JSON_TAG}
BUILD_IN_SOURCE 1
SOURCE_DIR ${DEPS_BUILD_DIR}/json
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DJSON_BuildTests=OFF
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
BUILD_COMMAND ${CMAKE_COMMAND} --build ${DEPS_BUILD_DIR}/json
INSTALL_COMMAND make install
)
list(APPEND THIRD_PARTY_DEPS Json)