vcpkg/ports/drogon/004_deps_redis.patch
Mohsen Mirkarimi b3d05b2f8c
[drogon] fix drogon_ctl command not found error (#32870)
* fix: patch to use find_program for drogon_ctl

* update drogon port version
2023-08-03 10:20:34 -07:00

31 lines
1.0 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0595ab8..373e11e 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -460,10 +460,10 @@ if (BUILD_SQLITE)
endif (BUILD_SQLITE)
if (BUILD_REDIS)
- find_package(Hiredis)
+ find_package(Hiredis NAMES hiredis CONFIG REQUIRED)
if (Hiredis_FOUND)
add_definitions(-DUSE_REDIS)
- target_link_libraries(${PROJECT_NAME} PRIVATE Hiredis_lib)
+ target_link_libraries(${PROJECT_NAME} PRIVATE hiredis::hiredis)
set(DROGON_SOURCES
${DROGON_SOURCES}
nosql_lib/redis/src/RedisClientImpl.cc
diff --git a/cmake/templates/DrogonConfig.cmake.in b/cmake/templates/DrogonConfig.cmake.in
index 48eb393..9a9742e 100644
--- a/cmake/templates/DrogonConfig.cmake.in
+++ b/cmake/templates/DrogonConfig.cmake.in
@@ -38,7 +38,7 @@ if(@COZ-PROFILER_FOUND@)
find_dependency(coz-profiler)
endif()
if(@Hiredis_FOUND@)
-find_dependency(Hiredis)
+find_dependency(hiredis CONFIG)
endif()
if(@yaml-cpp_FOUND@)
find_dependency(yaml-cpp)