QtSOAP.cmake 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # QtSOAP
  3. #
  4. ctk_include_once()
  5. set(QtSOAP_enabling_variable QtSOAP_LIBRARIES)
  6. set(${QtSOAP_enabling_variable}_LIBRARY_DIRS QtSOAP_LIBRARY_DIRS)
  7. set(${QtSOAP_enabling_variable}_INCLUDE_DIRS QtSOAP_INCLUDE_DIRS)
  8. set(${QtSOAP_enabling_variable}_FIND_PACKAGE_CMD QtSOAP)
  9. set(QtSOAP_DEPENDENCIES "")
  10. ctkMacroCheckExternalProjectDependency(QtSOAP)
  11. set(proj QtSOAP)
  12. if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
  13. message(FATAL_ERROR "Enabling ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} is not supported !")
  14. endif()
  15. # Sanity checks
  16. if(DEFINED QtSOAP_DIR AND NOT EXISTS ${QtSOAP_DIR})
  17. message(FATAL_ERROR "QtSOAP_DIR variable is defined but corresponds to non-existing directory")
  18. endif()
  19. if(NOT DEFINED QtSOAP_DIR)
  20. set(revision_tag 3e49f7a4a1a684779eb66215bad46140d9153731)
  21. if(${proj}_REVISION_TAG)
  22. set(revision_tag ${${proj}_REVISION_TAG})
  23. endif()
  24. set(location_args )
  25. if(${proj}_URL)
  26. set(location_args URL ${${proj}_URL})
  27. elseif(${proj}_GIT_REPOSITORY)
  28. set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
  29. GIT_TAG ${revision_tag})
  30. else()
  31. set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/QtSOAP.git"
  32. GIT_TAG ${revision_tag})
  33. endif()
  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. LIST_SEPARATOR ${sep}
  43. CMAKE_CACHE_ARGS
  44. ${ep_common_cache_args}
  45. -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${CTK_CMAKE_RUNTIME_OUTPUT_DIRECTORY}
  46. -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
  47. DEPENDS
  48. ${${proj}_DEPENDENCIES}
  49. )
  50. set(QtSOAP_DIR "${CMAKE_BINARY_DIR}/${proj}-build")
  51. # Since the QtSOAP dll is created directly in CTK-build/bin, there is not need to add a
  52. # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
  53. else()
  54. ctkMacroEmptyExternalproject(${proj} "${${proj}_DEPENDENCIES}")
  55. endif()
  56. list(APPEND CTK_SUPERBUILD_EP_VARS QtSOAP_DIR:PATH)