deps-macos.cmake 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. "-DCMAKE_FIND_FRAMEWORK=LAST"
  11. "-DCMAKE_FIND_APPBUNDLE=LAST"
  12. )
  13. include("deps-unix-common.cmake")
  14. ExternalProject_Add(dep_boost
  15. EXCLUDE_FROM_ALL 1
  16. URL "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz"
  17. URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
  18. BUILD_IN_SOURCE 1
  19. CONFIGURE_COMMAND ./bootstrap.sh
  20. --with-toolset=clang
  21. --with-libraries=system,iostreams,filesystem,thread,log,locale,regex
  22. "--prefix=${DESTDIR}/usr/local"
  23. BUILD_COMMAND ./b2
  24. -j ${NPROC}
  25. --reconfigure
  26. toolset=clang
  27. link=static
  28. variant=release
  29. threading=multi
  30. boost.locale.icu=off
  31. "cflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  32. "cxxflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  33. "mflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  34. "mmflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  35. install
  36. INSTALL_COMMAND "" # b2 does that already
  37. )
  38. ExternalProject_Add(dep_libcurl
  39. EXCLUDE_FROM_ALL 1
  40. URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
  41. URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
  42. BUILD_IN_SOURCE 1
  43. CONFIGURE_COMMAND ./configure
  44. --enable-static
  45. --disable-shared
  46. "--with-ssl=${DESTDIR}/usr/local"
  47. --with-pic
  48. --enable-ipv6
  49. --enable-versioned-symbols
  50. --enable-threaded-resolver
  51. --with-darwinssl
  52. --without-ssl # disables OpenSSL
  53. --disable-ldap
  54. --disable-ldaps
  55. --disable-manual
  56. --disable-rtsp
  57. --disable-dict
  58. --disable-telnet
  59. --disable-pop3
  60. --disable-imap
  61. --disable-smb
  62. --disable-smtp
  63. --disable-gopher
  64. --disable-crypto-auth
  65. --without-gssapi
  66. --without-libpsl
  67. --without-libidn2
  68. --without-gnutls
  69. --without-polarssl
  70. --without-mbedtls
  71. --without-cyassl
  72. --without-nss
  73. --without-axtls
  74. --without-brotli
  75. --without-libmetalink
  76. --without-libssh
  77. --without-libssh2
  78. --without-librtmp
  79. --without-nghttp2
  80. --without-zsh-functions-dir
  81. BUILD_COMMAND make "-j${NPROC}"
  82. INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  83. )
  84. add_dependencies(dep_openvdb dep_boost)