deps-macos.cmake 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. find_package(CURL QUIET)
  15. if (NOT CURL_FOUND)
  16. message(WARNING "No CURL dev package found in system, building static library. Mac SDK should include CURL from at least version 10.12. Check your SDK installation.")
  17. endif ()
  18. # ExternalProject_Add(dep_boost
  19. # EXCLUDE_FROM_ALL 1
  20. # URL "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz"
  21. # URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
  22. # BUILD_IN_SOURCE 1
  23. # CONFIGURE_COMMAND ./bootstrap.sh
  24. # --with-toolset=clang
  25. # --with-libraries=system,iostreams,filesystem,thread,log,locale,regex,date_time
  26. # "--prefix=${DESTDIR}/usr/local"
  27. # BUILD_COMMAND ./b2
  28. # -j ${NPROC}
  29. # --reconfigure
  30. # toolset=clang
  31. # link=static
  32. # variant=release
  33. # threading=multi
  34. # boost.locale.icu=off
  35. # --disable-icu
  36. # "cflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  37. # "cxxflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  38. # "mflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  39. # "mmflags=-fPIC -mmacosx-version-min=${DEP_OSX_TARGET}"
  40. # install
  41. # INSTALL_COMMAND "" # b2 does that already
  42. # )
  43. # ExternalProject_Add(dep_libcurl
  44. # EXCLUDE_FROM_ALL 1
  45. # URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
  46. # URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
  47. # BUILD_IN_SOURCE 1
  48. # CONFIGURE_COMMAND ./configure
  49. # --enable-static
  50. # --disable-shared
  51. # "--with-ssl=${DESTDIR}/usr/local"
  52. # --with-pic
  53. # --enable-ipv6
  54. # --enable-versioned-symbols
  55. # --enable-threaded-resolver
  56. # --with-darwinssl
  57. # --without-ssl # disables OpenSSL
  58. # --disable-ldap
  59. # --disable-ldaps
  60. # --disable-manual
  61. # --disable-rtsp
  62. # --disable-dict
  63. # --disable-telnet
  64. # --disable-pop3
  65. # --disable-imap
  66. # --disable-smb
  67. # --disable-smtp
  68. # --disable-gopher
  69. # --without-gssapi
  70. # --without-libpsl
  71. # --without-libidn2
  72. # --without-gnutls
  73. # --without-polarssl
  74. # --without-mbedtls
  75. # --without-cyassl
  76. # --without-nss
  77. # --without-axtls
  78. # --without-brotli
  79. # --without-libmetalink
  80. # --without-libssh
  81. # --without-libssh2
  82. # --without-librtmp
  83. # --without-nghttp2
  84. # --without-zsh-functions-dir
  85. # BUILD_COMMAND make "-j${NPROC}"
  86. # INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  87. # )
  88. # add_dependencies(dep_openvdb dep_boost)