QtSOAP.cmake 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #
  2. # QtSOAP
  3. #
  4. superbuild_include_once()
  5. set(proj QtSOAP)
  6. set(${proj}_DEPENDENCIES "")
  7. superbuild_include_dependencies(PROJECT_VAR proj)
  8. if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
  9. message(FATAL_ERROR "Enabling ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} is not supported !")
  10. endif()
  11. # Sanity checks
  12. if(DEFINED QtSOAP_DIR AND NOT EXISTS ${QtSOAP_DIR})
  13. message(FATAL_ERROR "QtSOAP_DIR variable is defined but corresponds to non-existing directory")
  14. endif()
  15. if(NOT DEFINED QtSOAP_DIR)
  16. set(revision_tag 3e49f7a4a1a684779eb66215bad46140d9153731)
  17. if(${proj}_REVISION_TAG)
  18. set(revision_tag ${${proj}_REVISION_TAG})
  19. endif()
  20. set(location_args )
  21. if(${proj}_URL)
  22. set(location_args URL ${${proj}_URL})
  23. elseif(${proj}_GIT_REPOSITORY)
  24. set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
  25. GIT_TAG ${revision_tag})
  26. else()
  27. set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git"
  28. GIT_TAG ${revision_tag})
  29. endif()
  30. ExternalProject_Add(${proj}
  31. ${${proj}_EXTERNAL_PROJECT_ARGS}
  32. SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
  33. BINARY_DIR ${proj}-build
  34. PREFIX ${proj}${ep_suffix}
  35. ${location_args}
  36. UPDATE_COMMAND ""
  37. INSTALL_COMMAND ""
  38. CMAKE_CACHE_ARGS
  39. ${ep_common_cache_args}
  40. -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${CTK_CMAKE_RUNTIME_OUTPUT_DIRECTORY}
  41. -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
  42. DEPENDS
  43. ${${proj}_DEPENDENCIES}
  44. )
  45. set(QtSOAP_DIR "${CMAKE_BINARY_DIR}/${proj}-build")
  46. else()
  47. superbuild_add_empty_external_project(${proj} "${${proj}_DEPENDENCIES}")
  48. endif()
  49. mark_as_superbuild(
  50. VARS QtSOAP_DIR:PATH
  51. LABELS "FIND_PACKAGE"
  52. )