Files
o3de/Gems/Vegetation/Code/CMakeLists.txt
Mike Balfour aafb9e8110 Misc Bugfixes (#6530)
* Bugfix: AreaIds don't compare correctly when the priority bus doesn't have a listener.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
(cherry picked from commit eb9e95fcb3884dee638b9032785b828359b0d8c0)

* Bugfix: Only deactivate a component if it's currently active.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
(cherry picked from commit 7c9e4b7de49e8fe009616651d6e09f66c356db38)

* Switched shared_lock to unique_lock, since the data is being written to.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Moved Legacy::CryCommon build dependency to correct location.
It was a public build dependency in FastNoise and GradientSignal, but really only should be a private dependency in Vegetation due to the vegetation system needing some init/shutdown events.
Fixing this up also required cleanup of a few unused legacy remnants in other files.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* InWorldBounds was incorrectly checking the X bounds against the Z bounds.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Removed some additional unneeded legacy code that was now causing compile errors.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Addressed PR feedback.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Adjusted cmake dependencies again, based on what's needed in the public header files in the gems.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Second attempt at the Deactivate() fix, this time by tracking the nested component state.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Addressed PR feedback, made operation symmetrical.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added CryCommon privately to other veg modules too, since they all reference AreaSystemComponent, which uses the legacy events.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
2021-12-22 10:38:04 -06:00

116 lines
3.2 KiB
CMake

#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
ly_add_target(
NAME Vegetation.Static STATIC
NAMESPACE Gem
FILES_CMAKE
vegetation_files.cmake
COMPILE_DEFINITIONS
PUBLIC
# if we are in debug or profile, enable VEG_PROFILE_ENABLED
$<$<IN_LIST:$<CONFIG>,debug;profile>:VEG_PROFILE_ENABLED>
INCLUDE_DIRECTORIES
PRIVATE
Source
PUBLIC
Include
BUILD_DEPENDENCIES
PRIVATE
Gem::LmbrCentral
Gem::SurfaceData
Legacy::CryCommon
PUBLIC
Gem::AtomLyIntegration_CommonFeatures.Static
RUNTIME_DEPENDENCIES
Gem::GradientSignal
)
ly_add_target(
NAME Vegetation ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
NAMESPACE Gem
FILES_CMAKE
vegetation_shared_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Source
PUBLIC
Include
BUILD_DEPENDENCIES
PRIVATE
Gem::Vegetation.Static
Legacy::CryCommon
RUNTIME_DEPENDENCIES
Gem::LmbrCentral
Gem::GradientSignal
Gem::SurfaceData
)
# the above module is for use in clients and server type applications
ly_create_alias(NAME Vegetation.Servers NAMESPACE Gem TARGETS Gem::Vegetation)
ly_create_alias(NAME Vegetation.Clients NAMESPACE Gem TARGETS Gem::Vegetation)
if(PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_target(
NAME Vegetation.Editor GEM_MODULE
NAMESPACE Gem
FILES_CMAKE
vegetation_editor_files.cmake
COMPILE_DEFINITIONS
PRIVATE
VEGETATION_EDITOR
INCLUDE_DIRECTORIES
PRIVATE
Source
PUBLIC
Include
BUILD_DEPENDENCIES
PRIVATE
Gem::Vegetation.Static
AZ::AzToolsFramework
Legacy::CryCommon
RUNTIME_DEPENDENCIES
Gem::LmbrCentral.Editor
Gem::GradientSignal.Editor
Gem::SurfaceData.Editor
)
# the above module is for use in dev tools
ly_create_alias(NAME Vegetation.Builders NAMESPACE Gem TARGETS Gem::Vegetation.Editor)
ly_create_alias(NAME Vegetation.Tools NAMESPACE Gem TARGETS Gem::Vegetation.Editor)
endif()
################################################################################
# Tests
################################################################################
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_add_target(
NAME Vegetation.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
vegetation_tests_files.cmake
vegetation_shared_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
Source
.
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
AZ::AzFrameworkTestShared
Gem::Vegetation.Static
Gem::LmbrCentral.Mocks
Legacy::CryCommon
)
ly_add_googletest(
NAME Gem::Vegetation.Tests
)
endif()