compile:修正win下mingw编译。
This commit is contained in:
parent
67aaa9c299
commit
7519765018
@ -8,6 +8,12 @@ if (MSVC)
|
||||
add_compile_options(/source-charset:utf-8)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
MESSAGE(STATUS "Add MinGW Param.")
|
||||
add_compile_options(-finput-charset=utf-8)
|
||||
add_compile_options(-fexec-charset=gbk)
|
||||
endif()
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
message(STATUS "System: ${CMAKE_SYSTEM_NAME}")
|
||||
message(STATUS "Compiler CXX ID: ${CMAKE_CXX_COMPILER_ID}")
|
||||
|
@ -13,3 +13,6 @@ target_link_libraries(transmc PRIVATE trans_net trans_util)
|
||||
if (UNIX)
|
||||
target_link_libraries(transmc PRIVATE pthread)
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
target_link_libraries(transmc PRIVATE ws2_32 wsock32)
|
||||
endif()
|
2
ofen
2
ofen
@ -1 +1 @@
|
||||
Subproject commit cf6168a89a784521df0c9d63a049bc025daa1b85
|
||||
Subproject commit 1e83e393eb2ee59d05690a7c39bf807c994560b2
|
@ -10,5 +10,8 @@ endif()
|
||||
add_executable(transms main.cpp server.h server.cpp)
|
||||
target_link_libraries(transms PRIVATE trans_net trans_util)
|
||||
if (UNIX)
|
||||
target_link_libraries(transms PRIVATE pthread)
|
||||
target_link_libraries(transms PRIVATE pthread)
|
||||
endif()
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
target_link_libraries(transms PRIVATE ws2_32 wsock32)
|
||||
endif()
|
Loading…
x
Reference in New Issue
Block a user