Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
213
Issues
213
List
Boards
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
968396f0
Commit
968396f0
authored
Sep 28, 2018
by
Victor Poughon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: cookbook build support both python wrappings
parent
0e5993b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
Documentation/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
...on/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
+1
-1
Documentation/Cookbook/CMakeLists.txt
Documentation/Cookbook/CMakeLists.txt
+14
-8
No files found.
Documentation/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
View file @
968396f0
...
...
@@ -2,7 +2,7 @@
#cmake builds with rpath in the binary dir, so we don't need to set LD_LIBRARY_PATH here
#export LD_LIBRARY_PATH=@CMAKE_BINARY_DIR@/lib:$LD_LIBRARY_PATH
export
PYTHONPATH
=
@
CMAKE_BINARY_DIR@/lib/otb/python
:
$PYTHONPATH
export
PYTHONPATH
=
@
PYTHONPATH_COOKBOOK@
:
$PYTHONPATH
export
OTB_APPLICATION_PATH
=
@CMAKE_BINARY_DIR@/lib/otb/applications
python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py
-o
"
$1
"
Documentation/Cookbook/CMakeLists.txt
View file @
968396f0
...
...
@@ -61,6 +61,19 @@ foreach(cmd
endif
()
endforeach
()
# We need to set PYTHONPATH for the script otbGenerateWrappersRstDoc.py, depending on how the Python3 module was built
if
(
OTB_WRAP_PYTHON3
)
set
(
PYTHONPATH_COOKBOOK
"
${
CMAKE_BINARY_DIR
}
/lib/otb/python3"
)
elseif
(
OTB_WRAP_PYTHON
)
# Cookbook only supports Python3
# But OTB_WRAP_PYTHON can wrap both python2 and python3
if
(
${
PYTHONLIBS_VERSION_STRING
}
STRGREATER
"3.0.0"
)
set
(
PYTHONPATH_COOKBOOK
"
${
CMAKE_BINARY_DIR
}
/lib/otb/python"
)
else
()
message
(
ERROR
"Must wrap OTB with python lib 3+ to build the cookbook, but found version
${
PYTHONLIBS_VERSION_STRING
}
"
)
endif
()
endif
()
set
(
RST_SOURCE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/rst
)
set
(
RST_BINARY_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/rst
)
set
(
LATEX_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/latex
)
...
...
@@ -71,6 +84,7 @@ message(STATUS "RST_SOURCE_DIR = ${RST_SOURCE_DIR}")
message
(
STATUS
"RST_BINARY_DIR =
${
RST_BINARY_DIR
}
"
)
message
(
STATUS
"LATEX_DIR =
${
LATEX_DIR
}
"
)
message
(
STATUS
"HTML_DIR =
${
HTML_DIR
}
"
)
message
(
STATUS
"PYTHONPATH_COOKBOOK =
${
PYTHONPATH_COOKBOOK
}
"
)
# Clean any existing build
macro
(
remove_and_make_directories
)
...
...
@@ -106,14 +120,6 @@ set(OTB_COPYRIGHT_TEXT "${OTB_COPYRIGHT_YEAR} CNES.The OTB CookBook is licensed
configure_file
(
${
RST_SOURCE_DIR
}
/conf.py.in
${
SPHINX_CONF_DIR
}
/conf.py @ONLY
)
#configure_file(${RST_SOURCE_DIR}/Makefile.in ${RST_GENERATED_SOURCE_DIR}/Makefile.sphinx @ONLY)
# Internal variables.
# PAPEROPT_a4 = -D latex_paper_size=a4
# PAPEROPT_letter = -D latex_paper_size=letter
# ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# # the i18n builder cannot share the environment and doctrees with the others
# I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
add_custom_target
(
generate_otbapps_rst
COMMAND
${
SH_INTERP
}
${
CMAKE_CURRENT_BINARY_DIR
}
/RunApplicationsRstGenerator.sh
${
RST_BINARY_DIR
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment