Files
o3de/Code/Framework/AzFramework/CMakeLists.txt
T
Chris Burel f5effaabcc Consolidate all xcb functionality into one subdirectory
The Linux platform has multiple windowing systems. Support for xcb is
currently in progress, support for Wayland is planned in the future. The
way the current xcb support is included is by making some file with a
`_xcb` suffix, and placing `#if PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB` around
most of that file's contents.

With this change, all of the code in AzFramework that uses xcb directly is
inside the `Platform/Common/Xcb` subdirectory. It greatly reduces the
amount of code in compile-time `#ifdef` checks for the chosen windowing
system. It also provides a logical place to include O3DE-specific xcb
C++ wrappers and interfaces, without polluting non-xcb related code.

Signed-off-by: Chris Burel <burelc@amazon.com>
2021-09-27 11:44:55 -07:00

99 lines
2.6 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_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common)
ly_add_target(
NAME AzFramework STATIC
NAMESPACE AZ
FILES_CMAKE
AzFramework/azframework_files.cmake
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
PLATFORM_INCLUDE_FILES
${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
INCLUDE_DIRECTORIES
PUBLIC
.
${pal_dir}
PRIVATE
${common_dir}
BUILD_DEPENDENCIES
PRIVATE
AZ::AzCore
PUBLIC
AZ::GridMate
3rdParty::zlib
3rdParty::zstd
3rdParty::lz4
)
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME})
ly_add_target(
NAME AzFrameworkTestShared STATIC
NAMESPACE AZ
FILES_CMAKE
Tests/framework_shared_tests_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
Tests
BUILD_DEPENDENCIES
PRIVATE
AZ::AzCore
AZ::AzFramework
PUBLIC
AZ::AzTest
AZ::AzTestShared
)
if(PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_target(
NAME ProcessLaunchTest EXECUTABLE
NAMESPACE AZ
FILES_CMAKE
Tests/process_launch_test_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
BUILD_DEPENDENCIES
PRIVATE
AZ::AzCore
AZ::AzFramework
)
ly_add_target(
NAME AzFramework.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE AZ
FILES_CMAKE
Tests/frameworktests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
${pal_dir}
BUILD_DEPENDENCIES
PRIVATE
AZ::AzFramework
AZ::AzTest
AZ::AzTestShared
AZ::AzFrameworkTestShared
RUNTIME_DEPENDENCIES
AZ::ProcessLaunchTest
)
ly_add_googletest(
NAME AZ::AzFramework.Tests
)
endif()
endif()