Fix macOS compilation (Attempt 1)

This commit is contained in:
TheTank20 2023-09-02 09:20:54 -04:00 committed by GitHub
parent b3f64e6330
commit 361a39e204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,12 @@ else()
set(OPENSSL_MSVC_STATIC_RT TRUE)
endif()
# macOS does not support static build
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(OPENSSL_USE_STATIC_LIBS FALSE)
set(OPENSSL_MSVC_STATIC_RT FALSE)
endif()
if(MUSL_STATIC AND NOT UMSKT_USE_SHARED_OPENSSL)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")