LibiglDownloadExternal.cmake 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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 1f9618cf9b7bd77370d817976470d59091928606
  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. # 3.2.10 8ad10ac703a78143a4062c9bda9d8fd3
  45. # 3.3.7 f2a417d083fe8ca4b8ed2bc613d20f07
  46. option(LIBIGL_EIGEN_VERSION "Default version of Eigen used by libigl." 3.2.10)
  47. option(LIBIGL_EIGEN_MD5 "md5sum of the tar.gz archive corresponding to this version." 8ad10ac703a78143a4062c9bda9d8fd3)
  48. function(igl_download_eigen)
  49. igl_download_project(eigen
  50. URL http://bitbucket.org/eigen/eigen/get/${LIBIGL_EIGEN_VERSION}.tar.gz
  51. URL_MD5 ${LIBIGL_EIGEN_MD5}
  52. )
  53. endfunction()
  54. ## Embree
  55. function(igl_download_embree)
  56. igl_download_project(embree
  57. URL https://github.com/embree/embree/archive/v3.2.3.tar.gz
  58. URL_MD5 1868cda1c97d83d7a0b67b0b64b18cef
  59. # GIT_REPOSITORY https://github.com/embree/embree.git
  60. # GIT_TAG cb61322db3bb7082caed21913ad14869b436fe78
  61. )
  62. endfunction()
  63. ## glad
  64. function(igl_download_glad)
  65. igl_download_project(glad
  66. GIT_REPOSITORY https://github.com/libigl/libigl-glad.git
  67. GIT_TAG 09b4969c56779f7ddf8e6176ec1873184aec890f
  68. )
  69. endfunction()
  70. ## GLFW
  71. function(igl_download_glfw)
  72. igl_download_project(glfw
  73. GIT_REPOSITORY https://github.com/glfw/glfw.git
  74. GIT_TAG 53c8c72c676ca97c10aedfe3d0eb4271c5b23dba
  75. )
  76. endfunction()
  77. ## ImGui
  78. function(igl_download_imgui)
  79. igl_download_project(imgui
  80. GIT_REPOSITORY https://github.com/ocornut/imgui.git
  81. GIT_TAG bc6ac8b2aee0614debd940e45bc9cd0d9b355c86
  82. )
  83. igl_download_project(libigl-imgui
  84. GIT_REPOSITORY https://github.com/libigl/libigl-imgui.git
  85. GIT_TAG a37e6e59e72fb07bd787dc7e90f72b9e1928dae7
  86. )
  87. endfunction()
  88. ## pybind11
  89. function(igl_download_pybind11)
  90. igl_download_project(pybind11
  91. GIT_REPOSITORY https://github.com/pybind/pybind11.git
  92. GIT_TAG 2d0507db43cd5a117f7843e053b17dffca114107
  93. )
  94. endfunction()
  95. ## stb_image
  96. function(igl_download_stb)
  97. igl_download_project(stb
  98. GIT_REPOSITORY https://github.com/libigl/libigl-stb.git
  99. GIT_TAG edfa26e389060c21b9dd7812a0b19c00208b7224
  100. )
  101. endfunction()
  102. ## TetGen
  103. function(igl_download_tetgen)
  104. igl_download_project(tetgen
  105. GIT_REPOSITORY https://github.com/jdumas/tetgen.git
  106. GIT_TAG c63e7a6434652b8a2065c835bd9d6d298db1a0bc
  107. )
  108. endfunction()
  109. ## TinyXML
  110. function(igl_download_tinyxml2)
  111. igl_download_project(tinyxml2
  112. GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
  113. GIT_TAG d175e9de0be0d4db75d0a8cf065599a435a87eb6
  114. )
  115. endfunction()
  116. ## Triangle
  117. function(igl_download_triangle)
  118. igl_download_project(triangle
  119. GIT_REPOSITORY https://github.com/jdumas/triangle.git
  120. GIT_TAG 2cd0672ff1f67f9f6bb8e556e84901293e637b76
  121. )
  122. endfunction()
  123. ## Catch2
  124. function(igl_download_catch2)
  125. igl_download_project(catch2
  126. GIT_REPOSITORY https://github.com/catchorg/Catch2.git
  127. GIT_TAG 03d122a35c3f5c398c43095a87bc82ed44642516
  128. )
  129. endfunction()
  130. ################################################################################
  131. ## Test data
  132. function(igl_download_test_data)
  133. set(IGL_TEST_DATA ${LIBIGL_EXTERNAL}/../tests/data)
  134. download_project(
  135. PROJ test_data
  136. SOURCE_DIR ${IGL_TEST_DATA}
  137. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/test_data
  138. QUIET
  139. GIT_REPOSITORY https://github.com/libigl/libigl-tests-data
  140. GIT_TAG adc66cabf712a0bd68ac182b4e7f8b5ba009c3dd
  141. ${LIBIGL_EXTRA_OPTIONS}
  142. )
  143. endfunction()
  144. ## Tutorial data
  145. function(igl_download_tutorial_data)
  146. set(IGL_TUTORIAL_DATA ${LIBIGL_EXTERNAL}/../tutorial/data)
  147. download_project(
  148. PROJ tutorial_data
  149. SOURCE_DIR ${IGL_TUTORIAL_DATA}
  150. DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/tutorial_data
  151. QUIET
  152. GIT_REPOSITORY https://github.com/libigl/libigl-tutorial-data
  153. GIT_TAG 5c6a1ea809c043d71e5595775709c15325a7158c
  154. ${LIBIGL_EXTRA_OPTIONS}
  155. )
  156. endfunction()