]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Build html_docs (Sphinx) with CMake
authorvsr <vsr@opencascade.com>
Thu, 1 Nov 2012 09:05:54 +0000 (09:05 +0000)
committervsr <vsr@opencascade.com>
Thu, 1 Nov 2012 09:05:54 +0000 (09:05 +0000)
doc/docutils/CMakeLists.txt

index 5bc5983eb87b2f620e76f4c7659b6600562ec9c6..dd20ee0f9c689d6598749ecec3b0387c94d11e22 100755 (executable)
@@ -1,66 +1,66 @@
-# Copyright (C) 2012  CEA/DEN, EDF R&D, OPEN CASCADE\r
-#\r
-# This library is free software; you can redistribute it and/or\r
-# modify it under the terms of the GNU Lesser General Public\r
-# License as published by the Free Software Foundation; either\r
-# version 2.1 of the License.\r
-#\r
-# This library is distributed in the hope that it will be useful,\r
-# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-# Lesser General Public License for more details.\r
-#\r
-# You should have received a copy of the GNU Lesser General Public\r
-# License along with this library; if not, write to the Free Software\r
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA\r
-#\r
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com\r
-#\r
-\r
-SET(SPHINXOPTS\r
-)\r
-SET(SOURCEDIR\r
-  ${CMAKE_CURRENT_SOURCE_DIR}\r
-)\r
-SET(PAPEROPT_a4\r
-  -D\r
-  latex_paper_size=a4\r
-)\r
-SET(ALLSPHINXOPTS\r
-  -d\r
-  doctrees\r
-  ${PAPEROPT_a4}\r
-  ${SPHINXOPTS}\r
-  ${SOURCEDIR}\r
-)\r
-\r
-SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" "${CMAKE_CURRENT_BINARY_DIR}/conf.py")                \r
-\r
-IF(WINDOWS)\r
-  STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=%KERNEL_ROOT_DIR%/lib/python2.6/site-packages/salome\;%PYTHONPATH%\r
-  @SET PYTHONPATH=%KERNEL_ROOT_DIR%/bin/salome\;%PYTHONPATH%\r
-  @SET PATH=%KERNEL_ROOT_DIR%/lib/salome\;%PATH%\r
-  @SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PYTHONPATH%\r
-  @SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/python\;%PYTHONPATH%\r
-  @SET PATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PATH%\r
-  ")\r
-  SET(EXT "bat")\r
-  SET(CALL_STR "call")\r
-ELSE(WINDOWS)\r
-  SET(SCR "export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/python2.6/site-packages/salome:\${PYTHONPATH}\r
-  export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PYTHONPATH}\r
-  export LD_LIBRARY_PATH=\${KERNEL_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}\r
-  export PYTHONPATH=\${OMNIORB_ROOT_USER}/omniORB-4.1.5/lib:\${PYTHONPATH}\r
-  export PYTHONPATH=\${OMNIORB_ROOT_USER}/omniORB-4.1.5/lib/python2.6/site-packages:\${PYTHONPATH}\r
-  export LD_LIBRARY_PATH=\${INST_ROOT}/omniORB-4.1.5/lib:\${LD_LIBRARY_PATH}\r
-  ")\r
-  SET(EXT "sh")\r
-  SET(CALL_STR ".")\r
-ENDIF(WINDOWS)\r
-\r
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")\r
-\r
-ADD_CUSTOM_TARGET(html_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} && ${SPHINX_EXECUTABLE} -Q -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} html\r
-  COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''')\"\r
-  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}\r
-)\r
+# Copyright (C) 2012  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(SPHINXOPTS
+)
+SET(SOURCEDIR
+  ${CMAKE_CURRENT_SOURCE_DIR}
+)
+SET(PAPEROPT_a4
+  -D
+  latex_paper_size=a4
+)
+SET(ALLSPHINXOPTS
+  -d
+  doctrees
+  ${PAPEROPT_a4}
+  ${SPHINXOPTS}
+  ${SOURCEDIR}
+)
+
+SALOME_CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" "${CMAKE_CURRENT_BINARY_DIR}/conf.py")                
+
+IF(WINDOWS)
+  SET(SCR "@SET PYTHONPATH=\${CMAKE_INSTALL_PREFIX}\\lib\\python2.6\\site-packages\\salome\;%PYTHONPATH%
+  @SET PYTHONPATH=\${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
+  @SET PATH=\${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
+  @SET PYTHONPATH=\${OMNIORB_ROOT_USER}\\lib\\x86_win32\;%PYTHONPATH%
+  @SET PYTHONPATH=\${OMNIORB_ROOT_USER}\\lib\\python\;%PYTHONPATH%
+  @SET PATH=\${OMNIORB_ROOT_USER}\\lib\\x86_win32\;%PATH%
+  ")
+  SET(EXT "bat")
+  SET(CALL_STR "call")
+ELSE(WINDOWS)
+  SET(SCR "export PYTHONPATH=\${CMAKE_INSTALL_PREFIX}/lib/python2.6/site-packages/salome:\${PYTHONPATH}
+  export PYTHONPATH=\${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
+  export LD_LIBRARY_PATH=\${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
+  export PYTHONPATH=\${OMNIORB_ROOT_USER}/lib:\${PYTHONPATH}
+  export PYTHONPATH=\${OMNIORB_ROOT_USER}/lib/python2.6/site-packages:\${PYTHONPATH}
+  export LD_LIBRARY_PATH=\${OMNIORB_ROOT_USER}/lib:\${LD_LIBRARY_PATH}
+  ")
+  SET(EXT "sh")
+  SET(CALL_STR ".")
+ENDIF(WINDOWS)
+
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
+
+ADD_CUSTOM_TARGET(html_docs ${CALL_STR} ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} && ${SPHINX_EXECUTABLE} -c ${CMAKE_BINARY_DIR}/doc/docutils -b html ${ALLSPHINXOPTS} html
+  COMMAND ${PYTHON_EXECUTABLE} -c \"import shutil\;shutil.rmtree('''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''', True)\;shutil.copytree('''${CMAKE_CURRENT_BINARY_DIR}/html''', '''${CMAKE_INSTALL_PREFIX}/share/doc/salome/tui/KERNEL/docutils''')\"
+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+)