You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/jsoncpp.mk

32 lines
1.1 KiB

# This file is part of MXE. See LICENSE.md for licensing information.
PKG := jsoncpp
$(PKG)_WEBSITE := https://github.com/open-source-parsers/jsoncpp
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.6.5
$(PKG)_CHECKSUM := a2b121eaff56ec88cfd034d17685821a908d0d87bc319329b04f91a6552c1ac2
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/open-source-parsers/jsoncpp/archive/$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc
# workaround for builds with GCC >= 6.x
$(PKG)_CXXFLAGS := -Wno-error=conversion -Wno-shift-negative-value
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://github.com/open-source-parsers/jsoncpp/archive/' | \
$(SED) -n 's,.*/\([0-9][^"]*\)/"\.tar.*,\1,p' | \
sort | uniq | \
head -1
endef
define $(PKG)_BUILD
mkdir '$(1)/build'
cd '$(1)/build' && '$(TARGET)-cmake' .. \
-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
-DCMAKE_CXX_FLAGS="$($(PKG)_CXXFLAGS)" \
-DJSONCPP_WITH_CMAKE_PACKAGE=ON \
-DBUILD_STATIC_LIBS=$(if $(BUILD_STATIC),true,false)
$(MAKE) -C '$(1)/build' -j '$(JOBS)' install
endef