deps-linux.cmake 3.6 KB

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