Commit 6690bafc authored by Alexander Barkov's avatar Alexander Barkov

Adding a possibility to disable ODBC, XML and MySQL support in CONNECT:

cmake . -DCONNECT_WITH_ODBC=0 -DCONNECT_WITH_XML=0 -DCONNECT_WITH_MYSQL=0

modified:
  storage/connect/CMakeLists.txt
parent ba82edd4
......@@ -24,7 +24,7 @@ colblk.cpp reldef.cpp tabcol.cpp table.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp
tabdos.cpp tabfix.cpp tabfmt.cpp tabmul.cpp tabsys.cpp tabvct.cpp
valblk.cpp value.cpp xindex.cpp xobject.cpp
filamzip.cpp tabtbl.cpp myconn.cpp myutil.cpp tabmysql.cpp)
filamzip.cpp tabtbl.cpp myutil.cpp)
#
......@@ -64,7 +64,10 @@ ENDIF(UNIX)
# XML
#
IF(WIN32)
OPTION(CONNECT_WITH_XML "Compile CONNECT storage engine with XML support" ON)
IF(CONNECT_WITH_XML)
IF(WIN32)
# Adding some typical places to search in
SET(PC_LIBXML_INCLUDE_DIRS
C:/libxml2/include
......@@ -74,9 +77,9 @@ IF(WIN32)
C:/libxml2/lib
C:/libxml/lib
D:/libxml/lib)
ENDIF(WIN32)
FIND_PACKAGE(LibXml2)
IF (LIBXML2_FOUND)
ENDIF(WIN32)
FIND_PACKAGE(LibXml2)
IF (LIBXML2_FOUND)
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})
SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabxml.cpp plgxml.cpp libdoc.cpp)
......@@ -86,31 +89,42 @@ IF (LIBXML2_FOUND)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} domdoc.cpp)
add_definitions(-DDOMDOC_SUPPORT)
ENDIF(WIN32)
ENDIF(LIBXML2_FOUND)
ENDIF(LIBXML2_FOUND)
ENDIF(CONNECT_WITH_XML)
#
# MySQL
#
# For static linking
SET(MYSQL_LIBRARY mysqlclient)
# For dynamic linking
#SET(MYSQL_LIBRARY libmysql)
add_definitions(-DMYSQL_SUPPORT)
IF(!UNIX)
OPTION(CONNECT_WITH_MYSQL
"Compile CONNECT storage engine with remote MySQL connection support"
ON)
IF(CONNECT_WITH_MYSQL)
SET(CONNECT_SOURCES ${CONNECT_SOURCES} myconn.cpp tabmysql.cpp)
# For static linking
SET(MYSQL_LIBRARY mysqlclient)
# For dynamic linking
#SET(MYSQL_LIBRARY libmysql)
add_definitions(-DMYSQL_SUPPORT)
IF(!UNIX)
#
# TODO: remove this
# change to use "#include "../../include/mysql.h" in the sources.
INCLUDE_DIRECTORIES("../../include/mysql")
ENDIF(!UNIX)
ENDIF(!UNIX)
ENDIF(CONNECT_WITH_MYSQL)
#
# ODBC
#
if(UNIX)
OPTION(CONNECT_WITH_ODBC "Compile CONNECT storage engine with ODBC support" ON)
IF(CONNECT_WITH_ODBC)
if(UNIX)
# Note, we currently detect unixODBC only on Linux.
# TODO: detect iODBC as well. Simply adding "iodbc" into NAMES in
# find_library does not work on machines with both unixODBC and iODBC
......@@ -156,11 +170,12 @@ if(UNIX)
ELSE()
SET(ODBC_LIBRARY "")
ENDIF()
ELSE(!UNIX)
ELSE(!UNIX)
add_definitions(-DODBC_SUPPORT)
SET(ODBC_LIBRARY "odbc32.lib odbccp32.lib")
SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabodbc.cpp odbconn.cpp)
ENDIF(UNIX)
ENDIF(UNIX)
ENDIF(CONNECT_WITH_ODBC)
#
......
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