make sure SSL_EAY_LIBRARY_* is set when used

This commit is contained in:
Stephen Birarda 2016-01-15 11:01:14 -08:00
parent bb9f7856f4
commit 05e48528bd
4 changed files with 21 additions and 11 deletions

View file

@ -9,7 +9,12 @@ link_hifi_libraries(
controllers physics
)
set(MANUAL_SSLEAY_COPY TRUE)
package_libraries_for_deployment()
if (WIN32)
# we need SSL_EAY_LIBRARY_* to be set before we call package_libraries_for_deployment()
# so we have to call find_package(OpenSSL) here even though this target doesn't specifically need it
find_package(OpenSSL REQUIRED)
set(MANUAL_SSLEAY_COPY TRUE)
package_libraries_for_deployment()
endif()
install_beside_console()

View file

@ -52,9 +52,9 @@ endif()
file(GLOB EXTRA_LIBRARIES "${BUNDLE_PLUGIN_DIR}/*.${PLUGIN_EXTENSION}")
if (MANUAL_SSLEAY_COPY)
message(STATUS "Adding $<$<CONFIG:Debug>:"@SSL_EAY_LIBRARY_DEBUG@"> $<$<NOT:$<CONFIG:Debug>>:"@SSL_EAY_LIBRARY_RELEASE@"> to fixed up libraries")
list(APPEND EXTRA_LIBRARIES $<$<CONFIG:Debug>:${SSL_EAY_LIBRARY_DEBUG}> $<$<NOT:$<CONFIG:Debug>>:${SSL_EAY_LIBRARY_RELEASE}>)
if (@MANUAL_SSLEAY_COPY@)
message(STATUS "Adding $<$<CONFIG:Debug>:@SSL_EAY_LIBRARY_DEBUG@> $<$<NOT:$<CONFIG:Debug>>:@SSL_EAY_LIBRARY_RELEASE@> to fixed up libraries")
list(APPEND EXTRA_LIBRARIES "$<$<CONFIG:Debug>:@SSL_EAY_LIBRARY_DEBUG@>" "$<$<NOT:$<CONFIG:Debug>>:@SSL_EAY_LIBRARY_RELEASE@>")
endif()
fixup_bundle("${BUNDLE_EXECUTABLE}" "${EXTRA_LIBRARIES}" "@FIXUP_LIBS@")

View file

@ -34,9 +34,11 @@ target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
# libcrypto uses dlopen in libdl
if (UNIX)
target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS})
endif (UNIX)
endif ()
set(MANUAL_SSLEAY_COPY TRUE)
package_libraries_for_deployment()
if (WIN32)
set(MANUAL_SSLEAY_COPY TRUE)
package_libraries_for_deployment()
endif ()
install_beside_console()

View file

@ -263,7 +263,10 @@ fixup_interface()
if (WIN32)
set(EXTRA_DEPLOY_OPTIONS "--qmldir ${PROJECT_SOURCE_DIR}/resources/qml")
endif()
set(MANUAL_SSLEAY_COPY TRUE)
package_libraries_for_deployment()
# we need SSL_EAY_LIBRARY_* to be set before we call package_libraries_for_deployment()
# so we have to call find_package(OpenSSL) here even though this target doesn't specifically need it
find_package(OpenSSL REQUIRED)
set(MANUAL_SSLEAY_COPY TRUE)
package_libraries_for_deployment()
endif()