Commit 1d67d9bf authored by Alexander Barkov's avatar Alexander Barkov

Adding automatic LibXml2 detection for Windows

with searching in a number of typical places.
parent 0ffc8523
...@@ -64,25 +64,29 @@ ENDIF(UNIX) ...@@ -64,25 +64,29 @@ ENDIF(UNIX)
# XML # XML
# #
IF(UNIX) IF(WIN32)
FIND_PACKAGE(LibXml2) # Adding some typical places to search in
IF (LIBXML2_FOUND) SET(PC_LIBXML_INCLUDE_DIRS
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) C:/libxml2/include
SET(XML_LIBRARY ${LIBXML2_LIBRARIES}) C:/libxml/include
SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabxml.cpp plgxml.cpp libdoc.cpp) D:/libxml/include)
add_definitions(-DXML_SUPPORT) SET(PC_LIBXML_LIBRARY_DIRS
ENDIF(LIBXML2_FOUND) C:/libxml2/lib
ELSE(!UNIX) C:/libxml/lib
# Windows D:/libxml/lib)
# This to be localized ENDIF(WIN32)
INCLUDE_DIRECTORIES("D:/Libxml/include") FIND_PACKAGE(LibXml2)
SET(XML_LIBRARY "D:/libxml/lib/libxml2.lib") IF (LIBXML2_FOUND)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
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)
# Domdoc support IF(WIN32)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp) # Domdoc support. TODO: add msxml4.dll detection.
add_definitions(-DDOMDOC_SUPPORT) SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp)
ENDIF(UNIX) add_definitions(-DDOMDOC_SUPPORT)
ENDIF(WIN32)
ENDIF(LIBXML2_FOUND)
# #
......
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