Skip to content

Commit

Permalink
Merge pull request #769 from yamt/libretro-ci-fix
Browse files Browse the repository at this point in the history
Avoid errors with an old cmake used on libretro CI
  • Loading branch information
aduros authored Oct 10, 2024
2 parents 35cfb6f + d43eba4 commit 63a0648
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtimes/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,14 @@ target_include_directories(wasm4 PRIVATE
$<$<BOOL:${GLFW}>:${CMAKE_SOURCE_DIR}/vendor/glad/include>
$<$<BOOL:${WASM3}>:${CMAKE_SOURCE_DIR}/vendor/wasm3/source>
$<$<BOOL:${TOYWASM}>:${toywasm_tmp_install}/include>)
# Note: as of writing this, libretro CI uses an ancient cmake, which
# doesn't have target_link_directories. the following target_link_directories
# is wrapped with an otherwise redundant "if (TOYWASM)" to avoid errors there.
# https://github.com/aduros/wasm4/issues/768
if (TOYWASM)
target_link_directories(wasm4 PRIVATE
$<$<BOOL:${TOYWASM}>:${toywasm_tmp_install}/lib>)
endif ()

target_link_libraries(wasm4 cubeb
$<$<BOOL:${MINIFB}>:minifb>
Expand Down Expand Up @@ -208,8 +214,10 @@ endif ()
target_include_directories(wasm4_libretro PRIVATE
$<$<BOOL:${WASM3}>:${CMAKE_SOURCE_DIR}/vendor/wasm3/source>
$<$<BOOL:${TOYWASM}>:${toywasm_tmp_install}/include>)
if (TOYWASM) # https://github.com/aduros/wasm4/issues/768
target_link_directories(wasm4_libretro PRIVATE
$<$<BOOL:${TOYWASM}>:${toywasm_tmp_install}/lib>)
endif ()
target_include_directories(wasm4_libretro PRIVATE "${CMAKE_SOURCE_DIR}/vendor/libretro/include")
target_link_libraries(wasm4_libretro $<$<BOOL:${TOYWASM}>:toywasm-core>)
set_target_properties(wasm4_libretro PROPERTIES C_STANDARD 99)
Expand Down

0 comments on commit 63a0648

Please sign in to comment.