Commit 3602864b authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: handle wrap python and java in OTB superbuild

parent df0cd763
......@@ -138,6 +138,20 @@ if(MSVC)
set(OTB_SB_JPEG_CONFIG -DJPEG_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libjpeg.lib)
endif()
set(OTB_SB_SWIG_CONFIG)
if(OTB_WRAP_PYTHON OR OTB_WRAP_JAVA)
if(USE_SYSTEM_SWIG)
# TODO : handle specific prefix
else()
if(MSVC)
set(OTB_SB_SWIG_CONFIG
-DSWIG_EXECUTABLE:STRING=${CMAKE_BINARY_DIR}/SWIG/src/SWIG/swig.exe
)
endif()
list(APPEND ${proj}_DEPENDENCIES SWIG)
endif()
endif()
ExternalProject_Add(${proj}
DEPENDS ${${proj}_DEPENDENCIES}
PREFIX ${proj}
......@@ -170,6 +184,9 @@ ExternalProject_Add(${proj}
${OTB_SB_OPENCV_CONFIG}
${OTB_SB_JPEG_CONFIG}
${OTB_SB_LARGEINPUT_CONFIG}
-DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
-DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
${OTB_SB_SWIG_CONFIG}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
......
......@@ -56,6 +56,7 @@ include(External_muParser)
include(External_muParserX)
include(External_TinyXML)
include(External_OpenCV)
include(External_swig)
if(ENABLE_QT4)
include(External_qt4)
......@@ -72,6 +73,10 @@ if(ENABLE_OTB_LARGE_INPUTS)
find_path(OTB_DATA_LARGEINPUT_ROOT OTBData.readme $ENV{OTB_DATA_LARGEINPUT_ROOT})
endif()
# SWIG Wrapping
option(OTB_WRAP_PYTHON "Enable python wrappers for OTB applications (requires SWIG)" ON)
option(OTB_WRAP_JAVA "Enable java wrappers for OTB applications (requires SWIG)" ON)
include(External_OTB)
if(BUILD_ICE)
......
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