CMakeLists.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  9. include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
  10. if (PAL_TRAIT_AZQTCOMPONENTSFORPYTHON_SUPPORTED)
  11. find_package(Qt5 5.12 REQUIRED COMPONENTS Core Gui Widgets)
  12. # Find the qt package location.
  13. ly_get_package_association("Qt" QT_PACKAGE_NAME)
  14. ly_package_get_target_folder(${QT_PACKAGE_NAME} QT_DOWNLOAD_LOCATION)
  15. set(QT_MODULE_DIR ${QT_DOWNLOAD_LOCATION}/${QT_PACKAGE_NAME}/qt)
  16. # The library we're creating bindings for.
  17. set(AZQTCOMPONENTS_LIBRARY "AzQtComponents")
  18. #Define the shared library for which we will create bindings.
  19. set_property(TARGET ${AZQTCOMPONENTS_LIBRARY} PROPERTY PREFIX "")
  20. add_shiboken_project(
  21. NAME AzQtComponentsForPython
  22. NAMESPACE Gem
  23. MODULE_NAME azqtpyside
  24. WRAPPED_HEADER ${CMAKE_CURRENT_LIST_DIR}/bindings_azqtcomponents.h
  25. TYPESYSTEM_FILE ${CMAKE_CURRENT_LIST_DIR}/bindings_azqtcomponents.xml
  26. GENERATED_FILES ${CMAKE_CURRENT_LIST_DIR}/generated_files.cmake
  27. LICENSE_HEADER ${CMAKE_CURRENT_LIST_DIR}/license_header.txt
  28. DEPENDENCIES
  29. ${AZQTCOMPONENTS_LIBRARY}
  30. Gem::EditorPythonBindings.Static
  31. INCLUDE_DIRS
  32. ${LY_ROOT_FOLDER}/Code/Framework/AzCore
  33. ${LY_ROOT_FOLDER}/Code/Framework/AzQtComponents
  34. ${LY_ROOT_FOLDER}/Code/Framework/AzCore/Platform/${PAL_PLATFORM_NAME}
  35. ${QT_MODULE_DIR}/include
  36. ${QT_MODULE_DIR}/include/QtWidgets
  37. ${QT_MODULE_DIR}/include/QtCore
  38. ${QT_MODULE_DIR}/include/QtGui
  39. )
  40. endif()