Quellcode durchsuchen

zlibcomplete: Fixed cmake compiler test failure on riscv cross compil… (#6919)

* zlibcomplete: Fixed cmake compiler test failure on riscv cross compiler (riscv64-unknown-elf-)

* zlibcomplete: Tried to fix android r27 issue
Hsin-chieh Liu vor 4 Monaten
Ursprung
Commit
c6159e4194
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      packages/z/zlibcomplete/xmake.lua

+ 4 - 0
packages/z/zlibcomplete/xmake.lua

@@ -16,11 +16,15 @@ package("zlibcomplete")
         table.insert(configs, "-DZLIBCOMPLETE_EXAMPLES=off")
         table.insert(configs, "-DZLIBCOMPLETE_DOCS=off")
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+        table.insert(configs, "-DCMAKE_POLICY_DEFAULT_CMP0057=NEW")
         if package:config("shared") then
             table.insert(configs, "-DZLIBCOMPLETE_SHARED=on")
         else
             table.insert(configs, "-DZLIBCOMPLETE_STATIC=on")
         end
+        if package:is_cross() then
+            table.insert(configs, "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY")
+        end
         import("package.tools.cmake").install(package, configs)
         os.cp("lib/zlc/*.hpp", package:installdir("include", "zlc"))
     end)