Skip to content

Commit

Permalink
Fix MinGW build by exporting all the symbols, like on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
driver1998 committed Apr 22, 2024
1 parent bdd2149 commit ed26810
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,9 @@ add_library(gmssl ${src})

if (WIN32)
target_link_libraries(gmssl -lws2_32)
if (MINGW)
target_link_options(gmssl PRIVATE -Wl,--export-all-symbols)
endif()
elseif (APPLE)
if (ENABLE_SDF)
target_link_libraries(gmssl dl)
Expand All @@ -534,9 +537,7 @@ elseif (APPLE)
# FIXME: different rules for cl and OpenCL framework
target_link_libraries(gmssl "-framework OpenCL")
endif()
#target_link_libraries(gmssl "-framework CoreFoundation") # rand_apple.c CFRelease()
elseif (MINGW)
target_link_libraries(gmssl PRIVATE wsock32)
#target_link_libraries(gmssl "-framework CoreFoundation") # rand_apple.c CFRelease()
else()
if (ENABLE_SDF)
target_link_libraries(gmssl dl)
Expand Down

0 comments on commit ed26810

Please sign in to comment.