Compare commits

...

2 Commits

Author SHA1 Message Date
Bjorn 600a8c372e
Merge pull request #755 from jmiskovic/fix/jolt_win
Allow joltc fns without explicit argument list
2024-03-04 11:54:10 -08:00
Josip Miskovic 8a5b88e851 Allow joltc fns without explicit argument list
The C4255 warning in MSVC complains about function lacking explicit list
of arguments (`f()` instead of `f(void)`). Disabling this warning allows
joltc to build on windows platform.
2024-03-04 19:03:22 +01:00
1 changed files with 6 additions and 4 deletions

View File

@ -186,10 +186,12 @@ if(LOVR_ENABLE_PHYSICS)
set(LOVR_PHYSICS_LIB ode)
endif()
elseif(LOVR_PHYSICS_LIBRARY STREQUAL "JOLT")
if(NOT MSVC)
set(BUILD_SHARED_LIBS OFF)
include_directories(deps/jolt-physics-sharp/src/joltc)
add_subdirectory(deps/jolt-physics-sharp/src/joltc jolt)
set(BUILD_SHARED_LIBS OFF)
include_directories(deps/jolt-physics-sharp/src/joltc)
add_subdirectory(deps/jolt-physics-sharp/src/joltc jolt)
if(MSVC)
target_compile_options(joltc PRIVATE /wd4255)
else()
target_compile_options(joltc PRIVATE -Wno-comment)
endif()
set(PHYSICS_REPO_ROOT ${CMAKE_SOURCE_DIR}/deps/jolt-physics-sharp/src/joltc)