cpp-redis / cpp_redis

C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform
MIT License
720 stars 199 forks source link

Build install fails when included as part of buildroot build. #40

Closed jmaxxz closed 5 years ago

jmaxxz commented 5 years ago

Issue https://github.com/Cylix/cpp_redis/issues/120 still exists with the latest code from master. Exact same error condition occurs if one tries to use this project as part of a buildroot build.

jmaxxz commented 5 years ago

Worked around issue by creating bin directory before build, and by enabling custom tcp client flag.

CPP_REDIS_VERSION = d1fc9c7cc61111958a30a9e366a7d6acea1306c4
CPP_REDIS_SITE = $(call github,cpp-redis,cpp_redis,$(CPP_REDIS_VERSION))
CPP_REDIS_LICENSE = MIT
CPP_REDIS_INSTALL_TARGET = YES
CPP_REDIS_INSTALL_STAGING = YES

define CPP_REDIS_ADD_BIN_DIR
$(info CPP_REDIS package dir: $(@D))
mkdir -p -- "$(@D)/bin"
endef

CPP_REDIS_CONF_OPTS += -DUSE_CUSTOM_TCP_CLIENT=ON
CPP_REDIS_PRE_BUILD_HOOKS += CPP_REDIS_ADD_BIN_DIR

$(eval $(cmake-package))