LibiglDownloadExternal.cmake 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. set(LIBIGL_EXTRA_OPTIONS TLS_VERIFY OFF)
  6. if(NOT (${CMAKE_VERSION} VERSION_LESS "3.8.0"))
  7. list(APPEND LIBIGL_EXTRA_OPTIONS GIT_CONFIG advice.detachedHead=false)
  8. endif()
  9. option(LIBIGL_SKIP_DOWNLOAD "Skip downloading external libraries" OFF)
  10. # Shortcut functions
  11. function(igl_download_project_aux name source)
  12. if(NOT LIBIGL_SKIP_DOWNLOAD)
  13. download_project(
  14. PROJ ${name}
  15. SOURCE_DIR "${LIBIGL_EXTERNAL}/${name}"
  16. DOWNLOAD_DIR "${LIBIGL_EXTERNAL}/.cache/${name}"
  17. QUIET
  18. ${LIBIGL_EXTRA_OPTIONS}
  19. ${ARGN}
  20. )
  21. endif()
  22. endfunction()
  23. function(igl_download_project name)
  24. igl_download_project_aux(${name} "${LIBIGL_EXTERNAL}/${name}" ${ARGN})
  25. endfunction()
  26. ################################################################################
  27. ## CGAL
  28. function(igl_download_cgal)
  29. igl_download_project(cgal
  30. GIT_REPOSITORY https://github.com/CGAL/cgal.git
  31. GIT_TAG f7c3c8212b56c0d6dae63787efc99093f4383415
  32. )
  33. endfunction()
  34. ## CoMISo
  35. function(igl_download_comiso)
  36. igl_download_project(CoMISo
  37. GIT_REPOSITORY https://github.com/libigl/CoMISo.git
  38. GIT_TAG 1f9618cf9b7bd77370d817976470d59091928606
  39. )
  40. endfunction()
  41. ## Cork
  42. function(igl_download_cork)
  43. igl_download_project(cork
  44. GIT_REPOSITORY https://github.com/libigl/cork.git
  45. GIT_TAG 27ad8a285838f5a480d856429e39d3d56d4338f9
  46. )
  47. endfunction()
  48. ## Eigen
  49. # 3.2.10 8ad10ac703a78143a4062c9bda9d8fd3
  50. # 3.3.7 f2a417d083fe8ca4b8ed2bc613d20f07
  51. set(LIBIGL_EIGEN_VERSION 3.2.10 CACHE STRING "Default version of Eigen used by libigl.")
  52. set(LIBIGL_EIGEN_MD5 8ad10ac703a78143a4062c9bda9d8fd3 CACHE STRING "md5sum of the tar.gz archive corresponding to this version.")
  53. function(igl_download_eigen)
  54. igl_download_project(eigen
  55. URL http://bitbucket.org/eigen/eigen/get/${LIBIGL_EIGEN_VERSION}.tar.gz
  56. URL_MD5 ${LIBIGL_EIGEN_MD5}
  57. )
  58. endfunction()
  59. ## Embree
  60. function(igl_download_embree)
  61. igl_download_project(embree
  62. URL https://github.com/embree/embree/archive/v3.2.3.tar.gz
  63. URL_MD5 1868cda1c97d83d7a0b67b0b64b18cef
  64. # GIT_REPOSITORY https://github.com/embree/embree.git
  65. # GIT_TAG cb61322db3bb7082caed21913ad14869b436fe78
  66. )
  67. endfunction()
  68. ## glad
  69. function(igl_download_glad)
  70. igl_download_project(glad
  71. GIT_REPOSITORY https://github.com/libigl/libigl-glad.git
  72. GIT_TAG 09b4969c56779f7ddf8e6176ec1873184aec890f
  73. )
  74. endfunction()
  75. ## GLFW
  76. function(igl_download_glfw)
  77. igl_download_project(glfw
  78. GIT_REPOSITORY https://github.com/glfw/glfw.git
  79. GIT_TAG 53c8c72c676ca97c10aedfe3d0eb4271c5b23dba
  80. )
  81. endfunction()
  82. ## ImGui
  83. function(igl_download_imgui)
  84. igl_download_project(imgui
  85. GIT_REPOSITORY https://github.com/ocornut/imgui.git
  86. GIT_TAG bc6ac8b2aee0614debd940e45bc9cd0d9b355c86
  87. )
  88. igl_download_project(libigl-imgui
  89. GIT_REPOSITORY https://github.com/libigl/libigl-imgui.git
  90. GIT_TAG a37e6e59e72fb07bd787dc7e90f72b9e1928dae7
  91. )
  92. endfunction()
  93. ## pybind11
  94. function(igl_download_pybind11)
  95. igl_download_project(pybind11
  96. GIT_REPOSITORY https://github.com/pybind/pybind11.git
  97. GIT_TAG 2d0507db43cd5a117f7843e053b17dffca114107
  98. )
  99. endfunction()
  100. ## stb_image
  101. function(igl_download_stb)
  102. igl_download_project(stb
  103. GIT_REPOSITORY https://github.com/libigl/libigl-stb.git
  104. GIT_TAG edfa26e389060c21b9dd7812a0b19c00208b7224
  105. )
  106. endfunction()
  107. ## TetGen
  108. function(igl_download_tetgen)
  109. igl_download_project(tetgen
  110. GIT_REPOSITORY https://github.com/jdumas/tetgen.git
  111. GIT_TAG c63e7a6434652b8a2065c835bd9d6d298db1a0bc
  112. )
  113. endfunction()
  114. ## TinyXML
  115. function(igl_download_tinyxml2)
  116. igl_download_project(tinyxml2
  117. GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
  118. GIT_TAG d175e9de0be0d4db75d0a8cf065599a435a87eb6
  119. )
  120. endfunction()
  121. ## Triangle
  122. function(igl_download_triangle)
  123. igl_download_project(triangle
  124. GIT_REPOSITORY https://github.com/jdumas/triangle.git
  125. GIT_TAG 2cd0672ff1f67f9f6bb8e556e84901293e637b76
  126. )
  127. endfunction()
  128. ## Catch2
  129. function(igl_download_catch2)
  130. igl_download_project(catch2
  131. GIT_REPOSITORY https://github.com/catchorg/Catch2.git
  132. GIT_TAG 03d122a35c3f5c398c43095a87bc82ed44642516
  133. )
  134. endfunction()
  135. ################################################################################
  136. ## Test data
  137. function(igl_download_test_data)
  138. igl_download_project_aux(test_data
  139. "${LIBIGL_EXTERNAL}/../tests/data"
  140. GIT_REPOSITORY https://github.com/libigl/libigl-tests-data
  141. GIT_TAG adc66cabf712a0bd68ac182b4e7f8b5ba009c3dd
  142. )
  143. endfunction()
  144. ## Tutorial data
  145. function(igl_download_tutorial_data)
  146. igl_download_project_aux(tutorial_data
  147. "${LIBIGL_EXTERNAL}/../tutorial/data"
  148. GIT_REPOSITORY https://github.com/libigl/libigl-tutorial-data
  149. GIT_TAG 5c6a1ea809c043d71e5595775709c15325a7158c
  150. )
  151. endfunction()