mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 02:34:26 +08:00
优化cmake配置文件, 添加必要头文件 (#2558)
- enable_server cmake选项生效; - enable_tests 选项在api目录下的test同样生效; - 增加stdio.h 防止编译失败;
This commit is contained in:
parent
2410419911
commit
c0a7a4ab70
@ -461,7 +461,9 @@ if(ENABLE_PLAYER AND ENABLE_FFMPEG)
|
||||
endif()
|
||||
|
||||
#MediaServer主程序
|
||||
add_subdirectory(server)
|
||||
if(ENABLE_SERVER)
|
||||
add_subdirectory(server)
|
||||
endif()
|
||||
|
||||
# Android 会 add_subdirectory 并依赖该变量
|
||||
if(ENABLE_SERVER_LIB)
|
||||
|
@ -74,8 +74,6 @@ generate_export_header(mk_api
|
||||
STATIC_DEFINE MediaKitApi_STATIC
|
||||
EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/mk_export.h")
|
||||
|
||||
add_subdirectory(tests)
|
||||
|
||||
file(GLOB API_HEADER_LIST include/*.h ${CMAKE_CURRENT_BINARY_DIR}/*.h)
|
||||
install(FILES ${API_HEADER_LIST}
|
||||
DESTINATION ${INSTALL_PATH_INCLUDE})
|
||||
@ -83,3 +81,7 @@ install(TARGETS mk_api
|
||||
ARCHIVE DESTINATION ${INSTALL_PATH_LIB}
|
||||
LIBRARY DESTINATION ${INSTALL_PATH_LIB}
|
||||
RUNTIME DESTINATION ${INSTALL_PATH_RUNTIME})
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
@ -43,15 +43,3 @@ foreach(TEST_SRC ${TEST_SRC_LIST})
|
||||
target_link_libraries(${exe_name} mk_api)
|
||||
target_compile_options(${exe_name} PRIVATE ${COMPILE_OPTIONS_DEFAULT})
|
||||
endforeach()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "mk_mediakit.h"
|
||||
|
||||
typedef struct {
|
||||
|
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "mk_mediakit.h"
|
||||
#define LOG_LEV 4
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user