mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 12:25:59 +03:00
feat(build): to compile with FMOD support, WHOA_BUILD_FMOD must be passed into CMake
This commit is contained in:
parent
5f3eadea1e
commit
2a46ce4d6d
@ -57,7 +57,7 @@ endif()
|
||||
if (WHOA_SYSTEM_WIN OR WHOA_SYSTEM_LINUX)
|
||||
target_link_libraries(gx
|
||||
PRIVATE
|
||||
SDL3::SDL3-static
|
||||
SDL2::SDL2-static
|
||||
libglew_static
|
||||
)
|
||||
endif()
|
||||
|
||||
@ -13,6 +13,9 @@ target_link_libraries(sound
|
||||
PRIVATE
|
||||
ui
|
||||
util
|
||||
PUBLIC
|
||||
fmod
|
||||
)
|
||||
|
||||
if(WHOA_BUILD_FMOD)
|
||||
target_link_libraries(sound PUBLIC fmod)
|
||||
endif()
|
||||
|
||||
|
||||
13
vendor/CMakeLists.txt
vendored
13
vendor/CMakeLists.txt
vendored
@ -14,8 +14,8 @@ endif()
|
||||
|
||||
# FMOD
|
||||
|
||||
if(defined WHOA_BUILD_FMOD)
|
||||
add_library(fmod SHARED IMPORTED GLOBAL)
|
||||
|
||||
# Determine which flavor of FMOD to use:
|
||||
# - macOS versions from 10.9 down prefer FMOD Ex
|
||||
# - macOS versions from 10.10 up prefer FMOD Core
|
||||
@ -125,3 +125,14 @@ elseif(WHOA_SYSTEM_MAC)
|
||||
install(FILES ${FMOD_DIR}/mac/lib/libfmod.dylib DESTINATION "bin")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions(-DWHOA_BUILD_FMOD)
|
||||
|
||||
if(WHOA_FMOD_CORE)
|
||||
add_definitions(-DWHOA_FMOD_CORE)
|
||||
endif()
|
||||
|
||||
if (WHOA_FMOD_EX)
|
||||
add_definitions(-DWHOA_FMOD_EX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user