qxmlrpc.cmake 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # qxmlrpc
  3. #
  4. superbuild_include_once()
  5. set(qxmlrpc_enabling_variable qxmlrpc_LIBRARY)
  6. set(${qxmlrpc_enabling_variable}_LIBRARY_DIRS qxmlrpc_LIBRARY_DIRS)
  7. set(${qxmlrpc_enabling_variable}_INCLUDE_DIRS qxmlrpc_INCLUDE_DIRS)
  8. set(${qxmlrpc_enabling_variable}_FIND_PACKAGE_CMD qxmlrpc)
  9. set(qxmlrpc_DEPENDENCIES "")
  10. ctkMacroCheckExternalProjectDependency(qxmlrpc)
  11. set(proj qxmlrpc)
  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 qxmlrpc_DIR AND NOT EXISTS ${qxmlrpc_DIR})
  17. message(FATAL_ERROR "qxmlrpc_DIR variable is defined but corresponds to non-existing directory")
  18. endif()
  19. if(NOT DEFINED qxmlrpc_DIR)
  20. set(revision_tag 1d46d0e24d68049e726269dd3c6438671cd693ea)
  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/qxmlrpc.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. INSTALL_COMMAND ""
  41. LIST_SEPARATOR ${sep}
  42. CMAKE_ARGS
  43. ${ep_common_cache_args}
  44. -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
  45. DEPENDS
  46. ${${proj}_DEPENDENCIES}
  47. )
  48. set(qxmlrpc_DIR "${CMAKE_BINARY_DIR}/${proj}-build")
  49. # Since qxmlrpc is statically build, there is not need to add its corresponding
  50. # library output directory to CTK_EXTERNAL_LIBRARY_DIRS
  51. else()
  52. ctkMacroEmptyExternalproject(${proj} "${${proj}_DEPENDENCIES}")
  53. endif()
  54. list(APPEND CTK_SUPERBUILD_EP_VARS qxmlrpc_DIR:PATH)