You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.
Is there an easy way to use cpp_redis in cmake projects ?
I want to know if there is a way to use this kind of cmake feature:
find_package(cpp_redis REQUIRED)
When I use this macro, cmake complains and returns this:
CMake Error at CMakeLists.txt:20 (find_package):
By not providing "Findcpp_redis.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"cpp_redis", but CMake did not find one.
Could not find a package configuration file provided by "cpp_redis" with
any of the following names:
cpp_redisConfig.cmake
cpp_redis-config.cmake
Add the installation prefix of "cpp_redis" to CMAKE_PREFIX_PATH or set
"cpp_redis_DIR" to a directory containing one of the above files. If
"cpp_redis" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
Any clue ?
The text was updated successfully, but these errors were encountered:
Hello,
You can use add_subdirectory(path/to/cpp_redis/submodule)
NOTE: apparently cpp_redis's CMakeLists.txt does not set the public include paths for the library, so do it yourself:
# (use the correct paths)
add_subdirectory(3rdparty/cpp_redis)
target_include_directories(cpp_redis PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cpp_redis/includes"
"${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cpp_redis/tacopie/includes"
)
and then link your lib/exe with cpp_redis:
target_link_libraries(my_lib
cpp_redis
)
You could also use ExternalProject_Add.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
Is there an easy way to use cpp_redis in cmake projects ?
I want to know if there is a way to use this kind of cmake feature:
When I use this macro, cmake complains and returns this:
Any clue ?
The text was updated successfully, but these errors were encountered: