Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
5c0178b0
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5c0178b0
编写于
1月 06, 2017
作者:
Y
Yu Yang
提交者:
GitHub
1月 06, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1086 from gangliao/swig
Find swig in system first
上级
d41ac090
b49745cd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
55 addition
and
50 deletion
+55
-50
.travis.yml
.travis.yml
+1
-0
cmake/external/swig.cmake
cmake/external/swig.cmake
+54
-50
未找到文件。
.travis.yml
浏览文件 @
5c0178b0
...
...
@@ -29,6 +29,7 @@ addons:
-
python-pip
-
python2.7-dev
-
curl
-
swig
-
graphviz
-
clang-format-3.8
-
automake
...
...
cmake/external/swig.cmake
浏览文件 @
5c0178b0
...
...
@@ -12,59 +12,63 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# build swig as an external project
INCLUDE
(
ExternalProject
)
FIND_PACKAGE
(
SWIG
)
SET
(
SWIG_SOURCES_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/third_party/swig
)
SET
(
SWIG_INSTALL_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/third_party/install/swig
)
SET
(
SWIG_TARGET_VERSION
"3.0.2"
)
SET
(
SWIG_DOWNLOAD_SRC_MD5
"62f9b0d010cef36a13a010dc530d0d41"
)
SET
(
SWIG_DOWNLOAD_WIN_MD5
"3f18de4fc09ab9abb0d3be37c11fbc8f"
)
IF
(
NOT SWIG_FOUND
)
# build swig as an external project
INCLUDE
(
ExternalProject
)
IF
(
WIN32
)
# swig.exe available as pre-built binary on Windows:
ExternalProject_Add
(
swig
URL http://prdownloads.sourceforge.net/swig/swigwin-
${
SWIG_TARGET_VERSION
}
.zip
URL_MD5
${
SWIG_DOWNLOAD_WIN_MD5
}
SOURCE_DIR
${
SWIG_SOURCES_DIR
}
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
""
UPDATE_COMMAND
""
)
SET
(
SWIG_DIR
${
SWIG_SOURCES_DIR
}
CACHE FILEPATH
"SWIG Directory"
FORCE
)
SET
(
SWIG_EXECUTABLE
${
SWIG_SOURCES_DIR
}
/swig.exe CACHE FILEPATH
"SWIG Executable"
FORCE
)
ELSE
(
WIN32
)
# From PCRE configure
ExternalProject_Add
(
pcre
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY https://github.com/svn2github/pcre.git
PREFIX
${
SWIG_SOURCES_DIR
}
/pcre
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
${
SWIG_INSTALL_DIR
}
/pcre
)
SET
(
SWIG_SOURCES_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/third_party/swig
)
SET
(
SWIG_INSTALL_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/third_party/install/swig
)
SET
(
SWIG_TARGET_VERSION
"3.0.2"
)
SET
(
SWIG_DOWNLOAD_SRC_MD5
"62f9b0d010cef36a13a010dc530d0d41"
)
SET
(
SWIG_DOWNLOAD_WIN_MD5
"3f18de4fc09ab9abb0d3be37c11fbc8f"
)
# swig uses bison find it by cmake and pass it down
FIND_PACKAGE
(
BISON
)
IF
(
WIN32
)
# swig.exe available as pre-built binary on Windows:
ExternalProject_Add
(
swig
URL http://prdownloads.sourceforge.net/swig/swigwin-
${
SWIG_TARGET_VERSION
}
.zip
URL_MD5
${
SWIG_DOWNLOAD_WIN_MD5
}
SOURCE_DIR
${
SWIG_SOURCES_DIR
}
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
""
UPDATE_COMMAND
""
)
SET
(
SWIG_DIR
${
SWIG_SOURCES_DIR
}
CACHE FILEPATH
"SWIG Directory"
FORCE
)
SET
(
SWIG_EXECUTABLE
${
SWIG_SOURCES_DIR
}
/swig.exe CACHE FILEPATH
"SWIG Executable"
FORCE
)
ELSE
(
WIN32
)
# From PCRE configure
ExternalProject_Add
(
pcre
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY https://github.com/svn2github/pcre.git
PREFIX
${
SWIG_SOURCES_DIR
}
/pcre
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=
${
SWIG_INSTALL_DIR
}
/pcre
)
# From SWIG configure
ExternalProject_Add
(
swig
GIT_REPOSITORY https://github.com/swig/swig.git
GIT_TAG rel-3.0.10
PREFIX
${
SWIG_SOURCES_DIR
}
CONFIGURE_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig && ./autogen.sh
CONFIGURE_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig &&
env
"PCRE_LIBS=
${
SWIG_INSTALL_DIR
}
/pcre/lib/libpcre.a
${
SWIG_INSTALL_DIR
}
/pcre/lib/libpcrecpp.a
${
SWIG_INSTALL_DIR
}
/pcre/lib/libpcreposix.a"
./configure
--prefix=
${
SWIG_INSTALL_DIR
}
--with-pcre-prefix=
${
SWIG_INSTALL_DIR
}
/pcre
BUILD_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig && make
INSTALL_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig && make install
UPDATE_COMMAND
""
DEPENDS pcre
)
# swig uses bison find it by cmake and pass it down
FIND_PACKAGE
(
BISON
)
SET
(
SWIG_DIR
${
SWIG_INSTALL_DIR
}
/share/swig/
${
SWIG_TARGET_VERSION
}
)
SET
(
SWIG_EXECUTABLE
${
SWIG_INSTALL_DIR
}
/bin/swig
)
ENDIF
(
WIN32
)
# From SWIG configure
ExternalProject_Add
(
swig
GIT_REPOSITORY https://github.com/swig/swig.git
GIT_TAG rel-3.0.10
PREFIX
${
SWIG_SOURCES_DIR
}
CONFIGURE_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig && ./autogen.sh
CONFIGURE_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig &&
env
"PCRE_LIBS=
${
SWIG_INSTALL_DIR
}
/pcre/lib/libpcre.a
${
SWIG_INSTALL_DIR
}
/pcre/lib/libpcrecpp.a
${
SWIG_INSTALL_DIR
}
/pcre/lib/libpcreposix.a"
./configure
--prefix=
${
SWIG_INSTALL_DIR
}
--with-pcre-prefix=
${
SWIG_INSTALL_DIR
}
/pcre
BUILD_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig && make
INSTALL_COMMAND cd
${
SWIG_SOURCES_DIR
}
/src/swig && make install
UPDATE_COMMAND
""
DEPENDS pcre
)
LIST
(
APPEND external_project_dependencies swig
)
SET
(
SWIG_DIR
${
SWIG_INSTALL_DIR
}
/share/swig/
${
SWIG_TARGET_VERSION
}
)
SET
(
SWIG_EXECUTABLE
${
SWIG_INSTALL_DIR
}
/bin/swig
)
ENDIF
(
WIN32
)
LIST
(
APPEND external_project_dependencies swig
)
ENDIF
(
NOT SWIG_FOUND
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录