CMakeLists.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Based on original work by David Manura
  2. # Copyright (C) 2007-2012 LuaDist.
  3. # Copyright (C) 2013 Brian Sidebotham
  4. # Redistribution and use of this file is allowed according to the terms of the
  5. # MIT license.
  6. #
  7. # Permission is hereby granted, free of charge, to any person obtaining a copy
  8. # of this software and associated documentation files (the "Software"), to deal
  9. # in the Software without restriction, including without limitation the rights
  10. # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. # copies of the Software, and to permit persons to whom the Software is
  12. # furnished to do so, subject to the following conditions:
  13. #
  14. # The above copyright notice and this permission notice shall be included in all
  15. # copies or substantial portions of the Software.
  16. #
  17. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  20. # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23. # SOFTWARE.
  24. include_directories ( BEFORE SYSTEM ${openssl_BINARY_DIR} ../crypto .. ../include )
  25. if( BUILD_SHARED_LIBS )
  26. add_definitions ( -DOPENSSL_BUILD_SHLIBSSL )
  27. endif()
  28. set ( LIBSRC s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c s3_meth.c s3_srvr.c
  29. s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c s23_meth.c s23_srvr.c s23_clnt.c
  30. s23_lib.c s23_pkt.c t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c d1_meth.c d1_srvr.c
  31. d1_clnt.c d1_lib.c d1_pkt.c d1_both.c d1_enc.c ssl_lib.c ssl_err2.c ssl_cert.c
  32. ssl_sess.c ssl_ciph.c ssl_stat.c ssl_rsa.c ssl_asn1.c ssl_txt.c ssl_algs.c bio_ssl.c
  33. ssl_err.c kssl.c t1_reneg.c tls_srp.c s3_cbc.c d1_srtp.c )
  34. set( LIBHDR ssl.h kssl.h ssl2.h ssl3.h tls1.h dtls1.h ssl23.h srtp.h)
  35. file( COPY ${LIBHDR} DESTINATION ${openssl_BINARY_DIR}/openssl )
  36. if(BUILD_OBJECT_LIBRARY_ONLY)
  37. add_library( ssl OBJECT ${LIBSRC} ${LIBHDR} )
  38. else()
  39. add_library( ssl ${LIBSRC} )
  40. target_link_libraries( ssl crypto )
  41. #install( FILES ssl.h ssl2.h ssl3.h ssl23.h tls1.h dtls1.h kssl.h
  42. # DESTINATION include/openssl )
  43. #install( TARGETS ssl
  44. # RUNTIME DESTINATION bin
  45. # LIBRARY DESTINATION lib
  46. # ARCHIVE DESTINATION lib )
  47. endif()