2018-01-14 20:56:44 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# libcpprestsdk
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-02-02 08:03:31 +01:00
|
|
|
LIBCPPRESTSDK_VERSION = 2.10.18
|
|
|
|
LIBCPPRESTSDK_SITE = $(call github,Microsoft,cpprestsdk,$(LIBCPPRESTSDK_VERSION))
|
2018-01-14 20:56:44 +01:00
|
|
|
LIBCPPRESTSDK_LICENSE = MIT
|
|
|
|
LIBCPPRESTSDK_LICENSE_FILES = license.txt
|
|
|
|
LIBCPPRESTSDK_SUBDIR = Release
|
2019-08-13 22:37:30 +02:00
|
|
|
LIBCPPRESTSDK_INSTALL_STAGING = YES
|
2020-03-14 23:20:26 +01:00
|
|
|
LIBCPPRESTSDK_DEPENDENCIES += host-pkgconf boost openssl
|
2019-03-05 10:59:38 +01:00
|
|
|
LIBCPPRESTSDK_CONF_OPTS = -DWERROR=OFF -DBUILD_SAMPLES=OFF
|
2018-01-14 20:56:44 +01:00
|
|
|
|
2019-04-17 23:00:50 +02:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += \
|
|
|
|
-DBoost_USE_STATIC_LIBS=ON \
|
|
|
|
-DBoost_USE_STATIC_RUNTIME=ON
|
|
|
|
endif
|
|
|
|
|
2019-05-21 15:39:30 +02:00
|
|
|
LIBCPPRESTSDK_CXXFLAGS = $(TARGET_CXXFLAGS)
|
|
|
|
|
2019-02-15 22:33:15 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
2019-05-21 15:39:30 +02:00
|
|
|
LIBCPPRESTSDK_CXXFLAGS += -latomic
|
2019-02-15 22:33:15 +01:00
|
|
|
endif
|
|
|
|
|
2020-03-14 23:20:26 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
LIBCPPRESTSDK_DEPENDENCIES += zlib
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_COMPRESSION=OFF
|
|
|
|
# brotli needs compression
|
2019-03-24 15:09:38 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BROTLI),y)
|
|
|
|
LIBCPPRESTSDK_DEPENDENCIES += brotli
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_BROTLI=OFF
|
|
|
|
else
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_BROTLI=ON
|
|
|
|
endif
|
2020-03-14 23:20:26 +01:00
|
|
|
else
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_COMPRESSION=ON
|
|
|
|
endif
|
2019-03-24 15:09:38 +01:00
|
|
|
|
2019-02-12 23:45:46 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_WEBSOCKETPP),y)
|
|
|
|
LIBCPPRESTSDK_DEPENDENCIES += websocketpp
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_WEBSOCKETS=OFF
|
|
|
|
else
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += -DCPPREST_EXCLUDE_WEBSOCKETS=ON
|
|
|
|
endif
|
2018-01-14 20:56:44 +01:00
|
|
|
|
2019-05-21 15:39:30 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
|
|
|
LIBCPPRESTSDK_CXXFLAGS += -O0
|
|
|
|
endif
|
|
|
|
|
|
|
|
LIBCPPRESTSDK_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(LIBCPPRESTSDK_CXXFLAGS)"
|
|
|
|
|
2018-01-14 20:56:44 +01:00
|
|
|
$(eval $(cmake-package))
|