forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[new port] ZLMediaKit (microsoft#33024)
* [new port] ZLMediaKit * format manifest * version * fix patch * version * fix cmake warnings, no idea why it happened * version * try to fix build * ver * fix build * ver * Add new feature mp4, set openssl as default feature * version * Add supports field * version * Add new feature sctp and webrtc * version * Add dependency libsrtp to feature webrtc * format * version * Add new feature mysql * version * remove feature x264 * version * remove feature mysql, correct dependency relationship * version * disable ENABLE_PLAYER * ver * update version date * version --------- Co-authored-by: jyu49 <[email protected]>
- Loading branch information
Showing
5 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/3rdpart/CMakeLists.txt b/3rdpart/CMakeLists.txt | ||
index c90129d..06bde42 100644 | ||
--- a/3rdpart/CMakeLists.txt | ||
+++ b/3rdpart/CMakeLists.txt | ||
@@ -24,6 +24,7 @@ | ||
############################################################################## | ||
|
||
# jsoncpp | ||
+if (0) | ||
file(GLOB JSONCPP_SRC_LIST | ||
${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp/include/json/*.h | ||
${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp/src/lib_json/*.cpp | ||
@@ -38,7 +39,8 @@ target_include_directories(jsoncpp | ||
PUBLIC | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/jsoncpp/include") | ||
|
||
-update_cached_list(MK_LINK_LIBRARIES jsoncpp) | ||
+endif() | ||
+update_cached_list(MK_LINK_LIBRARIES JsonCpp::JsonCpp) | ||
|
||
############################################################################## | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index cb85679..c9390bb 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -434,6 +434,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) | ||
# for assert.h | ||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdpart) | ||
|
||
+find_package(jsoncpp CONFIG REQUIRED) | ||
add_subdirectory(3rdpart) | ||
|
||
add_subdirectory(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO ZLMediaKit/ZLMediaKit | ||
REF 2378617dd8bb208129ae7cbbafc26dfeae096d13 | ||
SHA512 ca1f212a9ccf20bdd38a2811909b8327df9fe3d1da17ecf15b996ab040071b267bbef697657b26001c157175d54c96f3156ffdf51f09b2ea1078a9ca283171d8 | ||
HEAD_REF master | ||
PATCHES fix-dependency.patch | ||
) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH TOOL_KIT_SOURCE_PATH | ||
REPO ZLMediaKit/ZLToolKit | ||
REF d2016522a0e4b1d8df51a78b7415fe148f7245ca | ||
SHA512 350730903fb24ce8e22710adea7af67dc1f74d157ae17b9f2e5fabd1c5aced8f45de0abce985130f5013871a3e31f9eaf78b161f734c16a9966da5b876a90e1b | ||
HEAD_REF master | ||
) | ||
|
||
file(REMOVE_RECURSE "${SOURCE_PATH}/3rdpart/ZLToolKit") | ||
file(COPY "${TOOL_KIT_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/3rdpart/ZLToolKit") | ||
|
||
if ("mp4" IN_LIST FEATURES) | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH MEDIA_SRV_SOURCE_PATH | ||
REPO ireader/media-server | ||
REF cdbb3d6b9ea254f454c6e466c5962af5ace01199 | ||
SHA512 c9b6ed487ec283572022fe6eb8562258063a84b513ccc3f8783e4da9f46b19705ce41baf9603277a7642683e24ac4168a11a0c4e7a18b5f56145bf4986064664 | ||
HEAD_REF master | ||
) | ||
|
||
file(REMOVE_RECURSE "${SOURCE_PATH}/3rdpart/media-server") | ||
file(COPY "${MEDIA_SRV_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/3rdpart/media-server") | ||
endif() | ||
|
||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" static ZLMEDIAKIT_BUILD_STATIC) | ||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" static ZLMEDIAKIT_CRT_STATIC) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
openssl ENABLE_OPENSSL | ||
mp4 ENABLE_MP4 | ||
mp4 ENABLE_HLS_FMP4 | ||
mp4 ENABLE_RTPPROXY | ||
mp4 ENABLE_HLS | ||
sctp ENABLE_SCTP | ||
webrtc ENABLE_WEBRTC | ||
INVERTED_FEATURES | ||
) | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-DENABLE_API=ON | ||
-DENABLE_API_STATIC_LIB=${ZLMEDIAKIT_BUILD_STATIC} | ||
-DENABLE_MSVC_MT=${ZLMEDIAKIT_CRT_STATIC} | ||
-DENABLE_ASAN=OFF | ||
-DENABLE_CXX_API=OFF | ||
-DENABLE_JEMALLOC_STATIC=OFF | ||
-DENABLE_FAAC=OFF | ||
-DENABLE_FFMPEG=OFF | ||
-DENABLE_PLAYER=OFF | ||
-DENABLE_SERVER=ON | ||
-DENABLE_SERVER_LIB=OFF | ||
-DENABLE_SRT=ON | ||
-DENABLE_MYSQL=OFF | ||
-DENABLE_X264=OFF | ||
-DENABLE_WEPOLL=ON | ||
-DDISABLE_REPORT=OFF | ||
-DUSE_SOLUTION_FOLDERS=ON | ||
-DENABLE_TESTS=OFF | ||
-DENABLE_MEM_DEBUG=OFF # only valid on Linux | ||
${FEATURE_OPTIONS} | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_copy_tools(TOOL_NAMES MediaServer AUTO_CLEAN) | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"name": "zlmediakit", | ||
"version-date": "2023-08-08", | ||
"description": "A high-performance carrier-grade streaming media service framework based on C++11.", | ||
"homepage": "https://github.com/ZLMediaKit/ZLMediaKit", | ||
"license": "MIT", | ||
"supports": "!uwp & !android", | ||
"dependencies": [ | ||
"jsoncpp", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
], | ||
"default-features": [ | ||
"openssl" | ||
], | ||
"features": { | ||
"mp4": { | ||
"description": "Enable MP4" | ||
}, | ||
"openssl": { | ||
"description": "Enable OpenSSL", | ||
"dependencies": [ | ||
"openssl" | ||
] | ||
}, | ||
"sctp": { | ||
"description": "Enable SCTP", | ||
"dependencies": [ | ||
"usrsctp", | ||
{ | ||
"name": "zlmediakit", | ||
"default-features": false, | ||
"features": [ | ||
"webrtc" | ||
] | ||
} | ||
] | ||
}, | ||
"webrtc": { | ||
"description": "Enable WebRTC", | ||
"dependencies": [ | ||
"libsrtp", | ||
{ | ||
"name": "zlmediakit", | ||
"default-features": false, | ||
"features": [ | ||
"openssl" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "df1d3b48288f3bed8699e277e3211542867c6959", | ||
"version-date": "2023-08-08", | ||
"port-version": 0 | ||
} | ||
] | ||
} |