XIP.cmake 1.3 KB

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