Explorar o código

trantor: find_package use config mode (#2745)

Bai Miao hai 1 ano
pai
achega
38cd2fe62a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      packages/t/trantor/xmake.lua

+ 3 - 0
packages/t/trantor/xmake.lua

@@ -28,6 +28,9 @@ package("trantor")
     end
     end
 
 
     on_install("windows", "macosx", "linux", "mingw@windows", function (package)
     on_install("windows", "macosx", "linux", "mingw@windows", function (package)
+        io.replace("CMakeLists.txt", "\"${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/Findc-ares.cmake\"", "", {plain = true})
+        io.replace("CMakeLists.txt", "find_package(c-ares)", "find_package(c-ares CONFIG)", {plain = true})
+        io.replace("CMakeLists.txt", "c-ares_lib", "c-ares::cares", {plain = true})
         local configs = {}
         local configs = {}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         if package:config("pic") ~= false then
         if package:config("pic") ~= false then