deps-macos.cmake 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # This ensures dependencies don't use SDK features which are not available in the version specified by Deployment target
  2. # That can happen when one uses a recent SDK but specifies an older Deployment target
  3. set(DEP_WERRORS_SDK "-Werror=partial-availability -Werror=unguarded-availability -Werror=unguarded-availability-new")
  4. set(DEP_CMAKE_OPTS
  5. "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
  6. "-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}"
  7. "-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEP_OSX_TARGET}"
  8. "-DCMAKE_CXX_FLAGS=${DEP_WERRORS_SDK}"
  9. "-DCMAKE_C_FLAGS=${DEP_WERRORS_SDK}"
  10. )
  11. include("deps-unix-common.cmake")
  12. ExternalProject_Add(dep_boost
  13. EXCLUDE_FROM_ALL 1
  14. URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
  15. URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
  16. BUILD_IN_SOURCE 1
  17. CONFIGURE_COMMAND ./bootstrap.sh
  18. --with-toolset=clang
  19. --with-libraries=system,iostreams,filesystem,thread,log,locale,regex
  20. "--prefix=${DESTDIR}/usr/local"
  21. BUILD_COMMAND ./b2
  22. -j ${NPROC}
  23. --reconfigure
  24. toolset=clang
  25. link=static
  26. variant=release
  27. threading=multi
  28. boost.locale.icu=off
  29. "cflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  30. "cxxflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  31. "mflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  32. "mmflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  33. install
  34. INSTALL_COMMAND "" # b2 does that already
  35. )
  36. ExternalProject_Add(dep_libcurl
  37. EXCLUDE_FROM_ALL 1
  38. URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
  39. URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
  40. BUILD_IN_SOURCE 1
  41. CONFIGURE_COMMAND ./configure
  42. --enable-static
  43. --disable-shared
  44. "--with-ssl=${DESTDIR}/usr/local"
  45. --with-pic
  46. --enable-ipv6
  47. --enable-versioned-symbols
  48. --enable-threaded-resolver
  49. --with-darwinssl
  50. --without-ssl # disables OpenSSL
  51. --disable-ldap
  52. --disable-ldaps
  53. --disable-manual
  54. --disable-rtsp
  55. --disable-dict
  56. --disable-telnet
  57. --disable-pop3
  58. --disable-imap
  59. --disable-smb
  60. --disable-smtp
  61. --disable-gopher
  62. --disable-crypto-auth
  63. --without-gssapi
  64. --without-libpsl
  65. --without-libidn2
  66. --without-gnutls
  67. --without-polarssl
  68. --without-mbedtls
  69. --without-cyassl
  70. --without-nss
  71. --without-axtls
  72. --without-brotli
  73. --without-libmetalink
  74. --without-libssh
  75. --without-libssh2
  76. --without-librtmp
  77. --without-nghttp2
  78. --without-zsh-functions-dir
  79. BUILD_COMMAND make "-j${NPROC}"
  80. INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  81. )
  82. add_dependencies(dep_openvdb dep_boost)