From e95ca00f62f707660b626b0464a86a4963b498fd Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 21 Mar 2018 15:50:07 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_for_android.sh | 2 -- build_for_ios.sh | 2 -- build_for_linux.sh | 2 -- build_for_mac.sh | 2 -- 4 files changed, 8 deletions(-) diff --git a/build_for_android.sh b/build_for_android.sh index e669cfe8..f6fca1b5 100755 --- a/build_for_android.sh +++ b/build_for_android.sh @@ -1,8 +1,6 @@ #!/bin/bash -path=`pwd` cd .. git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git -cd $path cd ZLMediaKit git submodule init git submodule update diff --git a/build_for_ios.sh b/build_for_ios.sh index 3e58e8c9..c7bf929b 100755 --- a/build_for_ios.sh +++ b/build_for_ios.sh @@ -1,8 +1,6 @@ #!/bin/bash -path=`pwd` cd .. git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git -cd $path cd ZLMediaKit git submodule init git submodule update diff --git a/build_for_linux.sh b/build_for_linux.sh index 0feb3f43..2a510c59 100755 --- a/build_for_linux.sh +++ b/build_for_linux.sh @@ -1,8 +1,6 @@ #!/bin/bash -path=`pwd` cd .. git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git -cd $path cd ZLMediaKit git submodule init git submodule update diff --git a/build_for_mac.sh b/build_for_mac.sh index 8f5e0003..60828d2d 100755 --- a/build_for_mac.sh +++ b/build_for_mac.sh @@ -1,8 +1,6 @@ #!/bin/bash -path=`pwd` cd .. git clone --depth=1 https://github.com/xiongziliang/ZLMediaKit.git -cd $path cd ZLMediaKit git submodule init git submodule update From 7a9a63c812f6f92010cd7f5cbc0a30dc156620f8 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 21 Mar 2018 16:01:41 +0800 Subject: [PATCH 2/6] update --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a58498b..d37e0eb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ project(ZLMediaKit) -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.1.3) #使能c++11 -add_compile_options(-std=c++11) +set(CMAKE_CXX_STANDARD 11) #加载自定义模块 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake") From fe779bc5dc9840035fa172bb3c39ed1b15a9e537 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 21 Mar 2018 16:16:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d37e0eb2..e45cf18a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,10 +81,10 @@ add_definitions(-DENABLE_RING_USEBUF) add_library(zltoolkit STATIC ${ToolKit_src_list}) add_library(zlmediakit STATIC ${MediaKit_src_list}) -if (NOT WIN32) - list(APPEND LINK_LIB_LIST pthread) -else() +if (WIN32) list(APPEND LINK_LIB_LIST WS2_32 Iphlpapi shlwapi) +else(LINUX and NOT ANDROID) + list(APPEND LINK_LIB_LIST pthread) endif () message(STATUS "linked libraries:${LINK_LIB_LIST}") From d8249e304fabb09581df3350a9c8635e579380ed Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 21 Mar 2018 16:28:15 +0800 Subject: [PATCH 4/6] update --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e45cf18a..6c674f3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,7 @@ add_library(zlmediakit STATIC ${MediaKit_src_list}) if (WIN32) list(APPEND LINK_LIB_LIST WS2_32 Iphlpapi shlwapi) -else(LINUX and NOT ANDROID) +else if(NOT ANDROID and NOT IOS) list(APPEND LINK_LIB_LIST pthread) endif () From 81cb97f03203ef6bdbeaac4775b5e1f158011e18 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 21 Mar 2018 16:30:12 +0800 Subject: [PATCH 5/6] update --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c674f3b..9948488b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,7 @@ add_library(zlmediakit STATIC ${MediaKit_src_list}) if (WIN32) list(APPEND LINK_LIB_LIST WS2_32 Iphlpapi shlwapi) -else if(NOT ANDROID and NOT IOS) +elif(NOT ANDROID and NOT IOS) list(APPEND LINK_LIB_LIST pthread) endif () From 3addd5452de4e8ab99766f482c9c89208ce6b5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Wed, 21 Mar 2018 17:17:58 +0800 Subject: [PATCH 6/6] Update README.md --- README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9c7862e9..7295c4d8 100644 --- a/README.md +++ b/README.md @@ -110,18 +110,14 @@ Windows | 已经完成移植 - 我的编译环境 - windows 10 - visual studio 2017 - - [ZLToolKit](https://github.com/xiongziliang/ZLToolKit) - [cmake-gui](https://cmake.org/files/v3.10/cmake-3.10.0-rc1-win32-x86.msi) - 编译 ``` -   1 请先编译安装ZLToolKit -   2 使用cmake-gui打开工程并生成vs工程文件(配置时可能需要指定ZLTookKit的路径). -   3 找到工程文件(ZLMediaKit.sln),双击用vs2017打开. -   4 选择编译Release 版本. -   5 依次编译 ZLMediaKit_static、ZLMediaKit_shared、ALL_BUILD、INSTALL. - 6 找到目标文件并运行测试用例. -   7 找到安装的头文件及库文件(在源码所在分区根目录). +   1 使用cmake-gui打开工程并生成vs工程文件. +   2 找到工程文件(ZLMediaKit.sln),双击用vs2017打开. +   3 选择编译Release 版本. + 4 找到目标文件并运行测试用例. ``` ## 使用方法 - 作为服务器: