ssl.cmake 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # ***** BEGIN GPL LICENSE BLOCK *****
  2. #
  3. # This program is free software; you can redistribute it and/or
  4. # modify it under the terms of the GNU General Public License
  5. # as published by the Free Software Foundation; either version 2
  6. # of the License, or (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software Foundation,
  15. # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  16. #
  17. # ***** END GPL LICENSE BLOCK *****
  18. set(SSL_CONFIGURE_COMMAND ./Configure)
  19. set(SSL_PATCH_CMD echo .)
  20. if(APPLE)
  21. set(SSL_OS_COMPILER "blender-darwin-x86_64")
  22. else()
  23. if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
  24. set(SSL_EXTRA_ARGS enable-ec_nistp_64_gcc_128)
  25. set(SSL_OS_COMPILER "blender-linux-x86_64")
  26. else()
  27. set(SSL_OS_COMPILER "blender-linux-x86")
  28. endif()
  29. endif()
  30. ExternalProject_Add(external_ssl
  31. URL ${SSL_URI}
  32. DOWNLOAD_DIR ${DOWNLOAD_DIR}
  33. URL_HASH SHA256=${SSL_HASH}
  34. PREFIX ${BUILD_DIR}/ssl
  35. PATCH_COMMAND ${SSL_PATCH_CMD}
  36. CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && ${SSL_CONFIGURE_COMMAND} --prefix=${LIBDIR}/ssl
  37. --openssldir=${LIBDIR}/ssl
  38. no-shared
  39. no-idea no-mdc2 no-rc5 no-zlib no-ssl3 enable-unit-test no-ssl3-method enable-rfc3779 enable-cms
  40. --config=${CMAKE_CURRENT_SOURCE_DIR}/cmake/ssl.conf
  41. ${SSL_OS_COMPILER}
  42. BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make -j${MAKE_THREADS}
  43. INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ssl/src/external_ssl/ && make install
  44. INSTALL_DIR ${LIBDIR}/ssl
  45. )