Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2e175a46
Commit
2e175a46
authored
Jan 22, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatic detection for LIBXML2 and ODBC includes/libraries.
parent
d7143a41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
12 deletions
+71
-12
storage/connect/CMakeLists.txt
storage/connect/CMakeLists.txt
+71
-12
No files found.
storage/connect/CMakeLists.txt
View file @
2e175a46
...
...
@@ -22,12 +22,9 @@ message(STATUS "GCC: All warnings disabled")
endif
()
add_definitions
(
-DUNIX -DLINUX -DUBUNTU -DMARIADB -DFORCE_INIT_OF_VARS -DMYSQL_DYNAMIC_PLUGIN
)
add_definitions
(
-DHUGE_SUPPORT -D
XML_SUPPORT -DMYSQL_SUPPORT -DZIP_SUPPORT -DODBC
_SUPPORT
)
add_definitions
(
-DHUGE_SUPPORT -D
ZIP
_SUPPORT
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fpermissive -fexceptions -fPIC "
)
INCLUDE_DIRECTORIES
(
/usr/include/libxml2
)
INCLUDE_DIRECTORIES
(
/usr/include/i386-linux-gnu
)
INCLUDE_DIRECTORIES
()
get_property
(
inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES
)
message
(
"inc_dirs =
${
inc_dirs
}
"
)
...
...
@@ -42,22 +39,84 @@ 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
tabodbc.cpp odbconn.cpp
filamzip.cpp tabtbl.cpp myconn.cpp myutil.cpp tabmysql.cpp
tabxml.cpp plgxml.cpp
libdoc.cpp
)
tabxml.cpp plgxml.cpp
)
#
# XML
#
SET
(
XML_LIBRARY
"-L/usr/lib/i386-linux-gnu -lxml2"
)
#SET(MYSQL_LIBRARY "-L/usr/local/mysql/lib -lmysqlclient")
#SET(MYSQL_LIBRARY "-L/ ../../libmysql/libmysqlclient.a")
FIND_PACKAGE
(
LibXml2
)
IF
(
LIBXML2_FOUND
)
INCLUDE_DIRECTORIES
(
${
LIBXML2_INCLUDE_DIR
}
)
SET
(
XML_LIBRARY
${
LIBXML2_LIBRARIES
}
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
libdoc.cpp
)
add_definitions
(
-DXML_SUPPORT
)
ENDIF
()
#
# MySQL
#
# For static linking
SET
(
MYSQL_LIBRARY mysqlclient
)
# For dynaric linking
# For dynamic linking
#SET(MYSQL_LIBRARY libmysql)
add_definitions
(
-DMYSQL_SUPPORT
)
#
# ODBC
#
# 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
# installed, because it finds headers from unixODBC while libraries
# from iODBC. We could search for 'isql.h' instead of 'sql.h' so
# the library 'libodbc' gets compiled with 'isql.h' and
# the library 'libiodbc' gets compiled with 'sql'h.
# This will also need changes in the sources (e.g. #include <isql.h>).
#
find_path
(
ODBC_INCLUDE_DIR sql.h
/usr/include
/usr/include/odbc
/usr/local/include
/usr/local/include/odbc
/usr/local/odbc/include
"C:/Program Files/ODBC/include"
"C:/Program Files/Microsoft SDKs/Windows/v7.0A/include"
"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/include"
DOC
"Specify the directory containing sql.h."
)
find_library
(
ODBC_LIBRARY
NAMES odbc odbcinst odbc32
PATHS
/usr/lib
/usr/lib/odbc
/usr/local/lib
/usr/local/lib/odbc
/usr/local/odbc/lib
"C:/Program Files/ODBC/lib"
"C:/ODBC/lib/debug"
"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 ODBC driver manager library here."
)
IF
(
ODBC_INCLUDE_DIR AND ODBC_LIBRARY
)
INCLUDE_DIRECTORIES
(
${
ODBC_INCLUDE_DIR
}
)
add_definitions
(
-DODBC_SUPPORT
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabodbc.cpp odbconn.cpp
)
ELSE
()
SET
(
ODBC_LIBRARY
""
)
ENDIF
()
SET
(
ODBC_LIBRARY
"-L/usr/lib -lodbc"
)
#
# Plugin definition
#
MYSQL_ADD_PLUGIN
(
connect
${
CONNECT_SOURCES
}
STORAGE_ENGINE MODULE_ONLY
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment