CMakeLists.txt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  9. ly_add_target(
  10. NAME ${gem_name}.Static STATIC
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. microphone_files.cmake
  14. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  15. PLATFORM_INCLUDE_FILES
  16. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
  17. INCLUDE_DIRECTORIES
  18. PUBLIC
  19. Source
  20. BUILD_DEPENDENCIES
  21. PUBLIC
  22. Gem::AudioSystem.API
  23. 3rdParty::libsamplerate
  24. Legacy::CryCommon
  25. COMPILE_DEFINITIONS
  26. PUBLIC
  27. USE_LIBSAMPLERATE
  28. )
  29. ly_add_target(
  30. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  31. NAMESPACE Gem
  32. FILES_CMAKE
  33. microphone_shared_files.cmake
  34. BUILD_DEPENDENCIES
  35. PRIVATE
  36. Gem::${gem_name}.Static
  37. )
  38. # Inject the gem name into the Module source file
  39. ly_add_source_properties(
  40. SOURCES
  41. Source/MicrophoneModule.cpp
  42. PROPERTY COMPILE_DEFINITIONS
  43. VALUES
  44. O3DE_GEM_NAME=${gem_name}
  45. O3DE_GEM_VERSION=${gem_version})
  46. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name} Gem::AudioSystem)
  47. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name} Gem::AudioSystem.Editor)