mirror of
https://github.com/OpenEtherCATsociety/SOEM.git
synced 2026-02-06 09:03:10 +08:00
MinGW support
Support building SOEM with MinGW. Change-Id: I7ea59e168ae382b99d7904cffc0719701d44cefc
This commit is contained in:
@@ -18,9 +18,17 @@ target_include_directories(soem PUBLIC
|
||||
)
|
||||
|
||||
target_compile_options(soem PRIVATE
|
||||
/D _CRT_SECURE_NO_WARNINGS
|
||||
/WX
|
||||
)
|
||||
$<$<C_COMPILER_ID:MSVC>:
|
||||
/D _CRT_SECURE_NO_WARNINGS
|
||||
/WX
|
||||
>
|
||||
$<$<C_COMPILER_ID:GNU>:
|
||||
-Wall
|
||||
-Wextra
|
||||
-Werror
|
||||
-Wno-unused-parameter
|
||||
>
|
||||
)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(WPCAP_LIB_PATH ${SOEM_SOURCE_DIR}/oshw/win32/wpcap/Lib/x64)
|
||||
@@ -31,8 +39,8 @@ endif()
|
||||
target_link_libraries(soem PUBLIC
|
||||
${WPCAP_LIB_PATH}/wpcap.lib
|
||||
${WPCAP_LIB_PATH}/Packet.lib
|
||||
Ws2_32.lib
|
||||
Winmm.lib
|
||||
ws2_32.lib
|
||||
winmm.lib
|
||||
)
|
||||
|
||||
install(FILES
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
|
||||
#include <winsock2.h>
|
||||
#include "ethercattype.h"
|
||||
#include <Mmsystem.h>
|
||||
#include "nicdrv.h"
|
||||
#include "osal_win32.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user