编译PCL Tutorial文件

1、PCL Tutorial是使用SPHINX编译而成的。

2、安装Python2.7,从官方网站上下载(Portable Python测试未成功,待研究)。

3、安装setuptools,安装成功会在Scripts目录下找到easy_install.exe。

4、安装pyparsing和doxylink:

easy_install pyparsing==1.5.7(必须指定版本,因为pyparsing2.0与Python2.7不兼容)。

easy_install -U sphinxcontrib-doxylink

否则编译时会出现如下错误:

Running Sphinx v1.0.1

Extension error:
Could not import extension sphinxcontrib.doxylink.doxylink

4、安装Sphinx,在命令行下执行:

easy_install -U Sphinx。

5、在Tutorial目录下建立文本文件FindSphinx.cmake,文件内容为:

find_program(SPHINX_EXECUTABLE NAMES sphinx-build
  HINTS
  $ENV{SPHINX_DIR}
  PATH_SUFFIXES bin   DOC "Sphinx documentation generator"
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sphinx DEFAULT_MSG   SPHINX_EXECUTABLE
)
mark_as_advanced(
  SPHINX_EXECUTABLE
)

6、使用CMAKE,并将其Where the source code目录指向Tutorial目录。

确保变量SPHINX_EXECUTABLE指向sphinx-build.exe位置。

确保Sphinx_DIR目录指向Tutoril目录(FindSphinx.cmake所在目录)。

7、Configure成功后,单击Generate,生成工程文件。

8、在Visual Studio中编译。

9、编译成chm文件。

 

遗留问题:

公式不能正确显示,待解决。

 http://sphinx-doc.org/ext/math.html#module-sphinx.ext.pngmath

参考链接:

http://ericscottbarr.com/blog/category/sphinx/

http://help.openerp.com/question/6876/installation-issue-pyparsing-200/

原文地址:https://www.cnblogs.com/lilun/p/3141466.html