Commit 6947af8c authored by Emmanuel Christophe's avatar Emmanuel Christophe

COMP: fixing CMakeLists for mapnik

parent 4386995a
...@@ -353,11 +353,12 @@ IF(OTB_USE_MAPNIK) ...@@ -353,11 +353,12 @@ IF(OTB_USE_MAPNIK)
"Cannot find MAPNIK library. Please set MAPNIK_LIBRARY or SET OTB_USE_MAPNIK OFF.") "Cannot find MAPNIK library. Please set MAPNIK_LIBRARY or SET OTB_USE_MAPNIK OFF.")
ENDIF (NOT MAPNIK_LIBRARY) ENDIF (NOT MAPNIK_LIBRARY)
# Add compiler option # Add compiler option
ADD_DEFINITIONS(-DOTB_USE_MAPNIK) ADD_DEFINITIONS(-DOTB_USE_MAPNIK)
INCLUDE_DIRECTORIES(${MAPNIK_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${MAPNIK_INCLUDE_DIR})
ENDIF(OTB_USE_MAPNIK) ENDIF(OTB_USE_MAPNIK)
#------------------------------- #-------------------------------
...@@ -389,7 +390,7 @@ IF(OTB_USE_PQXX) ...@@ -389,7 +390,7 @@ IF(OTB_USE_PQXX)
"Cannot find PQ library. Please set PQ_LIBRARY or SET OTB_USE_PQXX OFF.") "Cannot find PQ library. Please set PQ_LIBRARY or SET OTB_USE_PQXX OFF.")
ENDIF (NOT PQ_LIBRARY) ENDIF (NOT PQ_LIBRARY)
# Add compiler option # Add compiler option
ADD_DEFINITIONS(-DOTB_USE_PQXX) ADD_DEFINITIONS(-DOTB_USE_PQXX)
...@@ -406,6 +407,12 @@ ENDIF(OTB_USE_PQXX) ...@@ -406,6 +407,12 @@ ENDIF(OTB_USE_PQXX)
OPTION(OTB_USE_EXTERNAL_BOOST "Use an outside build of Boost." OFF) OPTION(OTB_USE_EXTERNAL_BOOST "Use an outside build of Boost." OFF)
MARK_AS_ADVANCED(OTB_USE_EXTERNAL_BOOST) MARK_AS_ADVANCED(OTB_USE_EXTERNAL_BOOST)
IF (OTB_USE_MAPNIK)
IF(NOT OTB_USE_EXTERNAL_BOOST)
MESSAGE("You need to set OTB_USE_EXTERNAL_BOOST to ON when using MAPNIK")
ENDIF(NOT OTB_USE_EXTERNAL_BOOST)
ENDIF(OTB_USE_MAPNIK)
IF(OTB_USE_EXTERNAL_BOOST) IF(OTB_USE_EXTERNAL_BOOST)
FIND_PACKAGE(Boost) FIND_PACKAGE(Boost)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
......
...@@ -14,8 +14,7 @@ ENDIF( NOT OTB_USE_PQXX ) ...@@ -14,8 +14,7 @@ ENDIF( NOT OTB_USE_PQXX )
ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS}) ADD_LIBRARY(OTBCommon ${OTBCommon_SRCS})
TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon) TARGET_LINK_LIBRARIES (OTBCommon ITKAlgorithms ITKStatistics ITKCommon)
IF (OTB_USE_MAPNIK) IF (OTB_USE_MAPNIK)
#TODO this line should be refined when we will like to have this capability with windows TARGET_LINK_LIBRARIES(OTBCommon ${MAPNIK_LIBRARY})
TARGET_LINK_LIBRARIES(OTBCommon ${MAPNIK_LIBRARY}/libmapnik.so)
ENDIF(OTB_USE_MAPNIK) ENDIF(OTB_USE_MAPNIK)
IF (OTB_USE_PQXX) IF (OTB_USE_PQXX)
#TODO this line should be refined when we will like to have this capability with windows #TODO this line should be refined when we will like to have this capability with windows
......
...@@ -957,8 +957,7 @@ TARGET_LINK_LIBRARIES(otbCommonTests8 OTBIO OTBTesting) ...@@ -957,8 +957,7 @@ TARGET_LINK_LIBRARIES(otbCommonTests8 OTBIO OTBTesting)
IF(OTB_USE_MAPNIK) IF(OTB_USE_MAPNIK)
ADD_EXECUTABLE(otbCommonTests9 otbCommonTests9.cxx ${BasicCommon_SRCS9}) ADD_EXECUTABLE(otbCommonTests9 otbCommonTests9.cxx ${BasicCommon_SRCS9})
#TODO this line should be refined when we will like to have this capability with windows TARGET_LINK_LIBRARIES(otbCommonTests9 OTBIO OTBTesting ${MAPNIK_LIBRARY})
TARGET_LINK_LIBRARIES(otbCommonTests9 OTBIO OTBTesting ${MAPNIK_LIBRARY}/libmapnik.so)
ENDIF(OTB_USE_MAPNIK) ENDIF(OTB_USE_MAPNIK)
IF(OTB_USE_PQXX) IF(OTB_USE_PQXX)
......
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