XIP.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #
  2. # XIP
  3. #
  4. set(proj XIP)
  5. set(${proj}_DEPENDENCIES "")
  6. ExternalProject_Include_Dependencies(${proj}
  7. PROJECT_VAR proj
  8. DEPENDS_VAR ${proj}_DEPENDENCIES
  9. EP_ARGS_VAR ${proj}_EXTERNAL_PROJECT_ARGS
  10. USE_SYSTEM_VAR ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}
  11. )
  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 XIP_DIR AND NOT EXISTS ${XIP_DIR})
  17. message(FATAL_ERROR "XIP_DIR variable is defined but corresponds to non-existing directory")
  18. endif()
  19. if(NOT DEFINED XIP_DIR)
  20. set(location_args )
  21. if(${proj}_URL)
  22. set(location_args URL ${${proj}_URL})
  23. else()
  24. set(location_args SVN_REPOSITORY "https://collab01a.scr.siemens.com/svn/xip/releases/latest"
  25. SVN_USERNAME "anonymous")
  26. endif()
  27. ExternalProject_Add(${proj}
  28. ${${proj}_EXTERNAL_PROJECT_ARGS}
  29. SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
  30. BINARY_DIR ${proj}-build
  31. PREFIX ${proj}${ep_suffix}
  32. ${location_args}
  33. INSTALL_COMMAND ""
  34. CMAKE_CACHE_ARGS
  35. ${ep_common_cache_args}
  36. -DHAS_VTK:BOOL=OFF
  37. -DHAS_ITK:BOOL=OFF
  38. DEPENDS
  39. ${${proj}_DEPENDENCIES}
  40. )
  41. set(XIP_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
  42. else()
  43. ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
  44. endif()
  45. mark_as_superbuild(
  46. VARS XIP_DIR:PATH
  47. LABELS "FIND_PACKAGE"
  48. )