Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
473bb594
Commit
473bb594
authored
Sep 24, 2018
by
Victor Poughon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: coobook as cmake target (code review)
parent
0e5b8021
Pipeline
#1
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
19 deletions
+10
-19
Documentation/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
...on/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
+4
-3
Documentation/Cookbook/CMakeLists.txt
Documentation/Cookbook/CMakeLists.txt
+6
-16
No files found.
Documentation/Cookbook/CMake/RunApplicationsRstGenerator.sh.cmake.in
View file @
473bb594
#!/bin/sh
export
LD_LIBRARY_PATH
=
@CMAKE_BINARY_DIR@/lib:
$LD_LIBRARY_PATH
export
PYTHONPATH
=
@OTB_PYTHONPATH@:
$PYTHONPATH
export
OTB_APPLICATION_PATH
=
@OTB_APPLICATION_PATH@
#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
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 @
473bb594
...
...
@@ -22,22 +22,13 @@
# Build the cookbook
#
message
(
STATUS
""
)
message
(
STATUS
"Configuring Cookbook..."
)
message
(
STATUS
""
)
find_package
(
OTB REQUIRED
)
if
(
OTB_FOUND
)
include
(
${
OTB_USE_FILE
}
)
message
(
STATUS
"Found OTB:
${
OTB_DIR
}
(found version
\"
${
OTB_VERSION
}
\"
)"
)
else
()
message
(
FATAL_ERROR
"OTB not found while configuring cookbook"
)
if
(
NOT UNIX
)
message
(
STATUS
"Not on Unix: skipping Cookbook build."
)
return
()
endif
()
message
(
STATUS
"
OTB_PYTHONPATH = '
${
OTB_PYTHONPATH
}
'
"
)
message
(
STATUS
"
OTB_APPLICATION_PATH = '
${
OTB_APPLICATION_PATH
}
'
"
)
message
(
STATUS
""
)
message
(
STATUS
"
Configuring Cookbook...
"
)
# here we could add
# find_package (Python3 COMPONENTS Interpreter)
...
...
@@ -60,15 +51,13 @@ mark_as_advanced(PDFLATEX_COMMAND)
# Check that we found everything we need
foreach
(
cmd
OTB_PYTHONPATH
OTB_APPLICATION_PATH
LATEX_COMMAND
TAR_COMMAND
PDFLATEX_COMMAND
SPHINX_BUILD
SH_INTERP
)
if
(
NOT
${
cmd
}
)
message
(
FATAL_ERROR
"
${
cmd
}
not set. Cannot continue"
)
message
(
FATAL_ERROR
"
Error while configuring Cookbook,
${
cmd
}
not set. Cannot continue"
)
endif
()
endforeach
()
...
...
@@ -77,6 +66,7 @@ set(RST_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/rst)
set
(
LATEX_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/latex
)
set
(
HTML_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/html
)
# Print summary of Cookbook configuration
message
(
STATUS
"RST_SOURCE_DIR =
${
RST_SOURCE_DIR
}
"
)
message
(
STATUS
"RST_BINARY_DIR =
${
RST_BINARY_DIR
}
"
)
message
(
STATUS
"LATEX_DIR =
${
LATEX_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