Fix build for Haiku and a handful of other oses with the spirv-tools dependency.

This commit is contained in:
David Carlier 2022-03-26 15:05:08 +00:00
parent bed91e67a0
commit 37a57d0011
3 changed files with 11 additions and 1 deletions

View File

@ -722,6 +722,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(supertuxkart nsl socket vorbisfile)
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
target_link_libraries(supertuxkart vorbisfile)
endif()
if (USE_DNS_C)
target_link_libraries(supertuxkart dnsc)
else()

View File

@ -59,8 +59,14 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
set(SPIRV_TIMER_ENABLED ${SPIRV_ALLOW_TIMERS})
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
add_definitions(-DSPIRV_FREEBSD)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
add_definitions(-DSPIRV_OPENBSD)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD")
add_definitions(-DSPIRV_NETBSD)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
add_definitions(-DSPIRV_FUCHSIA)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Haiku")
add_definitions(-DSPIRV_HAIKU)
else()
message(FATAL_ERROR "Your platform '${CMAKE_SYSTEM_NAME}' is not supported!")
endif()

View File

@ -24,7 +24,7 @@ namespace MemUtils {
callback cb;
bool chg;
public:
deref(callback _c) : cb(std::move(_c)) {}
deref(callback _c) : cb(std::move(_c)), chg(true) {}
deref(const deref &) = delete;
deref& operator=(const deref &) = delete;
deref(deref &&other) :