deps-linux.cmake 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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.66.0/source/boost_1_66_0.tar.gz"
  6. URL_HASH SHA256=bd0df411efd9a585e5a2212275f8762079fed8842264954675a4fddc46cfcf60
  7. BUILD_IN_SOURCE 1
  8. CONFIGURE_COMMAND ./bootstrap.sh
  9. --with-libraries=system,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_libpng
  24. EXCLUDE_FROM_ALL 1
  25. URL "https://github.com/glennrp/libpng/archive/v1.6.36.tar.gz"
  26. URL_HASH SHA256=5bef5a850a9255365a2dc344671b7e9ef810de491bd479c2506ac3c337e2d84f
  27. CMAKE_GENERATOR "${DEP_MSVC_GEN}"
  28. CMAKE_ARGS
  29. -DPNG_SHARED=OFF
  30. -DPNG_TESTS=OFF
  31. ${DEP_CMAKE_OPTS}
  32. INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  33. INSTALL_COMMAND ""
  34. )
  35. ExternalProject_Add(dep_libopenssl
  36. EXCLUDE_FROM_ALL 1
  37. URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_0g.tar.gz"
  38. URL_HASH SHA256=8e9516b8635bb9113c51a7b5b27f9027692a56b104e75b709e588c3ffd6a0422
  39. BUILD_IN_SOURCE 1
  40. CONFIGURE_COMMAND ./config
  41. "--prefix=${DESTDIR}/usr/local"
  42. no-shared
  43. no-ssl3-method
  44. no-dynamic-engine
  45. -Wa,--noexecstack
  46. BUILD_COMMAND make depend && make "-j${NPROC}"
  47. INSTALL_COMMAND make install_sw
  48. )
  49. ExternalProject_Add(dep_libcurl
  50. EXCLUDE_FROM_ALL 1
  51. DEPENDS dep_libopenssl
  52. URL "https://curl.haxx.se/download/curl-7.58.0.tar.gz"
  53. URL_HASH SHA256=cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
  54. BUILD_IN_SOURCE 1
  55. CONFIGURE_COMMAND ./configure
  56. --enable-static
  57. --disable-shared
  58. "--with-ssl=${DESTDIR}/usr/local"
  59. --with-pic
  60. --enable-ipv6
  61. --enable-versioned-symbols
  62. --enable-threaded-resolver
  63. --with-random=/dev/urandom
  64. --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
  65. --disable-ldap
  66. --disable-ldaps
  67. --disable-manual
  68. --disable-rtsp
  69. --disable-dict
  70. --disable-telnet
  71. --disable-pop3
  72. --disable-imap
  73. --disable-smb
  74. --disable-smtp
  75. --disable-gopher
  76. --disable-crypto-auth
  77. --without-gssapi
  78. --without-libpsl
  79. --without-libidn2
  80. --without-gnutls
  81. --without-polarssl
  82. --without-mbedtls
  83. --without-cyassl
  84. --without-nss
  85. --without-axtls
  86. --without-brotli
  87. --without-libmetalink
  88. --without-libssh
  89. --without-libssh2
  90. --without-librtmp
  91. --without-nghttp2
  92. --without-zsh-functions-dir
  93. BUILD_COMMAND make "-j${NPROC}"
  94. INSTALL_COMMAND make install "DESTDIR=${DESTDIR}"
  95. )
  96. if (DEP_WX_STABLE)
  97. set(DEP_WX_URL "https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.4/wxWidgets-3.0.4.tar.bz2")
  98. set(DEP_WX_HASH "SHA256=96157f988d261b7368e5340afa1a0cad943768f35929c22841f62c25b17bf7f0")
  99. else ()
  100. set(DEP_WX_URL "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.1/wxWidgets-3.1.1.tar.bz2")
  101. set(DEP_WX_HASH "SHA256=c925dfe17e8f8b09eb7ea9bfdcfcc13696a3e14e92750effd839f5e10726159e")
  102. endif()
  103. ExternalProject_Add(dep_wxwidgets
  104. EXCLUDE_FROM_ALL 1
  105. URL "${DEP_WX_URL}"
  106. URL_HASH "${DEP_WX_HASH}"
  107. BUILD_IN_SOURCE 1
  108. PATCH_COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/wxwidgets-pngprefix.h" src/png/pngprefix.h
  109. CONFIGURE_COMMAND ./configure
  110. "--prefix=${DESTDIR}/usr/local"
  111. --disable-shared
  112. --with-gtk=2
  113. --with-opengl
  114. --enable-unicode
  115. --enable-graphics_ctx
  116. --with-regex=builtin
  117. --with-libpng=builtin
  118. --with-libxpm=builtin
  119. --with-libjpeg=builtin
  120. --with-libtiff=builtin
  121. --with-zlib=builtin
  122. --with-expat=builtin
  123. --disable-precomp-headers
  124. --enable-debug_info
  125. --enable-debug_gdb
  126. --disable-debug
  127. --disable-debug_flag
  128. BUILD_COMMAND make "-j${NPROC}" && make -C locale allmo
  129. INSTALL_COMMAND make install
  130. )