CMakeLists.txt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright (c) 2008-2023 the Urho3D project
  2. # License: MIT
  3. if (NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
  4. # Set CMake minimum version and CMake policy required by UrhoCommon module
  5. cmake_minimum_required (VERSION 3.10.2)
  6. if (COMMAND cmake_policy)
  7. # Libraries linked via full path no longer produce linker search paths
  8. cmake_policy (SET CMP0003 NEW)
  9. # INTERFACE_LINK_LIBRARIES defines the link interface
  10. cmake_policy (SET CMP0022 NEW)
  11. # Disallow use of the LOCATION target property - so we set to OLD as we still need it
  12. cmake_policy (SET CMP0026 OLD)
  13. # MACOSX_RPATH is enabled by default
  14. cmake_policy (SET CMP0042 NEW)
  15. # Honor the visibility properties for SHARED target types only
  16. cmake_policy (SET CMP0063 OLD)
  17. endif ()
  18. # Set project name
  19. project (Urho3D-ExternalProject-BindingGenerator)
  20. # Set CMake modules search path
  21. set (CMAKE_MODULE_PATH ${BAKED_CMAKE_SOURCE_DIR}/CMake/Modules)
  22. # Include UrhoCommon.cmake module after setting project name
  23. include (UrhoCommon)
  24. # Add dependency targets
  25. add_subdirectory (${BAKED_CMAKE_SOURCE_DIR}/Source/ThirdParty/PugiXml host/PugiXml)
  26. # Setup SDK-like include dir in the build tree for building the host-tools
  27. set (DEST_INCLUDE_DIR include/Urho3D)
  28. set (INCLUDE_DIRS ${BAKED_CMAKE_BINARY_DIR}/${DEST_INCLUDE_DIR}/ThirdParty)
  29. endif ()
  30. # Define target name
  31. set (TARGET_NAME BindingGenerator)
  32. # Define source files
  33. define_source_files ()
  34. # Define dependency libs
  35. set (LIBS PugiXml)
  36. # Setup target
  37. setup_executable (TOOL NODEPS)
  38. # Preventing VS from placing cpp and h files to different groups
  39. source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SOURCE_FILES})