Skip to content

Commit

Permalink
external: Fix OpenSSL path installation for the new 3.3.2 version.
Browse files Browse the repository at this point in the history
- Set and use OPENSSL_ROOT_DIR as a cache variable to copy the bin files.

Co-authored-by: redpolline <[email protected]>
  • Loading branch information
2 people authored and Macdu committed Sep 14, 2024
1 parent c94189d commit e70999a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ if(NOT OPENSSL_FOUND OR FORCE_BUILD_OPENSSL_MAC)
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/external/openssl")
endif()

set(OPENSSL_ROOT_DIR "${CMAKE_BINARY_DIR}/external/openssl/openssl-3/x64")
set(OPENSSL_ROOT_DIR "${CMAKE_BINARY_DIR}/external/openssl/x64" CACHE STRING "Path to OpenSSL root")
elseif(APPLE)
message(STATUS "OpenSSL not found.")
if(NOT EXISTS "${CMAKE_BINARY_DIR}/external/openssl.tar.gz")
Expand Down
6 changes: 3 additions & 3 deletions vita3k/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,12 @@ elseif(WIN32)
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_BINARY_DIR}/external/discord_game_sdk/lib/x86_64/discord_game_sdk.dll" "$<TARGET_FILE_DIR:vita3k>")
endif()
if(EXISTS "${CMAKE_BINARY_DIR}/external/openssl")
if(EXISTS "${OPENSSL_ROOT_DIR}")
add_custom_command(
TARGET vita3k
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_BINARY_DIR}/external/openssl/openssl-3/x64/bin/libssl-3-x64.dll" "$<TARGET_FILE_DIR:vita3k>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_BINARY_DIR}/external/openssl/openssl-3/x64/bin/libcrypto-3-x64.dll" "$<TARGET_FILE_DIR:vita3k>")
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENSSL_ROOT_DIR}/bin/libssl-3-x64.dll" "$<TARGET_FILE_DIR:vita3k>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENSSL_ROOT_DIR}/bin/libcrypto-3-x64.dll" "$<TARGET_FILE_DIR:vita3k>")
endif()
endif()

Expand Down

0 comments on commit e70999a

Please sign in to comment.