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

Cant build project due to tacopie not being found #117

Open Sokkero opened 1 year ago

Sokkero commented 1 year ago

When building the project using cmake my machine outputs the error: CMake Error: install(EXPORT "cpp_redis" ...) includes target "cpp_redis" which requires target "tacopie" that is not in any export set.

This error comes up whilst both building my own project and also when running these commands within cpp_redis:

mkdir build 
cd build
cmake .. -DBUILD_EXAMPLES=true

My CMakeLists.txt:

cmake_minimum_required(VERSION 3.24.2)

set(CMAKE_CXX_STANDARD 17)
set(PROJECT_NAME "cppApi")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

project(${PROJECT_NAME})

FILE(GLOB_RECURSE SOURCE_FILES src/*.cpp src/*.h)
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${RES_FILES} main.cpp)

add_subdirectory(dependencies/cpp_redis)

include_directories(/usr/local/homebrew/Cellar/boost/1.78.0_1/include)
link_directories(/usr/local/homebrew/lib)
link_libraries(dependencies/Crow/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/dependencies/cpp_redis/includes)

target_link_libraries(${PROJECT_NAME} boost_system)
target_link_libraries(${PROJECT_NAME} pthread)
target_link_libraries(${PROJECT_NAME} cpp_redis)
mhered commented 1 year ago

Same here attempting to build in ubuntu 20.04

alxx commented 1 year ago

Same here on OSX 13.5.

g-i-a-m commented 1 year ago

Same here on Ubuntu 22.04 and 18.04

I've got the point. for me I forgot to exec "git submodule init && git submodule update" before exec "cd build && cmake ..", and it worked for me.