|
@@ -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)
|