From de5a8e326901e3c1756e0949ab98237e0d76587f Mon Sep 17 00:00:00 2001 From: Chen Yufei Date: Tue, 29 Mar 2022 08:38:05 +0800 Subject: [PATCH] hiredis: fix include directory in cmake file. --- packages/h/hiredis/xmake.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/h/hiredis/xmake.lua b/packages/h/hiredis/xmake.lua index af692905d..2fbddd7ab 100644 --- a/packages/h/hiredis/xmake.lua +++ b/packages/h/hiredis/xmake.lua @@ -24,8 +24,12 @@ package("hiredis") end) on_install(function (package) - if not package:config("shared") then - if package:version():eq("v1.0.2") then + if package:version():eq("v1.0.2") then + io.replace("CMakeLists.txt", + "TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $", + "TARGET_INCLUDE_DIRECTORIES(hiredis PUBLIC $", + {plain = true}) + if not package:config("shared") then -- Following change is required for package user to call `find_package(hiredis)` to work. io.replace("CMakeLists.txt", "ADD_LIBRARY(hiredis SHARED", "ADD_LIBRARY(hiredis", {plain = true}) io.replace("CMakeLists.txt", "ADD_LIBRARY(hiredis_ssl SHARED", "ADD_LIBRARY(hiredis_ssl", {plain = true})