LibiglDownloadExternal.cmake 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. ################################################################################
  2. include(DownloadProject)
  3. # Shortcut function
  4. function(igl_download_project name)
  5. download_project(
  6. PROJ ${name}
  7. SOURCE_DIR ${LIBIGL_EXTERNAL}/${name}
  8. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/${name}
  9. QUIET
  10. ${ARGN}
  11. )
  12. endfunction()
  13. # Shortcut function
  14. function(igl_download_data folder name)
  15. download_project(
  16. PROJ ${name}
  17. SOURCE_DIR ${folder}/data
  18. DOWNLOAD_DIR ${folder}/.cache/data
  19. QUIET
  20. ${ARGN}
  21. )
  22. endfunction()
  23. ################################################################################
  24. ## CGAL
  25. function(igl_download_cgal)
  26. igl_download_project(cgal
  27. GIT_REPOSITORY https://github.com/CGAL/cgal.git
  28. GIT_TAG f7c3c8212b56c0d6dae63787efc99093f4383415
  29. )
  30. endfunction()
  31. ## CoMISo
  32. function(igl_download_comiso)
  33. igl_download_project(CoMISo
  34. GIT_REPOSITORY https://github.com/libigl/CoMISo.git
  35. GIT_TAG fea3ee0ba7d42ee3eca202d484e4fad855e4d6aa
  36. )
  37. endfunction()
  38. ## Cork
  39. function(igl_download_cork)
  40. igl_download_project(cork
  41. GIT_REPOSITORY https://github.com/libigl/cork.git
  42. GIT_TAG 27ad8a285838f5a480d856429e39d3d56d4338f9
  43. )
  44. endfunction()
  45. ## Eigen
  46. function(igl_download_eigen)
  47. igl_download_project(eigen
  48. URL http://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz
  49. URL_MD5 8ad10ac703a78143a4062c9bda9d8fd3
  50. )
  51. endfunction()
  52. ## Embree
  53. function(igl_download_embree)
  54. igl_download_project(embree
  55. URL https://github.com/embree/embree/archive/v2.17.4.tar.gz
  56. URL_MD5 2038f3216b1d626e87453aee72c470e5
  57. # GIT_REPOSITORY https://github.com/embree/embree.git
  58. # GIT_TAG cb61322db3bb7082caed21913ad14869b436fe78
  59. )
  60. endfunction()
  61. ## GLFW
  62. function(igl_download_glfw)
  63. igl_download_project(glfw
  64. GIT_REPOSITORY https://github.com/glfw/glfw.git
  65. GIT_TAG 58cc4b2c5c2c9a245e09451437dd6f5af4d60c84
  66. )
  67. endfunction()
  68. ## ImGui
  69. function(igl_download_imgui)
  70. download_project(
  71. PROJ imgui
  72. SOURCE_DIR ${LIBIGL_EXTERNAL}/imgui/imgui
  73. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/${name}
  74. GIT_REPOSITORY https://github.com/ocornut/imgui.git
  75. GIT_TAG bc6ac8b2aee0614debd940e45bc9cd0d9b355c86
  76. )
  77. endfunction()
  78. ## pybind11
  79. function(igl_download_pybind11)
  80. igl_download_project(pybind11
  81. GIT_REPOSITORY https://github.com/pybind/pybind11.git
  82. GIT_TAG 2d0507db43cd5a117f7843e053b17dffca114107
  83. )
  84. endfunction()
  85. ## TetGen
  86. function(igl_download_tetgen)
  87. igl_download_project(tetgen
  88. GIT_REPOSITORY https://github.com/libigl/tetgen.git
  89. GIT_TAG d2dcc33cb8551f16e302c8130ce12fa52992cd09
  90. )
  91. endfunction()
  92. ## TinyXML
  93. function(igl_download_tinyxml2)
  94. igl_download_project(tinyxml2
  95. GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
  96. GIT_TAG d175e9de0be0d4db75d0a8cf065599a435a87eb6
  97. )
  98. endfunction()
  99. ## Triangle
  100. function(igl_download_triangle)
  101. igl_download_project(triangle
  102. GIT_REPOSITORY https://github.com/libigl/triangle.git
  103. GIT_TAG d6761dd691e2e1318c83bf7773fea88d9437464a
  104. )
  105. endfunction()
  106. ## Google test
  107. function(igl_download_googletest)
  108. igl_download_project(googletest
  109. GIT_REPOSITORY https://github.com/google/googletest
  110. GIT_TAG release-1.8.1
  111. )
  112. endfunction()
  113. ################################################################################
  114. ## Test data
  115. function(igl_download_test_data)
  116. set(IGL_TEST_DATA ${LIBIGL_EXTERNAL}/../tests/data)
  117. download_project(
  118. PROJ test_data
  119. SOURCE_DIR ${IGL_TEST_DATA}
  120. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/test_data
  121. QUIET
  122. GIT_REPOSITORY https://github.com/libigl/libigl-tests-data
  123. GIT_TAG c81bb3b3db4cfd78bac6d359d845c45bc1059c9a
  124. )
  125. endfunction()
  126. ## Tutorial data
  127. function(igl_download_tutorial_data)
  128. set(IGL_TUTORIAL_DATA ${LIBIGL_EXTERNAL}/../tutorial/data)
  129. download_project(
  130. PROJ tutorial_data
  131. SOURCE_DIR ${IGL_TUTORIAL_DATA}
  132. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/tutorial_data
  133. QUIET
  134. GIT_REPOSITORY https://github.com/libigl/libigl-tutorial-data
  135. GIT_TAG 5c6a1ea809c043d71e5595775709c15325a7158c
  136. )
  137. endfunction()