Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
luadebug committed Jan 15, 2025
1 parent 91ed9f4 commit b1204fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/p/pugixml/port/overwriteProp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1")
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1")
set(CMAKE_STRIP FALSE)
3 changes: 2 additions & 1 deletion packages/p/pugixml/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ package("pugixml")
add_deps("cmake")

on_install(function (package)
local configs = {}
os.cp(path.join(package:scriptdir(), "port", "overwriteProp.cmake"), "overwriteProp.cmake")
local configs = {"-DCMAKE_PROJECT_INCLUDE=overwriteProp.cmake"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") then
Expand Down

0 comments on commit b1204fa

Please sign in to comment.