deps-linux.cmake 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. set(DEP_CMAKE_OPTS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
  2. include("deps-unix-common.cmake")
  3. #https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz
  4. ExternalProject_Add(dep_boost
  5. EXCLUDE_FROM_ALL 1
  6. URL "https://github.com/supermerill/SuperSlicer_deps/releases/download/0.4/boost_1_70_0.tar.gz"
  7. URL_HASH SHA256=882b48708d211a5f48e60b0124cf5863c1534cd544ecd0664bb534a4b5d506e9
  8. BUILD_IN_SOURCE 1
  9. CONFIGURE_COMMAND ./bootstrap.sh
  10. --with-libraries=system,iostreams,filesystem,thread,log,locale,regex
  11. "--prefix=${DESTDIR}/usr/local"
  12. BUILD_COMMAND ./b2
  13. -j ${NPROC}
  14. --reconfigure
  15. link=static
  16. variant=release
  17. threading=multi
  18. boost.locale.icu=off
  19. cflags=-fPIC
  20. cxxflags=-fPIC
  21. install
  22. INSTALL_COMMAND "" # b2 does that already
  23. )
  24. ExternalProject_Add(dep_libopenssl
  25. EXCLUDE_FROM_ALL 1
  26. URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0l.tar.gz"
  27. URL_HASH SHA256=e2acf0cf58d9bff2b42f2dc0aee79340c8ffe2c5e45d3ca4533dd5d4f5775b1d
  28. BUILD_IN_SOURCE 1
  29. CONFIGURE_COMMAND ./config
  30. "--prefix=${DESTDIR}/usr/local"
  31. "--libdir=lib"
  32. no-shared
  33. no-ssl3-method
  34. no-dynamic-engine
  35. -Wa,--noexecstack
  36. BUILD_COMMAND make depend && make "-j${NPROC}"
  37. INSTALL_COMMAND make install_sw
  38. )
  39. ExternalProject_Add(dep_libcurl
  40. EXCLUDE_FROM_ALL 1
  41. DEPENDS dep_libopenssl
  42. URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
  43. URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
  44. BUILD_IN_SOURCE 1
  45. CONFIGURE_COMMAND ./configure
  46. --enable-static
  47. --disable-shared
  48. "--with-ssl=${DESTDIR}/usr/local"
  49. --with-pic
  50. --enable-ipv6
  51. --enable-versioned-symbols
  52. --enable-threaded-resolver
  53. --with-random=/dev/urandom
  54. --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
  55. --disable-ldap
  56. --disable-ldaps
  57. --disable-manual
  58. --disable-rtsp
  59. --disable-dict
  60. --disable-telnet
  61. --disable-pop3
  62. --disable-imap
  63. --disable-smb
  64. --disable-smtp
  65. --disable-gopher
  66. --disable-crypto-auth
  67. --without-gssapi
  68. --without-libpsl
  69. --without-libidn2
  70. --without-gnutls
  71. --without-polarssl
  72. --without-mbedtls
  73. --without-cyassl
  74. --without-nss
  75. --without-axtls
  76. --without-brotli
  77. --without-libmetalink
  78. --without-libssh
  79. --without-libssh2
  80. --without-librtmp
  81. --without-nghttp2
  82. --without-zsh-functions-dir
  83. BUILD_COMMAND make "-j${NPROC}"
  84. INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  85. )
  86. if (DEP_WX_STABLE)
  87. set(DEP_WX_TAG "v3.0.4")
  88. else ()
  89. set(DEP_WX_TAG "v3.1.1-patched")
  90. endif()
  91. ExternalProject_Add(dep_wxwidgets
  92. EXCLUDE_FROM_ALL 1
  93. GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
  94. GIT_TAG "${DEP_WX_TAG}"
  95. BUILD_IN_SOURCE 1
  96. # PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/wxwidgets-pngprefix.h" src/png/pngprefix.h
  97. CONFIGURE_COMMAND ./configure
  98. "--prefix=${DESTDIR}/usr/local"
  99. --disable-shared
  100. --with-gtk=2
  101. --with-opengl
  102. --enable-unicode
  103. --enable-graphics_ctx
  104. --enable-stc
  105. --enable-aui
  106. --with-regex=builtin
  107. --with-libpng=builtin
  108. --with-libxpm=builtin
  109. --with-libjpeg=builtin
  110. --with-libtiff=builtin
  111. --with-zlib
  112. --with-expat=builtin
  113. --disable-precomp-headers
  114. --enable-debug_info
  115. --enable-debug_gdb
  116. --disable-debug
  117. --disable-debug_flag
  118. BUILD_COMMAND make "-j${NPROC}" && make -C locale allmo
  119. INSTALL_COMMAND make install
  120. )
  121. add_dependencies(dep_openvdb dep_boost)