CMakeLists.txt 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. if(NOT PAL_TRAIT_BUILD_HOST_TOOLS)
  9. return()
  10. endif()
  11. # This will set python_package_name to whatever the package 'Python' is associated with
  12. ly_get_package_association(Python python_package_name)
  13. if (NOT python_package_name)
  14. set(python_package_name "python-no-package-assocation-found")
  15. message(WARNING "Python was not found in the package assocation list. Did someone call ly_associate_package(xxxxxxx Python) ?")
  16. endif()
  17. ly_add_target(
  18. NAME ProjectManager.Static STATIC
  19. NAMESPACE AZ
  20. AUTOMOC
  21. FILES_CMAKE
  22. project_manager_files.cmake
  23. Platform/${PAL_PLATFORM_NAME}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  24. PLATFORM_INCLUDE_FILES
  25. Platform/${PAL_PLATFORM_NAME}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
  26. Platform/Common/${PAL_TRAIT_COMPILER_ID}/projectmanager_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake
  27. COMPILE_DEFINITIONS
  28. PRIVATE
  29. PY_PACKAGE="${python_package_name}"
  30. INCLUDE_DIRECTORIES
  31. PRIVATE
  32. Source
  33. Platform/${PAL_PLATFORM_NAME}
  34. BUILD_DEPENDENCIES
  35. PRIVATE
  36. 3rdParty::Qt::Core
  37. 3rdParty::Qt::Concurrent
  38. 3rdParty::Qt::Widgets
  39. 3rdParty::Python
  40. 3rdParty::pybind11
  41. AZ::AzCore
  42. AZ::AzFramework
  43. AZ::AzToolsFramework
  44. )
  45. ly_add_target(
  46. NAME ProjectManager APPLICATION
  47. OUTPUT_NAME o3de
  48. NAMESPACE AZ
  49. AUTORCC
  50. FILES_CMAKE
  51. project_manager_app_files.cmake
  52. INCLUDE_DIRECTORIES
  53. PRIVATE
  54. Source
  55. BUILD_DEPENDENCIES
  56. PRIVATE
  57. 3rdParty::Qt::Core
  58. 3rdParty::Qt::Concurrent
  59. 3rdParty::Qt::Widgets
  60. 3rdParty::Python
  61. 3rdParty::pybind11
  62. AZ::AzCore
  63. AZ::AzFramework
  64. AZ::AzQtComponents
  65. AZ::AzToolsFramework
  66. AZ::ProjectManager.Static
  67. )
  68. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  69. ly_add_target(
  70. NAME ProjectManager.Tests EXECUTABLE
  71. NAMESPACE AZ
  72. AUTORCC
  73. FILES_CMAKE
  74. project_manager_tests_files.cmake
  75. Platform/${PAL_PLATFORM_NAME}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}_tests_files.cmake
  76. INCLUDE_DIRECTORIES
  77. PRIVATE
  78. Source
  79. Platform/${PAL_PLATFORM_NAME}
  80. BUILD_DEPENDENCIES
  81. PRIVATE
  82. 3rdParty::Qt::Core
  83. 3rdParty::Qt::Concurrent
  84. 3rdParty::Qt::Widgets
  85. 3rdParty::Python
  86. 3rdParty::pybind11
  87. AZ::AzTest
  88. AZ::AzFramework
  89. AZ::AzFrameworkTestShared
  90. AZ::AzQtComponents
  91. AZ::ProjectManager.Static
  92. AZ::AzToolsFramework
  93. )
  94. ly_add_googletest(
  95. NAME AZ::ProjectManager.Tests
  96. LABELS REQUIRES_tiaf
  97. TEST_COMMAND $<TARGET_FILE:AZ::ProjectManager.Tests> --unittest
  98. )
  99. endif()