Commit d1011629 authored by Alexander Barkov's avatar Alexander Barkov

Adding separate flags to disable MSXML and LIBXML2 libraries on Windows:

-DCONNECT_WITH_LIBXML2=0
-DCONNECT_WITH_MSXML=0

modified:
  storage/connect/CMakeLists.txt
parent 627d046d
...@@ -64,9 +64,9 @@ ENDIF(UNIX) ...@@ -64,9 +64,9 @@ ENDIF(UNIX)
# XML # XML
# #
OPTION(CONNECT_WITH_XML "Compile CONNECT storage engine with XML support" ON) OPTION(CONNECT_WITH_LIBXML2 "Compile CONNECT storage engine with LIBXML2 support" ON)
IF(CONNECT_WITH_XML) IF(CONNECT_WITH_LIBXML2)
IF(WIN32) IF(WIN32)
# Adding some typical places to search in # Adding some typical places to search in
SET(PC_LIBXML_INCLUDE_DIRS SET(PC_LIBXML_INCLUDE_DIRS
...@@ -84,39 +84,42 @@ IF(CONNECT_WITH_XML) ...@@ -84,39 +84,42 @@ IF(CONNECT_WITH_XML)
SET(XML_LIBRARY ${LIBXML2_LIBRARIES}) SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabxml.cpp plgxml.cpp libdoc.cpp) SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabxml.cpp plgxml.cpp libdoc.cpp)
add_definitions(-DXML_SUPPORT) add_definitions(-DXML_SUPPORT)
ENDIF(LIBXML2_FOUND)
ENDIF(CONNECT_WITH_LIBXML2)
IF(WIN32)
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)
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) IF(WIN32)
ENDIF(CONNECT_WITH_XML) OPTION(CONNECT_WITH_MSXML "Compile CONNECT storage engine with MSXML support" ON)
IF(CONNECT_WITH_MSXML)
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)
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(CONNECT_WITH_MSXML)
ENDIF(WIN32)
# #
......
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