QtSOAP.cmake 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #
  2. # QtSOAP
  3. #
  4. ctkMacroShouldAddExternalproject(QtSOAP_LIBRARIES add_project)
  5. if(${add_project})
  6. # Sanity checks
  7. if(DEFINED QtSOAP_DIR AND NOT EXISTS ${QtSOAP_DIR})
  8. message(FATAL_ERROR "QtSOAP_DIR variable is defined but corresponds to non-existing directory")
  9. endif()
  10. set(QtSOAP_enabling_variable QtSOAP_LIBRARIES)
  11. set(proj QtSOAP)
  12. set(proj_DEPENDENCIES)
  13. list(APPEND CTK_DEPENDENCIES ${proj})
  14. set(${QtSOAP_enabling_variable}_LIBRARY_DIRS QtSOAP_LIBRARY_DIRS)
  15. set(${QtSOAP_enabling_variable}_INCLUDE_DIRS QtSOAP_INCLUDE_DIRS)
  16. set(${QtSOAP_enabling_variable}_FIND_PACKAGE_CMD QtSOAP)
  17. if(CTK_SUPERBUILD)
  18. if(NOT DEFINED QtSOAP_DIR)
  19. set(revision_tag 3e49f7a4a1a684779eb66215bad46140d9153731)
  20. if(${proj}_REVISION_TAG)
  21. set(revision_tag ${${proj}_REVISION_TAG})
  22. endif()
  23. set(location_args )
  24. if(${proj}_URL)
  25. set(location_args URL ${${proj}_URL})
  26. elseif(${proj}_GIT_REPOSITORY)
  27. set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
  28. GIT_TAG ${revision_tag})
  29. else()
  30. set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git"
  31. GIT_TAG ${revision_tag})
  32. endif()
  33. # message(STATUS "Adding project:${proj}")
  34. ExternalProject_Add(${proj}
  35. SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
  36. BINARY_DIR ${proj}-build
  37. PREFIX ${proj}${ep_suffix}
  38. ${location_args}
  39. CMAKE_GENERATOR ${gen}
  40. UPDATE_COMMAND ""
  41. INSTALL_COMMAND ""
  42. CMAKE_CACHE_ARGS
  43. ${ep_common_cache_args}
  44. -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${CTK_CMAKE_RUNTIME_OUTPUT_DIRECTORY}
  45. -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
  46. DEPENDS
  47. ${proj_DEPENDENCIES}
  48. )
  49. set(QtSOAP_DIR "${CMAKE_BINARY_DIR}/${proj}-build")
  50. # Since the QtSOAP dll is created directly in CTK-build/bin, there is not need to add a
  51. # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
  52. else()
  53. ctkMacroEmptyExternalproject(${proj} "${proj_DEPENDENCIES}")
  54. endif()
  55. list(APPEND CTK_SUPERBUILD_EP_VARS QtSOAP_DIR:PATH)
  56. endif()
  57. endif()