123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- cmake_minimum_required(VERSION 3.22)
- if(NOT ${CMAKE_VERSION} VERSION_LESS "3.24")
-
-
-
- cmake_policy(SET CMP0135 NEW)
- endif()
- include(cmake/LySet.cmake)
- include(cmake/GeneralSettings.cmake)
- include(cmake/FileUtil.cmake)
- include(cmake/Version.cmake)
- include(cmake/OutputDirectory.cmake)
- if(NOT PROJECT_NAME)
- include(cmake/CompilerSettings.cmake)
- project(O3DE
- LANGUAGES C CXX
- VERSION ${O3DE_INSTALL_VERSION_STRING}
- )
- endif()
- include(CTest)
- include(cmake/PAL.cmake)
- include(cmake/PALTools.cmake)
- include(cmake/RuntimeDependencies.cmake)
- include(cmake/Configurations.cmake)
- include(cmake/Dependencies.cmake)
- include(cmake/Deployment.cmake)
- include(cmake/3rdParty.cmake)
- include(cmake/LYPython.cmake)
- include(cmake/Install.cmake)
- include(cmake/LYWrappers.cmake)
- include(cmake/Gems.cmake)
- include(cmake/UnitTest.cmake)
- include(cmake/TestImpactFramework/TestImpactTestTargetConfig.cmake)
- include(cmake/LYTestWrappers.cmake)
- include(cmake/Monolithic.cmake)
- include(cmake/SettingsRegistry.cmake)
- include(cmake/CMakeFiles.cmake)
- include(cmake/O3DEJson.cmake)
- include(cmake/Subdirectories.cmake)
- include(cmake/TestImpactFramework/LYTestImpactFramework.cmake)
- get_property(O3DE_SCRIPT_ONLY GLOBAL PROPERTY "O3DE_SCRIPT_ONLY")
- if (O3DE_SCRIPT_ONLY AND NOT INSTALLED_ENGINE)
- get_property(engine_root GLOBAL PROPERTY O3DE_ENGINE_ROOT_FOLDER)
- message(FATAL_ERROR "Script-only projects require pre-built versions of O3DE.\n\
- The project being compiled (${PROJECT_NAME}) is a script-only project (see project.json) \
- but the engine being used to build it is a compile-from-source engine using c++ code \
- (${engine_root}). Please use a pre-built (installer) O3DE to build script-only projects.")
- endif()
- add_o3de_manifest_json_external_subdirectories()
- include(cmake/Projects.cmake)
- add_engine_json_external_subdirectories()
- if(NOT INSTALLED_ENGINE)
-
- add_subdirectory(Assets)
- add_subdirectory(Code)
- add_subdirectory(python)
- add_subdirectory(Registry)
- add_subdirectory(scripts)
- add_subdirectory(Templates)
- add_subdirectory(Tools)
-
-
- add_subdirectory_on_external_subdirs()
- else()
- ly_find_o3de_packages()
- add_subdirectory_on_external_subdirs()
- endif()
- ly_enable_gems_delayed()
- ly_delayed_generate_static_modules_inl()
- ly_delayed_generate_settings_registry()
- ly_delayed_target_link_libraries()
- if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
- ly_delayed_generate_unit_test_module_registry()
- endif()
- ly_delayed_generate_runtime_dependencies()
- if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
- ly_test_impact_post_step()
- endif()
- if(LY_INSTALL_ENABLED)
-
- ly_setup_o3de_install()
-
- include(cmake/Packaging.cmake)
- endif()
|