Commit 5498914f authored by Emmanuel Christophe's avatar Emmanuel Christophe

COMP: compilation option to link to mapnik

parent 1b9353a2
......@@ -325,6 +325,35 @@ IF(OTB_USE_CURL)
ENDIF(OTB_USE_CURL)
#-------------------------------
# Mapnik Library
#-------------------------------
OPTION(OTB_USE_MAPNIK "Use mapnik library." OFF)
MARK_AS_ADVANCED(OTB_USE_MAPNIK)
IF(OTB_USE_MAPNIK)
FIND_PATH(MAPNIK_INCLUDE_DIR mapnik/map.hpp PATHS)
MARK_AS_ADVANCED(MAPNIK_INCLUDE_DIR)
IF (NOT MAPNIK_INCLUDE_DIR)
MESSAGE(FATAL_ERROR
"Cannot find MAPNIK include directory. Please set MAPNIK_INCLUDE_DIR or SET OTB_USE_MAPNIK OFF.")
ENDIF (NOT MAPNIK_INCLUDE_DIR)
FIND_LIBRARY(MAPNIK_LIBRARY mapnik )
MARK_AS_ADVANCED(MAPNIK_LIBRARY)
IF (NOT MAPNIK_LIBRARY)
MESSAGE(FATAL_ERROR
"Cannot find MAPNIK library. Please set MAPNIK_LIBRARY or SET OTB_USE_MAPNIK OFF.")
ENDIF (NOT MAPNIK_LIBRARY)
# Add compiler option
ADD_DEFINITIONS(-DOTB_USE_MAPNIK)
INCLUDE_DIRECTORIES(${MAPNIK_INCLUDE_DIR})
ENDIF(OTB_USE_MAPNIK)
#-------------------------------
# Boost Library
#-------------------------------
......
......@@ -93,6 +93,13 @@ IF(OTB_USE_CURL)
${CURL_INCLUDE_DIR} )
ENDIF(OTB_USE_CURL)
#-----------------------------------------------------------------------------
# Include directories from the MAPNIK build tree.
IF(OTB_USE_MAPNIK)
SET(OTB_INCLUDE_DIRS_BUILD_TREE ${OTB_INCLUDE_DIRS_BUILD_TREE}
${MAPNIK_INCLUDE_DIR} )
ENDIF(OTB_USE_MAPNIK)
#-----------------------------------------------------------------------------
# Include directories from the ITK build tree.
IF(OTB_USE_EXTERNAL_ITK)
......@@ -287,6 +294,12 @@ IF(OTB_USE_CURL)
${CURL_INCLUDE_DIR} )
ENDIF(OTB_USE_CURL)
#For MAPNIK header file
IF(OTB_USE_MAPNIK)
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
${MAPNIK_INCLUDE_DIR} )
ENDIF(OTB_USE_MAPNIK)
# For OpentTreads header file
IF(OTB_USE_EXTERNAL_OPENTHREADS)
SET(OTB_INCLUDE_ABSOLUE_DIRS ${OTB_INCLUDE_ABSOLUE_DIRS}
......
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