deps-linux.cmake 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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://github.com/supermerill/SuperSlicer_deps/releases/download/0.4/boost_1_70_0.tar.gz"
  12. URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
  13. BUILD_IN_SOURCE 1
  14. CONFIGURE_COMMAND ./bootstrap.sh
  15. --with-libraries=system,iostreams,filesystem,thread,log,locale,regex
  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. cflags=-fPIC
  25. cxxflags=-fPIC
  26. install
  27. INSTALL_COMMAND "" # b2 does that already
  28. )
  29. ExternalProject_Add(dep_libopenssl
  30. EXCLUDE_FROM_ALL 1
  31. URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0l.tar.gz"
  32. URL_HASH SHA256=e2acf0cf58d9bff2b42f2dc0aee79340c8ffe2c5e45d3ca4533dd5d4f5775b1d
  33. BUILD_IN_SOURCE 1
  34. CONFIGURE_COMMAND ./config
  35. "--prefix=${DESTDIR}/usr/local"
  36. "--libdir=lib"
  37. no-shared
  38. no-ssl3-method
  39. no-dynamic-engine
  40. -Wa,--noexecstack
  41. BUILD_COMMAND make depend && make "-j${NPROC}"
  42. INSTALL_COMMAND make install_sw
  43. )
  44. ExternalProject_Add(dep_libcurl
  45. EXCLUDE_FROM_ALL 1
  46. DEPENDS dep_libopenssl
  47. URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
  48. URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
  49. BUILD_IN_SOURCE 1
  50. CONFIGURE_COMMAND ./configure
  51. --enable-static
  52. --disable-shared
  53. "--with-ssl=${DESTDIR}/usr/local"
  54. --with-pic
  55. --enable-ipv6
  56. --enable-versioned-symbols
  57. --enable-threaded-resolver
  58. --with-random=/dev/urandom
  59. # CA root certificate paths will be set for openssl at runtime.
  60. --without-ca-bundle
  61. --without-ca-path
  62. --with-ca-fallback # to look for the ssl backend's ca store
  63. --disable-ldap
  64. --disable-ldaps
  65. --disable-manual
  66. --disable-rtsp
  67. --disable-dict
  68. --disable-telnet
  69. --disable-pop3
  70. --disable-imap
  71. --disable-smb
  72. --disable-smtp
  73. --disable-gopher
  74. --without-gssapi
  75. --without-libpsl
  76. --without-libidn2
  77. --without-gnutls
  78. --without-polarssl
  79. --without-mbedtls
  80. --without-cyassl
  81. --without-nss
  82. --without-axtls
  83. --without-brotli
  84. --without-libmetalink
  85. --without-libssh
  86. --without-libssh2
  87. --without-librtmp
  88. --without-nghttp2
  89. --without-zsh-functions-dir
  90. BUILD_COMMAND make "-j${NPROC}"
  91. INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  92. )
  93. add_dependencies(dep_openvdb dep_boost)