fix assimp: Remove /WX from CMakeLists for MSVC (#2487)

pull/2490/head
Frank Zhuang 2 years ago committed by GitHub
parent ad9f2a04a2
commit 6fbaf9e181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/a/assimp/xmake.lua

@ -93,6 +93,11 @@ package("assimp")
io.replace("code/CMakeLists.txt", "TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)", "", {plain = true})
end
end
if not package:gitref() and package:version():eq("v5.2.5") then
-- Remove /WX from CMakeLists for MSVC: https://github.com/assimp/assimp/pull/5183
io.replace("CMakeLists.txt", "ADD_COMPILE_OPTIONS(/bigobj /W4 /WX )", "ADD_COMPILE_OPTIONS(/bigobj)", {plain = true})
io.replace("CMakeLists.txt", "ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX)", "ADD_COMPILE_OPTIONS(/MP /bigobj)", {plain = true})
end
if package:is_plat("mingw") and package:version():lt("v5.1.5") then
-- CMAKE_COMPILER_IS_MINGW has been removed: https://github.com/assimp/assimp/pull/4311
io.replace("CMakeLists.txt", "CMAKE_COMPILER_IS_MINGW", "MINGW", {plain = true})

Loading…
Cancel
Save