[fix] remove libyuv shared library (*.dylib) on MacOSX

This commit is contained in:
dijunkun
2024-08-16 17:17:12 +08:00
parent 61b57dd3fe
commit 4eac29b6de

View File

@@ -15,13 +15,20 @@ package("libyuv")
io.replace("CMakeLists.txt", "INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )", "", {plain = true}) io.replace("CMakeLists.txt", "INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin )", "", {plain = true})
import("package.tools.cmake").install(package, configs) import("package.tools.cmake").install(package, configs)
if package:is_plat("macosx", "linux", "android") then if package:is_plat("linux", "android") then
if package:config("shared") then if package:config("shared") then
os.tryrm(package:installdir("lib", "*.a")) os.tryrm(package:installdir("lib", "*.a"))
else else
os.tryrm(package:installdir("lib", "*.so")) os.tryrm(package:installdir("lib", "*.so"))
end end
end end
if package:is_plat("macosx") then
if package:config("shared") then
os.tryrm(package:installdir("lib", "*.a"))
else
os.tryrm(package:installdir("lib", "*.dylib"))
end
end
end) end)
on_test(function (package) on_test(function (package)