mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复MSVC编译问题
This commit is contained in:
parent
2b804514e1
commit
7e95bd2078
@ -172,12 +172,12 @@ if(UNIX)
|
|||||||
"-Wno-unused-function;-Wno-unused-parameter;-Wno-unused-variable"
|
"-Wno-unused-function;-Wno-unused-parameter;-Wno-unused-variable"
|
||||||
"-Wno-error=extra;-Wno-error=missing-field-initializers;-Wno-error=type-limits")
|
"-Wno-error=extra;-Wno-error=missing-field-initializers;-Wno-error=type-limits")
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
set(COMPILE_OPTIONS_DEFAULT
|
|
||||||
# TODO: /wd4819 应该是不会生效
|
|
||||||
"/wd4566;/wd4819"
|
|
||||||
# warning C4530: C++ exception handler used, but unwind semantics are not enabled.
|
|
||||||
"/EHsc")
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
set(COMPILE_OPTIONS_DEFAULT
|
||||||
|
# TODO: /wd4819 应该是不会生效
|
||||||
|
"/wd4566;/wd4819"
|
||||||
|
# warning C4530: C++ exception handler used, but unwind semantics are not enabled.
|
||||||
|
"/EHsc")
|
||||||
# disable Windows logo
|
# disable Windows logo
|
||||||
list(APPEND COMPILE_OPTIONS_DEFAULT "/nologo")
|
list(APPEND COMPILE_OPTIONS_DEFAULT "/nologo")
|
||||||
list(APPEND CMAKE_STATIC_LINKER_FLAGS "/nologo")
|
list(APPEND CMAKE_STATIC_LINKER_FLAGS "/nologo")
|
||||||
|
@ -38,7 +38,10 @@ if(IOS)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(COMPILE_DEFINITIONS ${MK_COMPILE_DEFINITIONS})
|
set(COMPILE_DEFINITIONS ${MK_COMPILE_DEFINITIONS})
|
||||||
list(APPEND COMPILE_DEFINITIONS GENERATE_EXPORT)
|
|
||||||
|
if (MSVC)
|
||||||
|
list(APPEND COMPILE_DEFINITIONS GENERATE_EXPORT)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if(ENABLE_API_STATIC_LIB)
|
if(ENABLE_API_STATIC_LIB)
|
||||||
add_library(mk_api STATIC ${API_SRC_LIST})
|
add_library(mk_api STATIC ${API_SRC_LIST})
|
||||||
|
@ -11,8 +11,10 @@
|
|||||||
#ifndef ZLMEDIAKIT_PROCESS_H
|
#ifndef ZLMEDIAKIT_PROCESS_H
|
||||||
#define ZLMEDIAKIT_PROCESS_H
|
#define ZLMEDIAKIT_PROCESS_H
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
|
#if !defined(__MINGW32__)
|
||||||
typedef int pid_t;
|
typedef int pid_t;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
Loading…
Reference in New Issue
Block a user