mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-03 16:07:10 +02:00
Something weird is happening with the CI that causes frequent build errors. For reasons I am not entirely certain of, Ninja fails to properly spawn a POSIX shell instance during the Make phase. More investigation is in order, but for now fix it with the grand power of shelling out to CMake script Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4047 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
--- a/CMakeLists.txt 2026-06-01 23:53:16.498043856 -0400
|
|
+++ b/CMakeLists.txt 2026-06-01 23:53:23.910543615 -0400
|
|
@@ -312,13 +312,29 @@
|
|
${OPENSSL_SHARED_CRYPTO_LIBRARY}
|
|
${OPENSSL_SHARED_SSL_LIBRARY}
|
|
)
|
|
-add_custom_command(
|
|
- OUTPUT ${OPENSSL_BUILD_OUTPUT}
|
|
- COMMAND ${OPENSSL_BUILD_COMMAND}
|
|
- DEPENDS ${OPENSSL_SOURCES}
|
|
- WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}
|
|
- VERBATIM
|
|
-)
|
|
+if (WIN32)
|
|
+ add_custom_command(
|
|
+ OUTPUT ${OPENSSL_BUILD_OUTPUT}
|
|
+ COMMAND ${OPENSSL_BUILD_COMMAND}
|
|
+ DEPENDS ${OPENSSL_SOURCES}
|
|
+ WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}
|
|
+ VERBATIM)
|
|
+else()
|
|
+ set(_openssl_build_script "${CMAKE_CURRENT_BINARY_DIR}/BuildOpenSSL.cmake")
|
|
+ file(WRITE ${_openssl_build_script}
|
|
+ "execute_process(\n"
|
|
+ " COMMAND ${OPENSSL_BUILD_COMMAND}\n"
|
|
+ " WORKING_DIRECTORY ${OpenSSL_BINARY_DIR}\n"
|
|
+ " RESULT_VARIABLE _r)\n"
|
|
+ "if(_r)\n"
|
|
+ " message(FATAL_ERROR \"OpenSSL build failed: \${_r}\")\n"
|
|
+ "endif()\n")
|
|
+ add_custom_command(
|
|
+ OUTPUT ${OPENSSL_BUILD_OUTPUT}
|
|
+ COMMAND ${CMAKE_COMMAND} -P ${_openssl_build_script}
|
|
+ DEPENDS ${OPENSSL_SOURCES}
|
|
+ VERBATIM)
|
|
+endif()
|
|
|
|
if(PROJECT_IS_TOP_LEVEL)
|
|
add_custom_target(openssl-build ALL DEPENDS ${OPENSSL_BUILD_OUTPUT})
|