Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions core/libs/prx/libSceSsl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ function(configure_ssl_backend)
endfunction()

configure_ssl_backend()
set_target_properties(mbedcrypto mbedx509 p256m PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(mbedtls mbedcrypto mbedx509 p256m PROPERTIES POSITION_INDEPENDENT_CODE ON)
if(MINGW)
target_compile_options(mbedtls PRIVATE -fno-asynchronous-unwind-tables)
target_compile_options(mbedcrypto PRIVATE -fno-asynchronous-unwind-tables)
target_compile_options(mbedx509 PRIVATE -fno-asynchronous-unwind-tables)
target_compile_options(p256m PRIVATE -fno-asynchronous-unwind-tables)
endif()

add_library(libSceSsl SHARED EXCLUDE_FROM_ALL Export.cpp)
target_include_directories(libSceSsl PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(libSceSsl PRIVATE mbedx509 mbedcrypto)
target_link_libraries(libSceSsl PRIVATE mbedtls mbedx509 mbedcrypto)
set_target_properties(libSceSsl PROPERTIES VISIBILITY_INLINES_HIDDEN ON)
if(MINGW OR CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_options(libSceSsl PRIVATE LINKER:--exclude-libs,ALL)
Expand All @@ -76,8 +77,17 @@ if(BUILD_TESTING)
target_link_libraries(guest_ssl_load_tests PRIVATE libSceSsl libc)
configure_windows_unwind(guest_ssl_load_tests)
add_test(NAME guest_ssl_load COMMAND guest_ssl_load_tests)
add_test_executable(guest_ssl_transport_tests ${LIBS_INCLUDE_DIR}/tests/GuestSslTransport.cpp)
target_include_directories(guest_ssl_transport_tests PRIVATE ${LIBS_INCLUDE_DIR})
target_link_libraries(guest_ssl_transport_tests PRIVATE libSceSsl libSceNet libkernel libc mbedtls mbedx509 mbedcrypto)
configure_windows_unwind(guest_ssl_transport_tests)
foreach(table IN ITEMS kernel net)
add_test(NAME guest_ssl_transport_${table} COMMAND guest_ssl_transport_tests ${table})
set_tests_properties(guest_ssl_transport_${table} PROPERTIES TIMEOUT 30)
endforeach()
if(WIN32)
set_tests_properties(guest_ssl guest_ssl_load PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceSsl>")
target_link_libraries(guest_ssl_transport_tests PRIVATE bcrypt ws2_32)
set_tests_properties(guest_ssl guest_ssl_load guest_ssl_transport_kernel guest_ssl_transport_net PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceSsl>;PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceNet>")
endif()
endif()
Loading