mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 03:18:49 +03:00
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:
parent
4e17b7df72
commit
ee12e01939
7 changed files with 37 additions and 36 deletions
|
@ -7,6 +7,9 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||||
brew install qt5 lmdb clang-format ninja libsodium cmark
|
brew install qt5 lmdb clang-format ninja libsodium cmark
|
||||||
brew upgrade boost cmake icu4c || true
|
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
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
sudo python 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
|
./configure && make && make check && sudo make install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty
|
|
||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
sudo apt-get install -qq -y \
|
sudo apt-get install -qq -y \
|
||||||
qt${QT_PKG}base \
|
qtbase5-dev \
|
||||||
qt${QT_PKG}tools \
|
qttools5-dev \
|
||||||
qt${QT_PKG}svg \
|
libqt5svg5-dev \
|
||||||
qt${QT_PKG}multimedia \
|
qtmultimedia5-dev \
|
||||||
liblmdb-dev
|
liblmdb-dev \
|
||||||
|
nlohmann-json-dev
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -24,7 +24,8 @@ fi
|
||||||
# Build & install dependencies
|
# Build & install dependencies
|
||||||
cmake -GNinja -Hdeps -B.deps \
|
cmake -GNinja -Hdeps -B.deps \
|
||||||
-DUSE_BUNDLED_BOOST=${USE_BUNDLED_BOOST} \
|
-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
|
cmake --build .deps
|
||||||
|
|
||||||
# Build nheko
|
# Build nheko
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: bionic
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks:
|
webhooks:
|
||||||
|
@ -20,6 +20,7 @@ matrix:
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
- USE_BUNDLED_BOOST=0
|
- USE_BUNDLED_BOOST=0
|
||||||
- USE_BUNDLED_CMARK=0
|
- USE_BUNDLED_CMARK=0
|
||||||
|
- USE_BUNDLED_JSON=0
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env:
|
env:
|
||||||
|
@ -30,6 +31,7 @@ matrix:
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
- USE_BUNDLED_BOOST=1
|
- USE_BUNDLED_BOOST=1
|
||||||
- USE_BUNDLED_CMARK=1
|
- USE_BUNDLED_CMARK=1
|
||||||
|
- USE_BUNDLED_JSON=0
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test"]
|
sources: ["ubuntu-toolchain-r-test"]
|
||||||
|
@ -43,6 +45,7 @@ matrix:
|
||||||
- QT_PKG=57
|
- QT_PKG=57
|
||||||
- USE_BUNDLED_BOOST=1
|
- USE_BUNDLED_BOOST=1
|
||||||
- USE_BUNDLED_CMARK=1
|
- USE_BUNDLED_CMARK=1
|
||||||
|
- USE_BUNDLED_JSON=0
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test"]
|
sources: ["ubuntu-toolchain-r-test"]
|
||||||
|
@ -56,6 +59,7 @@ matrix:
|
||||||
- QT_PKG=59
|
- QT_PKG=59
|
||||||
- USE_BUNDLED_BOOST=1
|
- USE_BUNDLED_BOOST=1
|
||||||
- USE_BUNDLED_CMARK=1
|
- USE_BUNDLED_CMARK=1
|
||||||
|
- USE_BUNDLED_JSON=0
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"]
|
sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"]
|
||||||
|
|
|
@ -11,6 +11,7 @@ RUN \
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
|
nlohmann-json-dev \
|
||||||
make \
|
make \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
|
|
|
@ -57,6 +57,7 @@ build_script:
|
||||||
- cmake -G "Visual Studio 15 2017 Win64" -Hdeps -B.deps
|
- cmake -G "Visual Studio 15 2017 Win64" -Hdeps -B.deps
|
||||||
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
-DUSE_BUNDLED_BOOST=OFF
|
-DUSE_BUNDLED_BOOST=OFF
|
||||||
|
-DUSE_BUNDLED_JSON=OFF
|
||||||
- cmake --build .deps --config Release
|
- cmake --build .deps --config Release
|
||||||
|
|
||||||
# Build nheko
|
# Build nheko
|
||||||
|
@ -67,6 +68,7 @@ build_script:
|
||||||
-DTWEENY_INCLUDE_DIR=.deps/usr/include
|
-DTWEENY_INCLUDE_DIR=.deps/usr/include
|
||||||
-DCMARK_INCLUDE_DIR=C:/projects/nheko/.deps/usr/include
|
-DCMARK_INCLUDE_DIR=C:/projects/nheko/.deps/usr/include
|
||||||
-DCMARK_LIBRARY=C:/projects/nheko/.deps/usr/lib/cmark.lib
|
-DCMARK_LIBRARY=C:/projects/nheko/.deps/usr/lib/cmark.lib
|
||||||
|
-DJSON_INCLUDE_DIR=.deps/usr/include
|
||||||
- cmake --build build --config Release
|
- cmake --build build --config Release
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
|
|
4
deps/CMakeLists.txt
vendored
4
deps/CMakeLists.txt
vendored
|
@ -45,10 +45,10 @@ set(BOOST_SHA256
|
||||||
|
|
||||||
set(
|
set(
|
||||||
MTXCLIENT_URL
|
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
|
set(MTXCLIENT_HASH
|
||||||
4aeb69a3261aec96bd1fbce2fedc10e3771d87a5a82657bab8bc6006b7f1ad10)
|
afea7b9681657233f6e833cccd161af66e320654be0c6bcffba855420e37f415)
|
||||||
set(
|
set(
|
||||||
TWEENY_URL
|
TWEENY_URL
|
||||||
https://github.com/mobius3/tweeny/archive/b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf.tar.gz
|
https://github.com/mobius3/tweeny/archive/b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf.tar.gz
|
||||||
|
|
38
deps/cmake/Json.cmake
vendored
38
deps/cmake/Json.cmake
vendored
|
@ -1,29 +1,19 @@
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
Json
|
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)
|
|
||||||
|
|
||||||
#ExternalProject_Add(
|
GIT_REPOSITORY ${JSON_URL}
|
||||||
# json
|
GIT_TAG ${JSON_TAG}
|
||||||
#
|
|
||||||
#
|
BUILD_IN_SOURCE 1
|
||||||
# DOWNLOAD_COMMAND file(DOWNLOAD ${JSON_HEADER_URL} ${DEPS_INSTALL_DIR}/include/json.hpp
|
SOURCE_DIR ${DEPS_BUILD_DIR}/json
|
||||||
# EXPECTED_HASH SHA256=${JSON_HEADER_HASH})
|
|
||||||
#)
|
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)
|
list(APPEND THIRD_PARTY_DEPS Json)
|
||||||
|
|
Loading…
Reference in a new issue