Files
o3de/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.cpp
T
lumberyard-employee-dm b0dc1ea6fa CMake Xcode Generator fix (#5771)
Removed the generator expression from the `LY_ARCHIVE_FILE_SEARCH_MODE` define as Xcode doesn't support per-config per-file definitions.

Updated the #else block in ArchiveVars to default to PakOnly mode if the `LY_ARCHIVE_FILE_SEARCH_MODE` define isn't set.

Moved the the `LY_ARCHIVE_FILE_SEARCH_MODE` Cache Variable from cmake/Deployment.cmake to feature_options.cmake within the AzFramework folder.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-11-19 11:23:38 -06:00

25 lines
630 B
C++

/*
* 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
*
*/
#include <AzFramework/Archive/ArchiveVars.h>
namespace AZ::IO
{
FileSearchPriority GetDefaultFileSearchPriority()
{
#if defined(LY_ARCHIVE_FILE_SEARCH_MODE)
return FileSearchPriority{ LY_ARCHIVE_FILE_SEARCH_MODE };
#else
return FileSearchPriority{ !ArchiveVars::IsReleaseConfig
? FileSearchPriority::FileFirst
: FileSearchPriority::PakOnly };
#endif
}
}