Commit 7fa27277 authored by Guillaume Pasero's avatar Guillaume Pasero

ENH: Jira-753: first try to support custom system locations with ossim

parent ac379f63
......@@ -5,6 +5,7 @@ set(proj OTB)
set(OTB_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
set(${proj}_DEPENDENCIES)
set(${proj}_ADDITIONAL_CACHE)
set(BUILD_EXAMPLES ON)
......@@ -43,7 +44,7 @@ else()
endif()
if(USE_SYSTEM_OSSIM)
# TODO : handle specific prefix
list(APPEND ${proj}_ADDITIONAL_CACHE SYSTEM_OSSIM_CMAKE_CACHE)
else()
list(APPEND ${proj}_DEPENDENCIES OSSIM)
endif()
......@@ -187,6 +188,7 @@ ExternalProject_Add(${proj}
-DOTB_WRAP_PYTHON:BOOL=${OTB_WRAP_PYTHON}
-DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
${OTB_SB_SWIG_CONFIG}
${OTB_ADDITIONAL_CACHE}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
......
......@@ -10,16 +10,20 @@ if(WIN32)
set(DEFAULT_USE_SYSTEM_OSSIM ON)
endif()
option(USE_SYSTEM_OSSIM " Use a system build of Ossim." ${DEFAULT_USE_SYSTEM_OSSIM})
mark_as_advanced(USE_SYSTEM_OSSIM)
SETUP_SYSTEM_LIBRARY(PROJECT ${proj} DOC " Use a system build of Ossim.")
ADD_SYSTEM_LOCATION(PROJECT ${proj} VARIABLES ${proj}_LIBRARY ${proj}_INCLUDE_DIR)
if(USE_SYSTEM_OSSIM)
message(STATUS " Using OSSIM system version")
message(WARNING " DEBUG : OSSIM_LIBRARY = ${OSSIM_LIBRARY}")
message(WARNING " DEBUG : OSSIM_INCLUDE_DIR = ${OSSIM_INCLUDE_DIR}")
message(WARNING " DEBUG : SYSTEM_OSSIM_CMAKE_CACHE = ${SYSTEM_OSSIM_CMAKE_CACHE}")
else()
set(${proj}_DEPENDENCIES)
set(OSSIM_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${proj}/build)
set(OSSIM_SB_SRC ${CMAKE_BINARY_DIR}/${proj}/src/${proj})
# set project dependencies (GEOS, GDAL, TIFF, JPEG, OPENTHREADS, )
if(USE_SYSTEM_TIFF)
......@@ -83,6 +87,7 @@ else()
-DBUILD_OSSIM_APPS:BOOL=OFF
-DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
-DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
${}
DEPENDS ${${proj}_DEPENDENCIES}
CMAKE_COMMAND ${SB_CMAKE_COMMAND}
)
......
......@@ -10,6 +10,7 @@ set(CMAKE_MODULE_PATH
include(ExternalProject)
include(CTest)
include(SuperBuild_Macro)
# General options
option(ENABLE_QT4 " Use QT4 in the SuperBuild" ON)
......
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