Commit 11964f9a authored by Julien Malik's avatar Julien Malik

COMP: fix TIXML_USE_STL management. wrong macro used, seen with macport version

parent 746ccac0
# - Find TinyXML
# Find the native TinyXML includes and library
#
# TINYXML_FOUND - True if TinyXML found.
# TINYXML_INCLUDE_DIR - where to find tinyxml.h, etc.
# TINYXML_LIBRARIES - List of libraries when using TinyXML.
# TINYXML_FOUND - True if TinyXML found.
# TINYXML_INCLUDE_DIRS - where to find tinyxml.h, etc.
# TINYXML_LIBRARIES - List of libraries when using TinyXML.
# TIXML_USE_STL - ON or undefined whether STL support is found
# can be used directly in a #cmakedefine
#
IF( TINYXML_INCLUDE_DIR )
......@@ -31,7 +33,7 @@ IF(TINYXML_FOUND)
SET(TINYXML_LIBRARIES ${TINYXML_LIBRARY})
# Check if STL support is enabled with macro TIXML_USE_STL
TRY_COMPILE(TINYXML_USE_STL
TRY_COMPILE(TIXML_USE_STL
${CMAKE_CURRENT_BINARY_DIR}/CMake
${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestTinyXMLUseSTL.cxx
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${TINYXML_INCLUDE_DIRS}" "-DLINK_LIBRARIES:STRING=${TINYXML_LIBRARIES}"
......@@ -42,6 +44,6 @@ ELSE(TINYXML_FOUND)
SET(TINYXML_INCLUDE_DIRS)
SET(TINYXML_LIBRARIES)
SET(TINYXML_USE_STL)
SET(TIXML_USE_STL)
ENDIF(TINYXML_FOUND)
......@@ -8,3 +8,4 @@ ELSE(TINYXML_FOUND)
SET(TINYXML_LIBRARIES otbtinyXML)
ENDIF(TINYXML_FOUND)
MARK_AS_ADVANCED(OTB_USE_EXTERNAL_TINYXML)
......@@ -69,8 +69,8 @@
#cmakedefine OTB_USE_SIFTFAST
/* TinyXML Has STL */
#ifndef TINYXML_USE_STL
#cmakedefine TINYXML_USE_STL
#ifndef TIXML_USE_STL
#cmakedefine TIXML_USE_STL
#endif
/* Use Visu/Gui configurations */
......
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