mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-09 23:06:47 +03:00
feat(gx): include directxmath when not on MSVC
This commit is contained in:
parent
3e77eb935a
commit
1325fc9b1f
68
vendor/CMakeLists.txt
vendored
68
vendor/CMakeLists.txt
vendored
@ -2,7 +2,11 @@ add_subdirectory(freetype-2.0.9)
|
||||
add_subdirectory(lua-5.1.3)
|
||||
add_subdirectory(stormlib-9)
|
||||
|
||||
if(WHOA_BUILD_GLSDL)
|
||||
if (WHOA_SYSTEM_WIN AND NOT MSVC)
|
||||
add_subdirectory(directxmath-3.19.0)
|
||||
endif ()
|
||||
|
||||
if (WHOA_BUILD_GLSDL)
|
||||
set(SDL_SHARED OFF)
|
||||
set(SDL_STATIC ON)
|
||||
add_subdirectory(sdl-2.30.5)
|
||||
@ -10,11 +14,11 @@ if(WHOA_BUILD_GLSDL)
|
||||
set(glew-cmake_BUILD_SHARED OFF)
|
||||
set(glew-cmake_BUILD_STATIC ON)
|
||||
add_subdirectory(glew-cmake-2.2.0)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
# FMOD
|
||||
|
||||
if(WHOA_BUILD_FMOD)
|
||||
if (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
|
||||
@ -23,26 +27,26 @@ if(WHOA_BUILD_FMOD)
|
||||
# - Windows versions from 7 up prefer FMOD Core
|
||||
# - All versions of Linux prefer FMOD Core
|
||||
# - Any missed detection prefers FMOD Core
|
||||
if(WHOA_SYSTEM_MAC AND WHOA_SYSTEM_VERSION LESS WHOA_MAC_10_10)
|
||||
if (WHOA_SYSTEM_MAC AND WHOA_SYSTEM_VERSION LESS WHOA_MAC_10_10)
|
||||
set(WHOA_FMOD_EX 1)
|
||||
target_compile_definitions(fmod INTERFACE -DWHOA_FMOD_EX=1)
|
||||
elseif(WHOA_SYSTEM_WIN AND WHOA_SYSTEM_VERSION LESS WHOA_WIN_7)
|
||||
elseif (WHOA_SYSTEM_WIN AND WHOA_SYSTEM_VERSION LESS WHOA_WIN_7)
|
||||
set(WHOA_FMOD_EX 1)
|
||||
target_compile_definitions(fmod INTERFACE -DWHOA_FMOD_EX=1)
|
||||
else()
|
||||
set(WHOA_FMOD_CORE 1)
|
||||
target_compile_definitions(fmod INTERFACE -DWHOA_FMOD_CORE=1)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if(WHOA_FMOD_EX)
|
||||
if (WHOA_FMOD_EX)
|
||||
set(FMOD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/fmodex-4.24.16")
|
||||
else()
|
||||
set(FMOD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/fmodcore-2.02.18")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if(WHOA_SYSTEM_WIN)
|
||||
if(WHOA_ARCH_32)
|
||||
if(WHOA_FMOD_EX)
|
||||
if (WHOA_SYSTEM_WIN)
|
||||
if (WHOA_ARCH_32)
|
||||
if (WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_IMPLIB ${FMOD_DIR}/win-x86/lib/fmodex_vc.lib
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/win-x86/lib/fmodex.dll
|
||||
@ -56,9 +60,9 @@ if(WHOA_BUILD_FMOD)
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/win-x86/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/win-x86/lib/fmod.dll DESTINATION "bin")
|
||||
endif()
|
||||
elseif(WHOA_ARCH_64)
|
||||
if(WHOA_FMOD_EX)
|
||||
endif ()
|
||||
elseif (WHOA_ARCH_64)
|
||||
if (WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_IMPLIB ${FMOD_DIR}/win-x86_64/lib/fmodex64_vc.lib
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/win-x86_64/lib/fmodex64.dll
|
||||
@ -72,11 +76,11 @@ if(WHOA_BUILD_FMOD)
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/win-x86_64/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/win-x86_64/lib/fmod.dll DESTINATION "bin")
|
||||
endif()
|
||||
endif()
|
||||
elseif(WHOA_SYSTEM_LINUX)
|
||||
if(WHOA_ARCH_32)
|
||||
if(WHOA_FMOD_EX)
|
||||
endif ()
|
||||
endif ()
|
||||
elseif (WHOA_SYSTEM_LINUX)
|
||||
if (WHOA_ARCH_32)
|
||||
if (WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/linux-x86/lib/libfmodex-4.24.16.so
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86/inc
|
||||
@ -90,9 +94,9 @@ if(WHOA_BUILD_FMOD)
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/linux-x86/lib/libfmod.so.13.18 DESTINATION "bin")
|
||||
endif()
|
||||
elseif(WHOA_ARCH_64)
|
||||
if(WHOA_FMOD_EX)
|
||||
endif ()
|
||||
elseif (WHOA_ARCH_64)
|
||||
if (WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/linux-x86_64/lib/libfmodex-4.24.16.so
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86_64/inc
|
||||
@ -106,12 +110,12 @@ if(WHOA_BUILD_FMOD)
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/linux-x86_64/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/linux-x86_64/lib/libfmod.so.13.18 DESTINATION "bin")
|
||||
endif()
|
||||
endif()
|
||||
elseif(WHOA_SYSTEM_MAC)
|
||||
endif ()
|
||||
endif ()
|
||||
elseif (WHOA_SYSTEM_MAC)
|
||||
# The Mac lib is universal
|
||||
|
||||
if(WHOA_FMOD_EX)
|
||||
if (WHOA_FMOD_EX)
|
||||
set_target_properties(fmod PROPERTIES
|
||||
IMPORTED_LOCATION ${FMOD_DIR}/mac/lib/libfmodex.dylib
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/mac/inc
|
||||
@ -123,16 +127,16 @@ if(WHOA_BUILD_FMOD)
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${FMOD_DIR}/mac/inc
|
||||
)
|
||||
install(FILES ${FMOD_DIR}/mac/lib/libfmod.dylib DESTINATION "bin")
|
||||
endif()
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
add_definitions(-DWHOA_BUILD_FMOD)
|
||||
|
||||
if(WHOA_FMOD_CORE)
|
||||
if (WHOA_FMOD_CORE)
|
||||
add_definitions(-DWHOA_FMOD_CORE)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (WHOA_FMOD_EX)
|
||||
add_definitions(-DWHOA_FMOD_EX)
|
||||
endif()
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
|
Loading…
Reference in New Issue
Block a user