Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
luadebug committed Dec 28, 2024
1 parent 91b9fc7 commit 6755319
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 9 additions & 5 deletions packages/l/libmysofa/patches/v1.3.2/fix-build.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dcaa92a..6c3181b 100644
index dcaa92a..483442c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,21 +13,23 @@ use_c99()
configure_file(config.h.in config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
@@ -10,8 +10,9 @@ endmacro(use_c99)

use_c99()

+find_package(ZLIB REQUIRED)
configure_file(config.h.in config.h)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR} ${ZLIB_INCLUDE_DIRS})

if(NOT MSVC)
if(NOT WIN32)
find_library(MATH m)
@@ -19,15 +20,16 @@ if(NOT MSVC)
else()
set(MATH "")
endif()
Expand Down
5 changes: 3 additions & 2 deletions packages/l/libmysofa/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package("libmysofa")

add_versions("v1.3.2", "6c5224562895977e87698a64cb7031361803d136057bba35ed4979b69ab4ba76")

add_patches("v1.3.2", "patches/v1.3.2/fix-build.patch", "bb799e249773edcff9520856b44d6aaba8d6cb3d88a5371877194ddd580ca3c6")
add_patches("v1.3.2", "patches/v1.3.2/fix-build.patch", "dd166f489adf647554f9cc449bb71b8ae1070dc75e6bb8d291fe6d73ede21766")

add_deps("cmake", "zlib")

Expand All @@ -17,7 +17,8 @@ package("libmysofa")
os.rm("share/default.sofa")
os.cp("share/MIT_KEMAR_normal_pinna.sofa", "share/default.sofa")
local configs = {"-DBUILD_TESTS=OFF", "-DCMAKE_POLICY_DEFAULT_CMP0057=NEW"}
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
table.insert(configs, "-DBUILD_STATIC_LIBS=" .. (package:config("shared") and "OFF" or "ON"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "OFF" or "ON"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
import("package.tools.cmake").install(package, configs)
end)
Expand Down

0 comments on commit 6755319

Please sign in to comment.