Skip to content

Commit d22b0bf

Browse files
committed
Fix cmake
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 0ad3f27 commit d22b0bf

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ add_dependencies(${LOADABLE_EXTENSION_NAME} rust_lib)
5454
target_link_libraries(${EXTENSION_NAME} ${RUST_LIB_PATH})
5555
target_link_libraries(${LOADABLE_EXTENSION_NAME} ${RUST_LIB_PATH})
5656

57+
# Platform-specific compilation flags
58+
if(WIN32 AND MINGW)
59+
# Enable big object files for MinGW to handle large unity builds
60+
add_compile_options(-Wa,-mbig-obj)
61+
endif()
62+
5763
# Platform-specific linking
5864
if(APPLE)
5965
target_link_libraries(${EXTENSION_NAME}
@@ -64,6 +70,9 @@ if(APPLE)
6470
"-framework Security"
6571
"-framework SystemConfiguration"
6672
"-framework CoreFoundation")
73+
elseif(WIN32)
74+
target_link_libraries(${EXTENSION_NAME} ws2_32 userenv bcrypt)
75+
target_link_libraries(${LOADABLE_EXTENSION_NAME} ws2_32 userenv bcrypt)
6776
elseif(UNIX)
6877
target_link_libraries(${EXTENSION_NAME} pthread dl)
6978
target_link_libraries(${LOADABLE_EXTENSION_NAME} pthread dl)

0 commit comments

Comments
 (0)