Commit 780463cc authored by Alexander Barkov's avatar Alexander Barkov

Adding detection of msxml library version:

 msxml2, msxml3, msxml4, msxml6

modified:
  storage/connect/CMakeLists.txt
  storage/connect/domdoc.cpp
parent 501fc764
......@@ -84,11 +84,37 @@ IF(CONNECT_WITH_XML)
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabxml.cpp plgxml.cpp libdoc.cpp)
add_definitions(-DXML_SUPPORT)
IF(WIN32)
# Domdoc support. TODO: add msxml4.dll detection.
find_library(MSXML_LIBRARY
NAMES msxml6 msxml4 msxml3 msxml2
PATHS
"C:/Program Files/Microsoft SDKs/Windows/v7.0A/Lib"
"C:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib"
"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib"
DOC "Specify the MSXML? library here."
)
IF(MSXML_LIBRARY MATCHES .*msxml6[.].*)
add_definitions(-DMSX6 -DDOMDOC_SUPPORT)
message(STATUS "MSXML library version: msxml6")
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp)
ELSEIF(MSXML_LIBRARY MATCHES .*msxml4[.].*)
add_definitions(-DMSX4 -DDOMDOC_SUPPORT)
message("MSXML library version: msxml4")
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp)
ELSEIF(MSXML_LIBRARY MATCHES .*msxml3[.].*)
message("MSXML library version: msxml3")
add_definitions(-DMSX3 -DDOMDOC_SUPPORT)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp)
add_definitions(-DDOMDOC_SUPPORT)
ELSEIF(MSXML_LIBRARY MATCHES .*msxml2[.].*)
message("MSXML library version: msxml2")
add_definitions(-DMXS2 -DDOMDOC_SUPPORT)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp)
ELSE()
message(STATUS "msxml? library not found")
ENDIF()
ENDIF(WIN32)
ENDIF(LIBXML2_FOUND)
ENDIF(CONNECT_WITH_XML)
......
......@@ -10,8 +10,12 @@
#import "msxml2.dll" //Does not exist on Vista
#elif defined(MSX3)
#import "msxml3.dll" //Causes error C2872: DOMNodeType: ambiguous symbol ??
#elif defined(MSX4)
#import "msxml4.dll" //Causes error C2872: DOMNodeType: ambiguous symbol ??
#elif defined(MSX6)
#import "msxml6.dll" //Causes error C2872: DOMNodeType: ambiguous symbol ??
#else // MSX4
#import "msxml4.dll" //Causes error C2872: DOMNodeType: ambiguous symbol
#error MSX? is not defined
#endif // MSX
using namespace MSXML2;
#else
......
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