Skip to content

Commit

Permalink
fix(cmake): fix build break for mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
osfans committed May 17, 2017
1 parent 33101c0 commit 939893c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ set(rime_extra_deps
${Marisa_LIBRARY}
${Opencc_LIBRARY})

if(MINGW)
set(rime_core_deps ${rime_core_deps} wsock32 ws2_32)
endif()

if(BUILD_SEPARATE_LIBS)
set(rime_deps ${rime_core_deps})
set(rime_gears_deps ${rime_library} ${rime_extra_deps})
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if(NOT (MSVC AND BUILD_SHARED_LIBS))
if(NOT (WIN32 AND BUILD_SHARED_LIBS))

aux_source_directory(. rime_test_src)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test)
Expand Down
2 changes: 1 addition & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ target_link_libraries(rime_patch ${rime_library} ${rime_gears_library})
add_dependencies(rime_patch ${rime_library} ${rime_gears_library})

# msvc doesn't export all symbols
if(NOT (MSVC AND BUILD_SHARED_LIBS))
if(NOT (WIN32 AND BUILD_SHARED_LIBS))

set(rime_console_src "rime_console.cc")
add_executable(rime_console ${rime_console_src})
Expand Down

0 comments on commit 939893c

Please sign in to comment.