Wwise_windows.cmake 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. if(WWISE_VERSION VERSION_LESS_EQUAL "2021.1.10.0")
  9. set(WWISE_WINDOWS_LIB_NAMES
  10. AkAutobahn
  11. SFLib
  12. )
  13. else()
  14. # SFLib is no longer used
  15. set(WWISE_WINDOWS_LIB_NAMES
  16. AkAutobahn
  17. )
  18. endif()
  19. # Current mapping of toolset to Wwise SDK folder name
  20. if(MSVC_TOOLSET_VERSION VERSION_EQUAL 142)
  21. set(WWISE_VS_VER "vc160")
  22. elseif(MSVC_TOOLSET_VERSION VERSION_EQUAL 143)
  23. if(EXISTS ${BASE_PATH}/SDK/x64_vc170)
  24. # Visual 2022 specific libs were added in 2021.1.10
  25. set(WWISE_VS_VER "vc170")
  26. elseif(EXISTS ${BASE_PATH}/SDK/x64_vc160)
  27. set(WWISE_VS_VER "vc160")
  28. else()
  29. message(FATAL_ERROR "Unable to find Wwise SDK library path. Please verify you have downloaded the Wwise C++ SDK for MSVC toolset version: " ${MSVC_TOOLSET_VERSION})
  30. endif()
  31. else()
  32. message(FATAL_ERROR "Unable to determine Wwise SDK library path for MSVC toolset version: " ${MSVC_TOOLSET_VERSION})
  33. endif()
  34. set(WWISE_LIB_PATH ${BASE_PATH}/SDK/x64_${WWISE_VS_VER}/$<IF:$<CONFIG:Debug>,Debug,$<IF:$<CONFIG:Profile>,Profile,Release>>/lib)
  35. set(WWISE_LIBS)
  36. foreach(libName IN LISTS WWISE_COMMON_LIB_NAMES WWISE_CODEC_LIB_NAMES WWISE_WINDOWS_LIB_NAMES WWISE_ADDITIONAL_LIB_NAMES)
  37. list(APPEND WWISE_LIBS ${WWISE_LIB_PATH}/${libName}.lib)
  38. endforeach()
  39. foreach(nonReleaseLibName IN LISTS WWISE_NON_RELEASE_LIB_NAMES)
  40. list(APPEND WWISE_LIBS $<$<NOT:$<CONFIG:Release>>:${WWISE_LIB_PATH}/${nonReleaseLibName}.lib>)
  41. endforeach()
  42. # windows OS libs
  43. list(APPEND WWISE_LIBS
  44. dxguid.lib
  45. DInput8.lib
  46. $<$<NOT:$<CONFIG:Release>>:ws2_32.lib>
  47. )