From 4403e9d4d468bb6ecbec1c1e05f227d67f535dcf Mon Sep 17 00:00:00 2001 From: amzn-phist <52085794+amzn-phist@users.noreply.github.com> Date: Fri, 2 Jul 2021 22:22:34 -0500 Subject: [PATCH] Fix the CMake configuration for Microphone Gem (#1835) * Fix the CMake configuration for Microphone Gem The configuration was causing AudioSystem Gem to be loaded at runtime regardless of whehter AudioSystem.Editor Gem was set to get loaded as well. Gives Microphone Gem an Editor module to sort out the proper runtime dependencies. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Removes an unnecessary comment Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Fix platforms that don't build tools Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Use aliases to better express runtime depends Cleans it up and removes the need for a Microphone.Editor module. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> --- Gems/Microphone/Code/CMakeLists.txt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Gems/Microphone/Code/CMakeLists.txt b/Gems/Microphone/Code/CMakeLists.txt index be71d65e33..077797fdd6 100644 --- a/Gems/Microphone/Code/CMakeLists.txt +++ b/Gems/Microphone/Code/CMakeLists.txt @@ -22,7 +22,7 @@ ly_add_target( Source BUILD_DEPENDENCIES PRIVATE - Gem::AudioSystem + Gem::AudioSystem.Static PUBLIC 3rdParty::libsamplerate Legacy::CryCommon @@ -39,10 +39,7 @@ ly_add_target( BUILD_DEPENDENCIES PRIVATE Gem::Microphone.Static - RUNTIME_DEPENDENCIES - Gem::AudioSystem ) -# The above "Microphone" target is used by all interactive applications -ly_create_alias(NAME Microphone.Clients NAMESPACE Gem TARGETS Gem::Microphone) -ly_create_alias(NAME Microphone.Tools NAMESPACE Gem TARGETS Gem::Microphone) +ly_create_alias(NAME Microphone.Clients NAMESPACE Gem TARGETS Gem::Microphone Gem::AudioSystem) +ly_create_alias(NAME Microphone.Tools NAMESPACE Gem TARGETS Gem::Microphone Gem::AudioSystem.Editor)