LibiglDownloadExternal.cmake 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. ################################################################################
  2. include(DownloadProject)
  3. # With CMake 3.8 and above, we can hide warnings about git being in a
  4. # detached head by passing an extra GIT_CONFIG option
  5. if(NOT (${CMAKE_VERSION} VERSION_LESS "3.8.0"))
  6. set(LIBIGL_EXTRA_OPTIONS "GIT_CONFIG advice.detachedHead=false")
  7. else()
  8. set(LIBIGL_EXTRA_OPTIONS "")
  9. endif()
  10. # Shortcut function
  11. function(igl_download_project name)
  12. download_project(
  13. PROJ ${name}
  14. SOURCE_DIR ${LIBIGL_EXTERNAL}/${name}
  15. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/${name}
  16. QUIET
  17. ${LIBIGL_EXTRA_OPTIONS}
  18. ${ARGN}
  19. )
  20. endfunction()
  21. ################################################################################
  22. ## CGAL
  23. function(igl_download_cgal)
  24. igl_download_project(cgal
  25. GIT_REPOSITORY https://github.com/CGAL/cgal.git
  26. GIT_TAG f7c3c8212b56c0d6dae63787efc99093f4383415
  27. )
  28. endfunction()
  29. ## CoMISo
  30. function(igl_download_comiso)
  31. igl_download_project(CoMISo
  32. GIT_REPOSITORY https://github.com/libigl/CoMISo.git
  33. GIT_TAG fea3ee0ba7d42ee3eca202d484e4fad855e4d6aa
  34. )
  35. endfunction()
  36. ## Cork
  37. function(igl_download_cork)
  38. igl_download_project(cork
  39. GIT_REPOSITORY https://github.com/libigl/cork.git
  40. GIT_TAG 27ad8a285838f5a480d856429e39d3d56d4338f9
  41. )
  42. endfunction()
  43. ## Eigen
  44. function(igl_download_eigen)
  45. igl_download_project(eigen
  46. URL http://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz
  47. URL_MD5 8ad10ac703a78143a4062c9bda9d8fd3
  48. )
  49. endfunction()
  50. ## Embree
  51. function(igl_download_embree)
  52. igl_download_project(embree
  53. URL https://github.com/embree/embree/archive/v3.2.3.tar.gz
  54. URL_MD5 1868cda1c97d83d7a0b67b0b64b18cef
  55. # GIT_REPOSITORY https://github.com/embree/embree.git
  56. # GIT_TAG cb61322db3bb7082caed21913ad14869b436fe78
  57. )
  58. endfunction()
  59. ## glad
  60. function(igl_download_glad)
  61. igl_download_project(glad
  62. GIT_REPOSITORY https://github.com/libigl/libigl-glad.git
  63. GIT_TAG 71e35fe685a0cc160068a2f2f971c40b82d14af0
  64. )
  65. endfunction()
  66. ## GLFW
  67. function(igl_download_glfw)
  68. igl_download_project(glfw
  69. GIT_REPOSITORY https://github.com/glfw/glfw.git
  70. GIT_TAG 58cc4b2c5c2c9a245e09451437dd6f5af4d60c84
  71. )
  72. endfunction()
  73. ## ImGui
  74. function(igl_download_imgui)
  75. igl_download_project(imgui
  76. GIT_REPOSITORY https://github.com/ocornut/imgui.git
  77. GIT_TAG bc6ac8b2aee0614debd940e45bc9cd0d9b355c86
  78. )
  79. igl_download_project(libigl-imgui
  80. GIT_REPOSITORY https://github.com/libigl/libigl-imgui.git
  81. GIT_TAG a37e6e59e72fb07bd787dc7e90f72b9e1928dae7
  82. )
  83. endfunction()
  84. ## pybind11
  85. function(igl_download_pybind11)
  86. igl_download_project(pybind11
  87. GIT_REPOSITORY https://github.com/pybind/pybind11.git
  88. GIT_TAG 2d0507db43cd5a117f7843e053b17dffca114107
  89. )
  90. endfunction()
  91. ## stb_image
  92. function(igl_download_stb)
  93. igl_download_project(stb
  94. GIT_REPOSITORY https://github.com/libigl/libigl-stb.git
  95. GIT_TAG e671ceb3def5e7029a23de14c55dc16301ad4dab
  96. )
  97. endfunction()
  98. ## TetGen
  99. function(igl_download_tetgen)
  100. igl_download_project(tetgen
  101. GIT_REPOSITORY https://github.com/libigl/tetgen.git
  102. GIT_TAG d2dcc33cb8551f16e302c8130ce12fa52992cd09
  103. )
  104. endfunction()
  105. ## TinyXML
  106. function(igl_download_tinyxml2)
  107. igl_download_project(tinyxml2
  108. GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
  109. GIT_TAG d175e9de0be0d4db75d0a8cf065599a435a87eb6
  110. )
  111. endfunction()
  112. ## Triangle
  113. function(igl_download_triangle)
  114. igl_download_project(triangle
  115. GIT_REPOSITORY https://github.com/libigl/triangle.git
  116. GIT_TAG d6761dd691e2e1318c83bf7773fea88d9437464a
  117. )
  118. endfunction()
  119. ## Catch2
  120. function(igl_download_catch2)
  121. igl_download_project(catch2
  122. GIT_REPOSITORY https://github.com/catchorg/Catch2.git
  123. GIT_TAG 03d122a35c3f5c398c43095a87bc82ed44642516
  124. )
  125. endfunction()
  126. ################################################################################
  127. ## Test data
  128. function(igl_download_test_data)
  129. set(IGL_TEST_DATA ${LIBIGL_EXTERNAL}/../tests/data)
  130. download_project(
  131. PROJ test_data
  132. SOURCE_DIR ${IGL_TEST_DATA}
  133. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/test_data
  134. QUIET
  135. GIT_REPOSITORY https://github.com/libigl/libigl-tests-data
  136. GIT_TAG c81bb3b3db4cfd78bac6d359d845c45bc1059c9a
  137. ${LIBIGL_EXTRA_OPTIONS}
  138. )
  139. endfunction()
  140. ## Tutorial data
  141. function(igl_download_tutorial_data)
  142. set(IGL_TUTORIAL_DATA ${LIBIGL_EXTERNAL}/../tutorial/data)
  143. download_project(
  144. PROJ tutorial_data
  145. SOURCE_DIR ${IGL_TUTORIAL_DATA}
  146. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/tutorial_data
  147. QUIET
  148. GIT_REPOSITORY https://github.com/libigl/libigl-tutorial-data
  149. GIT_TAG 5c6a1ea809c043d71e5595775709c15325a7158c
  150. ${LIBIGL_EXTRA_OPTIONS}
  151. )
  152. endfunction()