🐛 Fixed missing openssl DLL's on Windows
This commit is contained in:
parent
9a7756b0f4
commit
f3590d1a41
@ -16,20 +16,25 @@ macro(manually_install_openssl_for_qt)
|
|||||||
# So even though we don't need the dynamic version of OpenSSL for our direct-use purposes
|
# So even though we don't need the dynamic version of OpenSSL for our direct-use purposes
|
||||||
# we use this macro to include the two SSL DLLs with the targets using QtNetwork
|
# we use this macro to include the two SSL DLLs with the targets using QtNetwork
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
# we have to call find_package(OpenSSL) here even though this target may not directly need it
|
|
||||||
find_package(OpenSSL REQUIRED)
|
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES "${VCPKG_INSTALL_ROOT}/bin/libcrypto-3-x64.dll"
|
FILES "${CMAKE_BINARY_DIR}/conanlibs/$<CONFIGURATION>/libcrypto-1_1-x64.dll"
|
||||||
DESTINATION ${TARGET_INSTALL_DIR}
|
DESTINATION ${TARGET_INSTALL_DIR}
|
||||||
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES "${VCPKG_INSTALL_ROOT}/bin/libssl-3-x64.dll"
|
FILES "${CMAKE_BINARY_DIR}/conanlibs/$<CONFIGURATION>/libssl-1_1-x64.dll"
|
||||||
DESTINATION ${TARGET_INSTALL_DIR}
|
DESTINATION ${TARGET_INSTALL_DIR}
|
||||||
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
COMPONENT ${TARGET_INSTALL_COMPONENT}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${TARGET_NAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/conanlibs/$<CONFIGURATION>/libcrypto-1_1-x64.dll" "${CMAKE_CURRENT_BINARY_DIR}/libcrypto-1_1-x64.dll"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/conanlibs/$<CONFIGURATION>/libssl-1_1-x64.dll" "${CMAKE_CURRENT_BINARY_DIR}/libssl-1_1-x64.dll"
|
||||||
|
COMMENT "Copy openssl dlls"
|
||||||
|
)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
#
|
#
|
||||||
macro(TARGET_OPENSSL)
|
macro(TARGET_OPENSSL)
|
||||||
find_package(OpenSSL 1.1.0 REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
|
target_link_libraries(${TARGET_NAME} OpenSSL::SSL OpenSSL::Crypto)
|
||||||
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
@ -23,6 +23,7 @@ class Overte(ConanFile):
|
|||||||
"sdl*:xscrnsaver": "False",
|
"sdl*:xscrnsaver": "False",
|
||||||
"sdl*:xshape": "False",
|
"sdl*:xshape": "False",
|
||||||
"sdl*:xvm": "False",
|
"sdl*:xvm": "False",
|
||||||
|
"openssl*:shared": "True",
|
||||||
"qt*:shared": "True",
|
"qt*:shared": "True",
|
||||||
"qt*:gui": "True",
|
"qt*:gui": "True",
|
||||||
"qt*:qtdeclarative": "True",
|
"qt*:qtdeclarative": "True",
|
||||||
@ -76,11 +77,12 @@ class Overte(ConanFile):
|
|||||||
self.requires("vulkan-memory-allocator/3.0.1")
|
self.requires("vulkan-memory-allocator/3.0.1")
|
||||||
self.requires("zlib/1.2.13")
|
self.requires("zlib/1.2.13")
|
||||||
self.requires("glm/0.9.9.5", force=True)
|
self.requires("glm/0.9.9.5", force=True)
|
||||||
|
openssl = "openssl/1.1.1q"
|
||||||
|
|
||||||
if self.options.qt_source == "system":
|
if self.options.qt_source == "system":
|
||||||
self.requires("qt/5.15.2@overte/system", force=True)
|
self.requires("qt/5.15.2@overte/system", force=True)
|
||||||
if self.settings.os == "Linux":
|
if self.settings.os == "Linux":
|
||||||
self.requires("openssl/system@anotherfoxguy/stable", force=True)
|
openssl = "openssl/system@anotherfoxguy/stable"
|
||||||
elif self.options.qt_source == "aqt":
|
elif self.options.qt_source == "aqt":
|
||||||
self.requires("qt/5.15.2@overte/aqt", force=True)
|
self.requires("qt/5.15.2@overte/aqt", force=True)
|
||||||
else:
|
else:
|
||||||
@ -96,6 +98,8 @@ class Overte(ConanFile):
|
|||||||
if self.options.with_webrtc:
|
if self.options.with_webrtc:
|
||||||
self.requires("webrtc-prebuild/2021.01.05@overte/stable", force=True)
|
self.requires("webrtc-prebuild/2021.01.05@overte/stable", force=True)
|
||||||
|
|
||||||
|
self.requires(openssl, force=True)
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
tc = CMakeToolchain(self)
|
tc = CMakeToolchain(self)
|
||||||
tc.variables["DISABLE_WEBRTC"] = "OFF" if self.options.with_webrtc else "ON"
|
tc.variables["DISABLE_WEBRTC"] = "OFF" if self.options.with_webrtc else "ON"
|
||||||
|
@ -8,18 +8,10 @@ link_hifi_libraries(embedded-webserver networking shared)
|
|||||||
package_libraries_for_deployment()
|
package_libraries_for_deployment()
|
||||||
|
|
||||||
# find OpenSSL
|
# find OpenSSL
|
||||||
find_package(OpenSSL 1.1.0 REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
|
||||||
if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include")
|
|
||||||
# this is a user on OS X using system OpenSSL, which is going to throw warnings since they're deprecating for their common crypto
|
|
||||||
message(WARNING "The found version of OpenSSL is the OS X system version. This will produce deprecation warnings."
|
|
||||||
"\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
|
|
||||||
|
|
||||||
setup_memory_debugger()
|
setup_memory_debugger()
|
||||||
setup_thread_debugger()
|
setup_thread_debugger()
|
||||||
|
|
||||||
# append OpenSSL to our list of libraries to link
|
# append OpenSSL to our list of libraries to link
|
||||||
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
|
target_link_libraries(${TARGET_NAME} OpenSSL::SSL OpenSSL::Crypto)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user