2015-06-30 06:57:12 +02:00
|
|
|
# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
|
2006-12-31 02:29:11 +01:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2010-08-12 17:19:57 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2006-12-31 02:29:11 +01:00
|
|
|
|
2009-11-09 12:32:48 +01:00
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
${ZLIB_INCLUDE_DIR}
|
|
|
|
${SSL_INCLUDE_DIRS}
|
|
|
|
${CMAKE_SOURCE_DIR}/libmysql
|
|
|
|
${CMAKE_SOURCE_DIR}/regex
|
|
|
|
${CMAKE_SOURCE_DIR}/sql
|
|
|
|
${CMAKE_SOURCE_DIR}/strings
|
|
|
|
${READLINE_INCLUDE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
)
|
2006-02-07 16:43:42 +01:00
|
|
|
|
2009-11-09 12:32:48 +01:00
|
|
|
ADD_DEFINITIONS(${READLINE_DEFINES})
|
|
|
|
ADD_DEFINITIONS(${SSL_DEFINES})
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc)
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysql mysqlclient)
|
2009-11-09 12:32:48 +01:00
|
|
|
IF(UNIX)
|
|
|
|
TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY})
|
|
|
|
ENDIF(UNIX)
|
2006-01-31 14:52:16 +01:00
|
|
|
|
2010-02-10 20:23:24 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
|
2008-08-04 21:54:44 +02:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
|
2014-10-13 09:52:28 +02:00
|
|
|
# mysqltest has unused result errors, so we skip Werror
|
|
|
|
CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG)
|
|
|
|
IF(HAVE_WERROR_FLAG)
|
|
|
|
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
|
|
|
ADD_COMPILE_FLAGS(mysqltest.cc COMPILE_FLAGS "-Wno-error")
|
|
|
|
ENDIF()
|
2009-11-09 12:32:48 +01:00
|
|
|
TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex)
|
|
|
|
|
2006-02-10 13:29:01 +01:00
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysqlcheck mysqlclient)
|
2006-02-10 13:29:01 +01:00
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqldump mysqldump.c ../sql-common/my_user.c)
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysqldump mysqlclient)
|
2006-02-10 13:29:01 +01:00
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqlimport mysqlimport.c)
|
2015-06-30 06:57:12 +02:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient)
|
2006-02-10 13:29:01 +01:00
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c)
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient)
|
2007-04-19 18:34:00 +02:00
|
|
|
ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs)
|
2006-10-13 21:48:27 +02:00
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c)
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient)
|
2006-02-10 13:29:01 +01:00
|
|
|
|
2011-07-19 16:17:58 +02:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c)
|
|
|
|
TARGET_LINK_LIBRARIES(mysql_plugin mysqlclient)
|
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc)
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient)
|
2006-02-10 13:29:01 +01:00
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqladmin mysqladmin.cc)
|
2009-09-30 03:39:37 +02:00
|
|
|
TARGET_LINK_LIBRARIES(mysqladmin mysqlclient)
|
2007-02-16 15:33:54 +01:00
|
|
|
|
2009-12-17 14:41:50 +01:00
|
|
|
MYSQL_ADD_EXECUTABLE(mysqlslap mysqlslap.c)
|
2007-08-03 14:43:11 +02:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(mysqlslap.c PROPERTIES COMPILE_FLAGS "-DTHREADS")
|
2009-11-09 12:32:48 +01:00
|
|
|
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient)
|
2007-08-03 14:43:11 +02:00
|
|
|
|
2010-09-06 13:26:23 +02:00
|
|
|
# "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".
|
|
|
|
IF(WIN32)
|
|
|
|
MYSQL_ADD_EXECUTABLE(echo echo.c)
|
|
|
|
ENDIF(WIN32)
|
2007-02-16 15:33:54 +01:00
|
|
|
|
2011-07-19 16:17:58 +02:00
|
|
|
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin
|
2009-11-09 12:32:48 +01:00
|
|
|
PROPERTIES HAS_CXX TRUE)
|
|
|
|
|
2010-08-09 10:32:50 +02:00
|
|
|
ADD_DEFINITIONS(-DHAVE_DLOPEN)
|
|
|
|
|