deps-unix-common.cmake 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # The unix common part expects DEP_CMAKE_OPTS to be set
  2. if (MINGW)
  3. set(TBB_MINGW_WORKAROUND "-flifetime-dse=1")
  4. else ()
  5. set(TBB_MINGW_WORKAROUND "")
  6. endif ()
  7. find_package(ZLIB QUIET)
  8. if (NOT ZLIB_FOUND)
  9. include(ZLIB/ZLIB.cmake)
  10. endif ()
  11. ExternalProject_Add(dep_tbb
  12. EXCLUDE_FROM_ALL 1
  13. URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
  14. URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe
  15. CMAKE_ARGS
  16. -DTBB_BUILD_SHARED=OFF
  17. -DTBB_BUILD_TESTS=OFF
  18. -DCMAKE_CXX_FLAGS=${TBB_MINGW_WORKAROUND}
  19. -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  20. ${DEP_CMAKE_OPTS}
  21. )
  22. ExternalProject_Add(dep_gtest
  23. EXCLUDE_FROM_ALL 1
  24. URL "https://github.com/google/googletest/archive/release-1.8.1.tar.gz"
  25. URL_HASH SHA256=9bf1fe5182a604b4135edc1a425ae356c9ad15e9b23f9f12a02e80184c3a249c
  26. CMAKE_ARGS -DBUILD_GMOCK=OFF ${DEP_CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  27. )
  28. ExternalProject_Add(dep_cereal
  29. EXCLUDE_FROM_ALL 1
  30. URL "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz"
  31. # URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
  32. CMAKE_ARGS
  33. -DJUST_INSTALL_CEREAL=on
  34. -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  35. ${DEP_CMAKE_OPTS}
  36. )
  37. ExternalProject_Add(dep_nlopt
  38. EXCLUDE_FROM_ALL 1
  39. URL "https://github.com/stevengj/nlopt/archive/v2.5.0.tar.gz"
  40. URL_HASH SHA256=c6dd7a5701fff8ad5ebb45a3dc8e757e61d52658de3918e38bab233e7fd3b4ae
  41. CMAKE_ARGS
  42. -DBUILD_SHARED_LIBS=OFF
  43. -DNLOPT_PYTHON=OFF
  44. -DNLOPT_OCTAVE=OFF
  45. -DNLOPT_MATLAB=OFF
  46. -DNLOPT_GUILE=OFF
  47. -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  48. ${DEP_CMAKE_OPTS}
  49. )
  50. ExternalProject_Add(dep_qhull
  51. EXCLUDE_FROM_ALL 1
  52. #URL "https://github.com/qhull/qhull/archive/v7.3.2.tar.gz"
  53. #URL_HASH SHA256=619c8a954880d545194bc03359404ef36a1abd2dde03678089459757fd790cb0
  54. GIT_REPOSITORY https://github.com/qhull/qhull.git
  55. GIT_TAG 7afedcc73666e46a9f1d74632412ebecf53b1b30 # v7.3.2 plus the mac build patch
  56. CMAKE_ARGS
  57. -DBUILD_SHARED_LIBS=OFF
  58. -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  59. ${DEP_CMAKE_OPTS}
  60. )
  61. ExternalProject_Add(dep_blosc
  62. EXCLUDE_FROM_ALL 1
  63. GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
  64. GIT_TAG e63775855294b50820ef44d1b157f4de1cc38d3e #v1.17.0
  65. DEPENDS
  66. CMAKE_ARGS
  67. -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  68. -DBUILD_SHARED_LIBS=OFF
  69. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  70. -DCMAKE_DEBUG_POSTFIX=d
  71. -DBUILD_SHARED=OFF
  72. -DBUILD_STATIC=ON
  73. -DBUILD_TESTS=OFF
  74. -DBUILD_BENCHMARKS=OFF
  75. -DPREFER_EXTERNAL_ZLIB=ON
  76. PATCH_COMMAND ${GIT_EXECUTABLE} reset --hard && git clean -df &&
  77. ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_SOURCE_DIR}/blosc-mods.patch
  78. )
  79. ExternalProject_Add(dep_openexr
  80. EXCLUDE_FROM_ALL 1
  81. GIT_REPOSITORY https://github.com/openexr/openexr.git
  82. GIT_TAG eae0e337c9f5117e78114fd05f7a415819df413a #v2.4.0
  83. CMAKE_ARGS
  84. -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  85. -DBUILD_SHARED_LIBS=OFF
  86. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  87. -DBUILD_TESTING=OFF
  88. -DPYILMBASE_ENABLE:BOOL=OFF
  89. -DOPENEXR_VIEWERS_ENABLE:BOOL=OFF
  90. -DOPENEXR_BUILD_UTILS:BOOL=OFF
  91. )
  92. ExternalProject_Add(dep_openvdb
  93. EXCLUDE_FROM_ALL 1
  94. GIT_REPOSITORY https://github.com/AcademySoftwareFoundation/openvdb.git
  95. GIT_TAG aebaf8d95be5e57fd33949281ec357db4a576c2e #v6.2.1
  96. DEPENDS dep_blosc dep_openexr dep_tbb
  97. CMAKE_ARGS
  98. -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr/local
  99. -DCMAKE_DEBUG_POSTFIX=d
  100. -DCMAKE_PREFIX_PATH=${DESTDIR}/usr/local
  101. -DBUILD_SHARED_LIBS=OFF
  102. -DCMAKE_POSITION_INDEPENDENT_CODE=ON
  103. -DOPENVDB_BUILD_PYTHON_MODULE=OFF
  104. -DUSE_BLOSC=ON
  105. -DOPENVDB_CORE_SHARED=OFF
  106. -DOPENVDB_CORE_STATIC=ON
  107. -DTBB_STATIC=ON
  108. -DOPENVDB_BUILD_VDB_PRINT=ON
  109. -DDISABLE_DEPENDENCY_VERSION_CHECKS=ON
  110. PATCH_COMMAND PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
  111. ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_SOURCE_DIR}/openvdb-mods.patch
  112. )