Commit 473bb594 authored by Victor Poughon's avatar Victor Poughon

ENH: coobook as cmake target (code review)

parent 0e5b8021
Pipeline #1 failed with stages
#!/bin/sh #!/bin/sh
export LD_LIBRARY_PATH=@CMAKE_BINARY_DIR@/lib:$LD_LIBRARY_PATH #cmake builds with rpath in the binary dir, so we don't need to set LD_LIBRARY_PATH here
export PYTHONPATH=@OTB_PYTHONPATH@:$PYTHONPATH #export LD_LIBRARY_PATH=@CMAKE_BINARY_DIR@/lib:$LD_LIBRARY_PATH
export OTB_APPLICATION_PATH=@OTB_APPLICATION_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" python3 @CMAKE_CURRENT_SOURCE_DIR@/Scripts/otbGenerateWrappersRstDoc.py -o "$1"
...@@ -22,22 +22,13 @@ ...@@ -22,22 +22,13 @@
# Build the cookbook # Build the cookbook
# #
message(STATUS "") if (NOT UNIX)
message(STATUS "Configuring Cookbook...") message (STATUS "Not on Unix: skipping Cookbook build.")
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")
return() return()
endif() endif()
message(STATUS "OTB_PYTHONPATH = '${OTB_PYTHONPATH}'") message(STATUS "")
message(STATUS "OTB_APPLICATION_PATH = '${OTB_APPLICATION_PATH}'") message(STATUS "Configuring Cookbook...")
# here we could add # here we could add
# find_package (Python3 COMPONENTS Interpreter) # find_package (Python3 COMPONENTS Interpreter)
...@@ -60,15 +51,13 @@ mark_as_advanced(PDFLATEX_COMMAND) ...@@ -60,15 +51,13 @@ mark_as_advanced(PDFLATEX_COMMAND)
# Check that we found everything we need # Check that we found everything we need
foreach(cmd foreach(cmd
OTB_PYTHONPATH
OTB_APPLICATION_PATH
LATEX_COMMAND LATEX_COMMAND
TAR_COMMAND TAR_COMMAND
PDFLATEX_COMMAND PDFLATEX_COMMAND
SPHINX_BUILD SPHINX_BUILD
SH_INTERP) SH_INTERP)
if(NOT ${cmd}) if(NOT ${cmd})
message(FATAL_ERROR "${cmd} not set. Cannot continue") message(FATAL_ERROR "Error while configuring Cookbook, ${cmd} not set. Cannot continue")
endif() endif()
endforeach() endforeach()
...@@ -77,6 +66,7 @@ set(RST_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/rst) ...@@ -77,6 +66,7 @@ set(RST_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/rst)
set(LATEX_DIR ${CMAKE_CURRENT_BINARY_DIR}/latex) set(LATEX_DIR ${CMAKE_CURRENT_BINARY_DIR}/latex)
set(HTML_DIR ${CMAKE_CURRENT_BINARY_DIR}/html) set(HTML_DIR ${CMAKE_CURRENT_BINARY_DIR}/html)
# Print summary of Cookbook configuration
message(STATUS "RST_SOURCE_DIR = ${RST_SOURCE_DIR}") message(STATUS "RST_SOURCE_DIR = ${RST_SOURCE_DIR}")
message(STATUS "RST_BINARY_DIR = ${RST_BINARY_DIR}") message(STATUS "RST_BINARY_DIR = ${RST_BINARY_DIR}")
message(STATUS "LATEX_DIR = ${LATEX_DIR}") message(STATUS "LATEX_DIR = ${LATEX_DIR}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment