Skip to content

Commit ad996ce

Browse files
authored
MINGW Stuff
1 parent 6b20abb commit ad996ce

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ include_directories(src/include duckdb/third_party/httplib)
1616

1717
set(EXTENSION_SOURCES src/webxtension_extension.cpp)
1818

19+
if(MINGW)
20+
set(OPENSSL_USE_STATIC_LIBS TRUE)
21+
set(WIN_LIBS crypt32 ws2_32 wsock32)
22+
endif()
23+
1924
build_static_extension(${TARGET_NAME} ${EXTENSION_SOURCES})
2025
build_loadable_extension(${TARGET_NAME} " " ${EXTENSION_SOURCES})
2126

22-
# Link OpenSSL in both the static library as the loadable extension
23-
target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
24-
target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto)
27+
target_link_libraries(${EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto ${WIN_LIBS})
28+
target_link_libraries(${LOADABLE_EXTENSION_NAME} OpenSSL::SSL OpenSSL::Crypto ${WIN_LIBS})
2529

2630
install(
2731
TARGETS ${EXTENSION_NAME}

0 commit comments

Comments
 (0)