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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
bb6b87fd
Commit
bb6b87fd
authored
Jan 22, 2013
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing CMakeLists.txt:
- Olivier's changes for Linux/Windows - Splitting cmake code by feature
parent
37465ea2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
131 additions
and
76 deletions
+131
-76
storage/connect/CMakeLists.txt
storage/connect/CMakeLists.txt
+131
-76
No files found.
storage/connect/CMakeLists.txt
View file @
bb6b87fd
...
@@ -13,46 +13,74 @@
...
@@ -13,46 +13,74 @@
# along with this program; if not, write to the Free Software
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
if
(
WITH_WARNINGS
)
add_definitions
(
-Wall -Wfatal-errors -Wextra
)
message
(
STATUS
"GCC: All warnings enabled"
)
else
()
add_definitions
(
--no-warnings
)
message
(
STATUS
"GCC: All warnings disabled"
)
endif
()
add_definitions
(
-DUNIX -DLINUX -DUBUNTU -DMARIADB -DFORCE_INIT_OF_VARS -DMYSQL_DYNAMIC_PLUGIN
)
add_definitions
(
-DHUGE_SUPPORT -DZIP_SUPPORT
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fpermissive -fexceptions -fPIC "
)
get_property
(
inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES
)
message
(
"inc_dirs =
${
inc_dirs
}
"
)
SET
(
CONNECT_PLUGIN_STATIC
"connect"
)
SET
(
CONNECT_PLUGIN_STATIC
"connect"
)
SET
(
CONNECT_PLUGIN_DYNAMIC
"connect"
)
SET
(
CONNECT_PLUGIN_DYNAMIC
"connect"
)
SET
(
CONNECT_SOURCES
SET
(
CONNECT_SOURCES
ha_connect.cc connect.cc user_connect.cc mycat.cc
ha_connect.cc connect.cc user_connect.cc mycat.cc
fmdlex.c
inihandl.c
osutil.c plugutil.c rcmsg.c
fmdlex.c osutil.c plugutil.c rcmsg.c
csort.cpp maputil.cpp plgdbutl.cpp
csort.cpp maputil.cpp plgdbutl.cpp
colblk.cpp reldef.cpp tabcol.cpp table.cpp
colblk.cpp reldef.cpp tabcol.cpp table.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp
tabdos.cpp tabfix.cpp tabfmt.cpp tabmul.cpp tabsys.cpp tabvct.cpp
tabdos.cpp tabfix.cpp tabfmt.cpp tabmul.cpp tabsys.cpp tabvct.cpp
valblk.cpp value.cpp xindex.cpp xobject.cpp
valblk.cpp value.cpp xindex.cpp xobject.cpp
filamzip.cpp tabtbl.cpp myconn.cpp myutil.cpp tabmysql.cpp
filamzip.cpp tabtbl.cpp myconn.cpp myutil.cpp tabmysql.cpp
)
tabxml.cpp plgxml.cpp
)
#
# Definitions that are shared for all OSes
#
add_definitions
(
-DMYSQL_DYNAMIC_PLUGIN -DMARIADB -DFORCE_INIT_OF_VARS
)
add_definitions
(
-DHUGE_SUPPORT -DZIP_SUPPORT
)
#
# OS specific C flags, definitions and source files.
#
IF
(
UNIX
)
if
(
WITH_WARNINGS
)
add_definitions
(
-Wall -Wfatal-errors -Wextra
)
message
(
STATUS
"CONNECT: GCC: All warnings enabled"
)
else
()
add_definitions
(
--no-warnings
)
message
(
STATUS
"CONNECT: GCC: All warnings disabled"
)
endif
()
add_definitions
(
-DUNIX -DLINUX -DUBUNTU
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fpermissive -fexceptions -fPIC "
)
get_property
(
inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
inihandl.c
)
ELSE
(
!UNIX
)
# Windows (manually add exception handling to the CONNECT project)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabwmi.cpp tabmac.cpp macutil.cpp
)
ENDIF
(
UNIX
)
#
#
# XML
# XML
#
#
FIND_PACKAGE
(
LibXml2
)
IF
(
UNIX
)
IF
(
LIBXML2_FOUND
)
FIND_PACKAGE
(
LibXml2
)
INCLUDE_DIRECTORIES
(
${
LIBXML2_INCLUDE_DIR
}
)
IF
(
LIBXML2_FOUND
)
SET
(
XML_LIBRARY
${
LIBXML2_LIBRARIES
}
)
INCLUDE_DIRECTORIES
(
${
LIBXML2_INCLUDE_DIR
}
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
libdoc.cpp
)
SET
(
XML_LIBRARY
${
LIBXML2_LIBRARIES
}
)
add_definitions
(
-DXML_SUPPORT
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabxml.cpp plgxml.cpp libdoc.cpp
)
ENDIF
()
add_definitions
(
-DXML_SUPPORT
)
ENDIF
(
LIBXML2_FOUND
)
ELSE
(
!UNIX
)
# Windows
# This to be localized
INCLUDE_DIRECTORIES
(
"D:/Libxml/include"
)
SET
(
XML_LIBRARY
"D:/libxml/lib/libxml2.lib"
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabxml.cpp plgxml.cpp libdoc.cpp
)
add_definitions
(
-DXML_SUPPORT
)
# Domdoc support
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
domdoc.cpp
)
add_definitions
(
-DDOMDOC_SUPPORT
)
ENDIF
(
UNIX
)
#
#
# MySQL
# MySQL
...
@@ -63,56 +91,82 @@ SET(MYSQL_LIBRARY mysqlclient)
...
@@ -63,56 +91,82 @@ SET(MYSQL_LIBRARY mysqlclient)
# For dynamic linking
# For dynamic linking
#SET(MYSQL_LIBRARY libmysql)
#SET(MYSQL_LIBRARY libmysql)
add_definitions
(
-DMYSQL_SUPPORT
)
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
)
#
#
# ODBC
# ODBC
#
#
# Note, we currently detect unixODBC only on Linux.
# TODO: detect iODBC as well. Simply adding "iodbc" into NAMES in
if
(
UNIX
)
# find_library does not work on machines with both unixODBC and iODBC
# Note, we currently detect unixODBC only on Linux.
# installed, because it finds headers from unixODBC while libraries
# TODO: detect iODBC as well. Simply adding "iodbc" into NAMES in
# from iODBC. We could search for 'isql.h' instead of 'sql.h' so
# find_library does not work on machines with both unixODBC and iODBC
# the library 'libodbc' gets compiled with 'isql.h' and
# installed, because it finds headers from unixODBC while libraries
# the library 'libiodbc' gets compiled with 'sql'h.
# from iODBC. We could search for 'isql.h' instead of 'sql.h' so
# This will also need changes in the sources (e.g. #include <isql.h>).
# 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
find_path
(
ODBC_INCLUDE_DIR sql.h
/usr/include/odbc
/usr/include
/usr/local/include
/usr/include/odbc
/usr/local/include/odbc
/usr/local/include
/usr/local/odbc/include
/usr/local/include/odbc
"C:/Program Files/ODBC/include"
/usr/local/odbc/include
"C:/Program Files/Microsoft SDKs/Windows/v7.0A/include"
#"C:/Program Files/ODBC/include"
"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
#"C:/Program Files/Microsoft SDKs/Windows/v7.0A/include"
"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/include"
#"C:/Program Files/Microsoft SDKs/Windows/v6.0a/include"
DOC
"Specify the directory containing sql.h."
#"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
find_library
(
ODBC_LIBRARY
PATHS
NAMES odbc odbcinst odbc32
/usr/lib
PATHS
/usr/lib/odbc
/usr/lib
/usr/local/lib
/usr/lib/odbc
/usr/local/lib/odbc
/usr/local/lib
/usr/local/odbc/lib
/usr/local/lib/odbc
"C:/Program Files/ODBC/lib"
/usr/local/odbc/lib
"C:/ODBC/lib/debug"
#"C:/Program Files/ODBC/lib"
"C:/Program Files/Microsoft SDKs/Windows/v7.0A/Lib"
#"C:/ODBC/lib/debug"
"C:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib"
#"C:/Program Files/Microsoft SDKs/Windows/v7.0A/Lib"
"C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib"
#"C:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib"
DOC
"Specify the ODBC driver manager library here."
#"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
}
)
IF
(
ODBC_INCLUDE_DIR AND ODBC_LIBRARY
)
add_definitions
(
-DODBC_SUPPORT
)
INCLUDE_DIRECTORIES
(
${
ODBC_INCLUDE_DIR
}
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabodbc.cpp odbconn.cpp
)
add_definitions
(
-DODBC_SUPPORT
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabodbc.cpp odbconn.cpp
)
ELSE
()
SET
(
ODBC_LIBRARY
""
)
ENDIF
()
ELSE
(
!UNIX
)
add_definitions
(
-DODBC_SUPPORT
)
SET
(
ODBC_LIBRARY
"odbc32.lib odbccp32.lib"
)
SET
(
CONNECT_SOURCES
${
CONNECT_SOURCES
}
tabodbc.cpp odbconn.cpp
)
ENDIF
(
UNIX
)
#
# iconv
#
IF
(
UNIX
)
SET
(
ICONV_LIBRARY
""
)
ELSE
()
ELSE
()
SET
(
ODBC_LIBRARY
""
)
#Windows
ENDIF
()
# TODO: this is to be localized
SET
(
ICONV_LIBRARY
"D:/libxml/lib/iconv.lib"
)
ENDIF
(
UNIX
)
#
#
# Plugin definition
# Plugin definition
...
@@ -121,4 +175,5 @@ ENDIF()
...
@@ -121,4 +175,5 @@ ENDIF()
MYSQL_ADD_PLUGIN
(
connect
${
CONNECT_SOURCES
}
MYSQL_ADD_PLUGIN
(
connect
${
CONNECT_SOURCES
}
STORAGE_ENGINE MODULE_ONLY
STORAGE_ENGINE MODULE_ONLY
MODULE_OUTPUT_NAME
"ha_connect"
MODULE_OUTPUT_NAME
"ha_connect"
LINK_LIBRARIES
${
ZLIB_LIBRARY
}
${
XML_LIBRARY
}
${
MYSQL_LIBRARY
}
${
ODBC_LIBRARY
}
)
LINK_LIBRARIES
${
ZLIB_LIBRARY
}
${
XML_LIBRARY
}
${
ICONV_LIBRARY
}
${
MYSQL_LIBRARY
}
${
ODBC_LIBRARY
}
)
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