1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #
- # 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
- #
- #
- if(NOT COMMAND o3de_gem_setup)
- # Backwards compatibility for older engines
- macro(o3de_gem_setup default_gem_name)
- # Query the gem name from the gem.json file if possible
- # otherwise fallback to using the default gem name argument
- o3de_find_ancestor_gem_root(gem_path gem_name "${CMAKE_CURRENT_SOURCE_DIR}")
- if (NOT gem_name)
- set(gem_name "${default_gem_name}")
- endif()
- # Fallback to using the current source CMakeLists.txt directory as the gem root path
- if (NOT gem_path)
- set(gem_path ${CMAKE_CURRENT_SOURCE_DIR})
- endif()
- set(gem_json ${gem_path}/gem.json)
- # Read the version field from the gem.json
- set(gem_version, "0.0.0")
- o3de_read_json_key(gem_version ${gem_json} "version")
- o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
- o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
- endmacro()
- endif()
- o3de_gem_setup("AudioEngineWwise")
- if(TARGET AudioEngineWwise)
- # For backwards compatibility with engines that include AudioEngineWwise
- # use Wwise for the targets if AudioEngineWwise is already defined
- set(gem_name "Wwise")
- endif()
- add_subdirectory(Code)
|