mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
修复windows编译问题
This commit is contained in:
parent
2b86082f3d
commit
ec190e3273
@ -1 +1 @@
|
||||
Subproject commit e03997435ad388a7c169de7a4b17b76d773ab69b
|
||||
Subproject commit aef48ed0ec6989edbc2e9667d3ac0ffa9c023fbc
|
@ -93,24 +93,34 @@ if (FAAC_FOUND AND ENABLE_FAAC)
|
||||
list(APPEND LINK_LIB_LIST ${FAAC_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
|
||||
#添加库
|
||||
add_library(zltoolkit STATIC ${ToolKit_src_list})
|
||||
add_library(zlmediakit STATIC ${MediaKit_src_list})
|
||||
|
||||
|
||||
set(VS_FALGS "/wd4819 /wd4996 /wd4018 /wd4267 /wd4244 /wd4101 /wd4828 /wd4309 /wd4573 /utf-8" )
|
||||
#libmpeg
|
||||
if(ENABLE_HLS)
|
||||
aux_source_directory(${MediaServer_Root}/libmpeg/include src_mpeg)
|
||||
aux_source_directory(${MediaServer_Root}/libmpeg/source src_mpeg)
|
||||
include_directories(${MediaServer_Root}/libmpeg/include)
|
||||
add_library(mpeg STATIC ${src_mpeg})
|
||||
if(WIN32)
|
||||
set_target_properties(mpeg PROPERTIES COMPILE_FLAGS ${VS_FALGS} )
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
list(APPEND LINK_LIB_LIST WS2_32 Iphlpapi shlwapi)
|
||||
set_target_properties(zltoolkit PROPERTIES COMPILE_FLAGS ${VS_FALGS} )
|
||||
set_target_properties(zlmediakit PROPERTIES COMPILE_FLAGS ${VS_FALGS} )
|
||||
elseif(NOT ANDROID OR IOS)
|
||||
list(APPEND LINK_LIB_LIST pthread)
|
||||
endif ()
|
||||
|
||||
|
||||
|
||||
#测试程序
|
||||
add_subdirectory(tests)
|
||||
|
||||
|
@ -36,6 +36,11 @@ foreach(TEST_SRC ${TEST_SRC_LIST})
|
||||
STRING(REGEX REPLACE "^\\./|\\.c[a-zA-Z0-9_]*$" "" TEST_EXE_NAME ${TEST_SRC})
|
||||
message(STATUS "add test:${TEST_EXE_NAME}")
|
||||
add_executable(${TEST_EXE_NAME} ${TEST_SRC})
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(${TEST_EXE_NAME} PROPERTIES COMPILE_FLAGS ${VS_FALGS} )
|
||||
endif(WIN32)
|
||||
|
||||
target_link_libraries(${TEST_EXE_NAME} ${LINK_LIB_LIST})
|
||||
endforeach()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user