ConfigurationTypes.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. include_guard(GLOBAL)
  9. # In SDK builds CMAKE_CONFIGURATION_TYPES will be filled by entries generated per configuration build.
  10. # At install time we generate `cmake/ConfigurationTypes_<config>.cmake` files that append the configuration
  11. # to CMAKE_CONFIGURATION_TYPES
  12. set(CMAKE_CONFIGURATION_TYPES "" CACHE STRING "" FORCE)
  13. # For the SDK case, we want to only define the confiuguration types that have been added to the SDK
  14. # We need to redeclare LY_BUILD_PERMUTATION because Configurations is one of the first things included by the
  15. # root CMakeLists.txt. Even LY_MONOLITHIC_GAME is declared after, but since is a passed cache variable, and
  16. # default is the same as undeclared, we can use it at this point.
  17. if(LY_MONOLITHIC_GAME)
  18. set(LY_BUILD_PERMUTATION Monolithic)
  19. else()
  20. set(LY_BUILD_PERMUTATION Default)
  21. endif()
  22. file(GLOB configuration_type_files "cmake/Platform/${PAL_PLATFORM_NAME}/${LY_BUILD_PERMUTATION}/ConfigurationTypes_*.cmake")
  23. foreach(configuration_type_file ${configuration_type_files})
  24. include(${configuration_type_file})
  25. endforeach()
  26. ly_set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES}) # propagate to parent