Skip to content

Commit

Permalink
libsdl_*: use package:is_plat
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Aug 31, 2024
1 parent 84fbefd commit 72d4b02
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/l/libsdl_image/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ package("libsdl_image")
end)

on_install(function (package)
if is_plat("wasm") then
if package:is_plat("wasm") then
io.replace("CMakeLists.txt", "sdl_find_sdl2(${sdl2_target_name} ${SDL_REQUIRED_VERSION})", "", {plain = true})
io.replace("CMakeLists.txt", "target_link_libraries(SDL2_image PRIVATE $<BUILD_INTERFACE:${sdl2_target_name}>)", [[
target_include_directories(SDL2_image PRIVATE ${SDL2_INCLUDE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion packages/l/libsdl_mixer/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package("libsdl_mixer")
end)

on_install(function (package)
if is_plat("wasm") then
if package:is_plat("wasm") then
io.replace("CMakeLists.txt", "sdl_find_sdl2(${sdl2_target_name} ${SDL_REQUIRED_VERSION})", "", {plain = true})
io.replace("CMakeLists.txt", "target_link_libraries(SDL2_mixer PRIVATE $<BUILD_INTERFACE:${sdl2_target_name}>)", [[
target_include_directories(SDL2_mixer PRIVATE ${SDL2_INCLUDE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion packages/l/libsdl_net/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package("libsdl_net")
end)

on_install(function (package)
if is_plat("wasm") then
if package:is_plat("wasm") then
io.replace("CMakeLists.txt", "sdl_find_sdl2(${sdl2_target_name} ${SDL_REQUIRED_VERSION})", "", {plain = true})
io.replace("CMakeLists.txt", "target_link_libraries(SDL2_net PRIVATE $<BUILD_INTERFACE:${sdl2_target_name}>)", [[
target_include_directories(SDL2_net PRIVATE ${SDL2_INCLUDE_DIR})
Expand Down
2 changes: 1 addition & 1 deletion packages/l/libsdl_ttf/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ package("libsdl_ttf")
end)

on_install(function (package)
if is_plat("wasm") then
if package:is_plat("wasm") then
io.replace("CMakeLists.txt", "sdl_find_sdl2(${sdl2_target_name} ${SDL_REQUIRED_VERSION})", "", {plain = true})
io.replace("CMakeLists.txt", "target_link_libraries(SDL2_ttf PRIVATE $<BUILD_INTERFACE:${sdl2_target_name}>)", [[
target_include_directories(SDL2_ttf PRIVATE ${SDL2_INCLUDE_DIR})
Expand Down

0 comments on commit 72d4b02

Please sign in to comment.