Commit 81220c85 authored by Julien Malik's avatar Julien Malik

ENH: support external muparser

parent 1c73b1a6
# - Find MuParser
# Find the native MuParser includes and library
#
# MUPARSER_FOUND - True if MuParser found.
# MUPARSER_INCLUDE_DIR - where to find tinyxml.h, etc.
# MUPARSER_LIBRARIES - List of libraries when using MuParser.
#
IF( MUPARSER_INCLUDE_DIR )
# Already in cache, be silent
SET( MuParser_FIND_QUIETLY TRUE )
ENDIF( MUPARSER_INCLUDE_DIR )
FIND_PATH( MUPARSER_INCLUDE_DIR muParser.h
PATH_SUFFIXES muParser )
FIND_LIBRARY( MUPARSER_LIBRARIES
NAMES muparser
PATH_SUFFIXES muparser )
# handle the QUIETLY and REQUIRED arguments and set MUPARSER_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( MuParser DEFAULT_MSG MUPARSER_INCLUDE_DIR MUPARSER_LIBRARIES )
MARK_AS_ADVANCED( MUPARSER_INCLUDE_DIR MUPARSER_LIBRARIES )
MESSAGE(STATUS "Importing MuParser...")
FIND_PACKAGE(MuParser)
IF(MUPARSER_FOUND)
OPTION(OTB_USE_EXTERNAL_MUPARSER "Use external MuParser library." ON)
ELSE(MUPARSER_FOUND)
OPTION(OTB_USE_EXTERNAL_MUPARSER "Use external MuParser library." OFF)
SET(MUPARSER_LIBRARIES otbmuparser)
ENDIF(MUPARSER_FOUND)
MARK_AS_ADVANCED(OTB_USE_EXTERNAL_MUPARSER)
......@@ -73,7 +73,6 @@ SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/otbedison/edge
${OTB_SOURCE_DIR}/Utilities/otbconfigfile
${OTB_SOURCE_DIR}/Utilities/otbknn
${OTB_SOURCE_DIR}/Utilities/otbmuparser
)
IF(BUILD_APPLICATIONS)
......@@ -117,6 +116,14 @@ ELSEIF(OTB_USE_EXTERNAL_TINYXML)
${OTB_SOURCE_DIR}/Utilities/tinyXMLlib)
ENDIF(OTB_USE_EXTERNAL_TINYXML)
IF(OTB_USE_EXTERNAL_MUPARSER)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${MUPARSER_INCLUDE_DIRS})
ELSEIF(OTB_USE_EXTERNAL_MUPARSER)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${OTB_SOURCE_DIR}/Utilities/otbmuparser)
ENDIF(OTB_USE_EXTERNAL_MUPARSER)
#-----------------------------------------------------------------------------
# Include directories from the ossim build tree
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
......@@ -336,7 +343,6 @@ SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
Utilities/otbedison
Utilities/otbconfigfile
Utilities/otbknn
Utilities/otbmuparser
)
# For CommandLine wrappers
......@@ -399,6 +405,15 @@ ELSE(OTB_USE_EXTERNAL_TINYXML)
Utilities/tinyXMLlib)
ENDIF(OTB_USE_EXTERNAL_TINYXML)
#For MuParser header file
IF(OTB_USE_EXTERNAL_MUPARSER)
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${MUPARSER_INCLUDE_DIRS})
ELSE(OTB_USE_EXTERNAL_MUPARSER)
SET(OTB_INCLUDE_RELATIVE_DIRS ${OTB_INCLUDE_RELATIVE_DIRS}
Utilities/otbmuparser)
ENDIF(OTB_USE_EXTERNAL_MUPARSER)
#For GLU header file
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${OTB_GLU_INCLUDE_PATH} )
......
......@@ -231,6 +231,7 @@ INCLUDE(ImportQt4)
INCLUDE(ImportGetText)
INCLUDE(ImportSiftFast)
INCLUDE(ImportTinyXML)
INCLUDE(ImportMuParser)
INCLUDE_DIRECTORIES (
......
......@@ -3,7 +3,7 @@
FILE(GLOB OTBBasicFilters_SRCS "*.cxx" )
ADD_LIBRARY(OTBBasicFilters ${OTBBasicFilters_SRCS})
TARGET_LINK_LIBRARIES (OTBBasicFilters OTBCommon ITKBasicFilters otbedison otbmuparser)
TARGET_LINK_LIBRARIES (OTBBasicFilters OTBCommon ITKBasicFilters otbedison ${MUPARSER_LIBRARIES})
IF(OTB_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(OTBBasicFilters PROPERTIES ${OTB_LIBRARY_PROPERTIES})
......
......@@ -16,7 +16,7 @@ ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS})
# PROPERTIES
# LINK_INTERFACE_LIBRARIES ""
#)
TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon otbconfigfile otbmuparser ${OGR_LIBRARY} OTBOssimAdapters)
TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon otbconfigfile ${MUPARSER_LIBRARIES} ${OGR_LIBRARY} OTBOssimAdapters)
IF(OTB_USE_MAPNIK)
TARGET_LINK_LIBRARIES(OTBCommon ${MAPNIK_LIBRARY} ${ICUUC_LIBRARY})
ENDIF(OTB_USE_MAPNIK)
......
......@@ -52,10 +52,9 @@ IF(NOT OTB_USE_EXTERNAL_BOOST)
ADD_SUBDIRECTORY(BGL)
ENDIF(NOT OTB_USE_EXTERNAL_BOOST)
MESSAGE(STATUS "Configuring otbmuparser...")
ADD_SUBDIRECTORY(otbmuparser)
MESSAGE(STATUS "Configuring otbsvm...")
ADD_SUBDIRECTORY(otbsvm )
MESSAGE(STATUS "Configuring InsightJournal...")
ADD_SUBDIRECTORY(InsightJournal)
......@@ -66,6 +65,7 @@ ENDIF(NOT OTB_USE_EXTERNAL_OSSIM)
MESSAGE(STATUS "Configuring otbossimplugins...")
ADD_SUBDIRECTORY(otbossimplugins)
MESSAGE(STATUS "Configuring otb6S...")
ADD_SUBDIRECTORY(otb6S)
......@@ -74,8 +74,14 @@ IF(NOT OTB_USE_EXTERNAL_TINYXML)
ADD_SUBDIRECTORY(tinyXMLlib)
ENDIF(NOT OTB_USE_EXTERNAL_TINYXML)
IF(NOT OTB_USE_EXTERNAL_MUPARSER)
MESSAGE(STATUS "Configuring otbmuparser...")
ADD_SUBDIRECTORY(otbmuparser)
ENDIF(NOT OTB_USE_EXTERNAL_MUPARSER)
MESSAGE(STATUS "Configuring otbkml...")
ADD_SUBDIRECTORY(otbkml)
MESSAGE(STATUS "Configuring otbedison...")
ADD_SUBDIRECTORY(otbedison)
......
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