You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.6 KiB

  1. From f7d5cb83826c7e2b1a3dc618b434d85df130a4d5 Mon Sep 17 00:00:00 2001
  2. From: James Taylor <james@jtaylor.id.au>
  3. Date: Tue, 10 Dec 2019 21:58:45 +1100
  4. Subject: [PATCH] Explicitly link against WSLAY when available
  5. When other libraries attempt to link against libh2o and libh2o-evloop that was
  6. compiled with libwslay available, there are errors from missing symbols
  7. associated with code which makes use of the wslay library. To rectify this,
  8. explicitly link against libwslay during the build process.
  9. Fixes #2105
  10. Signed-off-by: James Taylor <james@jtaylor.id.au>
  11. ---
  12. CMakeLists.txt | 12 ++++++++++--
  13. 1 file changed, 10 insertions(+), 2 deletions(-)
  14. --- a/CMakeLists.txt
  15. +++ b/CMakeLists.txt
  16. @@ -386,13 +386,21 @@ SET_TARGET_PROPERTIES(libh2o PROPERTIES
  17. OUTPUT_NAME h2o
  18. VERSION ${LIBRARY_VERSION}
  19. SOVERSION ${LIBRARY_SOVERSION})
  20. -TARGET_LINK_LIBRARIES(libh2o ${LIBUV_LIBRARIES} ${EXTRA_LIBS})
  21. +IF (WSLAY_FOUND)
  22. + TARGET_LINK_LIBRARIES(libh2o ${WSLAY_LIBRARIES} ${LIBUV_LIBRARIES} ${EXTRA_LIBS})
  23. +ELSE ()
  24. + TARGET_LINK_LIBRARIES(libh2o ${LIBUV_LIBRARIES} ${EXTRA_LIBS})
  25. +ENDIF (WSLAY_FOUND)
  26. SET_TARGET_PROPERTIES(libh2o-evloop PROPERTIES
  27. OUTPUT_NAME h2o-evloop
  28. COMPILE_FLAGS "-DH2O_USE_LIBUV=0"
  29. VERSION ${LIBRARY_VERSION}
  30. SOVERSION ${LIBRARY_SOVERSION})
  31. -TARGET_LINK_LIBRARIES(libh2o-evloop ${EXTRA_LIBS})
  32. +IF (WSLAY_FOUND)
  33. + TARGET_LINK_LIBRARIES(libh2o-evloop ${WSLAY_LIBRARIES} ${EXTRA_LIBS})
  34. +ELSE ()
  35. + TARGET_LINK_LIBRARIES(libh2o-evloop ${EXTRA_LIBS})
  36. +ENDIF (WSLAY_FOUND)
  37. IF (OPENSSL_FOUND)
  38. TARGET_INCLUDE_DIRECTORIES(libh2o PUBLIC ${OPENSSL_INCLUDE_DIR})