deps-linux.cmake 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. set(DEP_CMAKE_OPTS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
  2. include("deps-unix-common.cmake")
  3. # Some Linuxes may have very old libpng, so it's best to bundle it instead of relying on the system version.
  4. # find_package(PNG QUIET)
  5. # if (NOT PNG_FOUND)
  6. # message(WARNING "No PNG dev package found in system, building static library. You should install the system package.")
  7. # endif ()
  8. #TODO UDEV
  9. ExternalProject_Add(dep_boost
  10. EXCLUDE_FROM_ALL 1
  11. URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz"
  12. URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
  13. BUILD_IN_SOURCE 1
  14. CONFIGURE_COMMAND ./bootstrap.sh
  15. --with-libraries=system,iostreams,filesystem,thread,log,locale,regex,date_time
  16. "--prefix=${DESTDIR}/usr/local"
  17. BUILD_COMMAND ./b2
  18. -j ${NPROC}
  19. --reconfigure
  20. link=static
  21. variant=release
  22. threading=multi
  23. boost.locale.icu=off
  24. --disable-icu
  25. cflags=-fPIC
  26. cxxflags=-fPIC
  27. install
  28. INSTALL_COMMAND "" # b2 does that already
  29. )
  30. ExternalProject_Add(dep_libopenssl
  31. EXCLUDE_FROM_ALL 1
  32. URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0l.tar.gz"
  33. URL_HASH SHA256=e2acf0cf58d9bff2b42f2dc0aee79340c8ffe2c5e45d3ca4533dd5d4f5775b1d
  34. BUILD_IN_SOURCE 1
  35. CONFIGURE_COMMAND ./config
  36. "--prefix=${DESTDIR}/usr/local"
  37. "--libdir=lib"
  38. no-shared
  39. no-ssl3-method
  40. no-dynamic-engine
  41. -Wa,--noexecstack
  42. BUILD_COMMAND make depend && make "-j${NPROC}"
  43. INSTALL_COMMAND make install_sw
  44. )
  45. ExternalProject_Add(dep_libcurl
  46. EXCLUDE_FROM_ALL 1
  47. DEPENDS dep_libopenssl
  48. URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
  49. URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
  50. BUILD_IN_SOURCE 1
  51. CONFIGURE_COMMAND ./configure
  52. --enable-static
  53. --disable-shared
  54. "--with-ssl=${DESTDIR}/usr/local"
  55. --with-pic
  56. --enable-ipv6
  57. --enable-versioned-symbols
  58. --enable-threaded-resolver
  59. --with-random=/dev/urandom
  60. # CA root certificate paths will be set for openssl at runtime.
  61. --without-ca-bundle
  62. --without-ca-path
  63. --with-ca-fallback # to look for the ssl backend's ca store
  64. --disable-ldap
  65. --disable-ldaps
  66. --disable-manual
  67. --disable-rtsp
  68. --disable-dict
  69. --disable-telnet
  70. --disable-pop3
  71. --disable-imap
  72. --disable-smb
  73. --disable-smtp
  74. --disable-gopher
  75. --without-gssapi
  76. --without-libpsl
  77. --without-libidn2
  78. --without-gnutls
  79. --without-polarssl
  80. --without-mbedtls
  81. --without-cyassl
  82. --without-nss
  83. --without-axtls
  84. --without-brotli
  85. --without-libmetalink
  86. --without-libssh
  87. --without-libssh2
  88. --without-librtmp
  89. --without-nghttp2
  90. --without-zsh-functions-dir
  91. BUILD_COMMAND make "-j${NPROC}"
  92. INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  93. )
  94. add_dependencies(dep_openvdb dep_boost)