2007-10-04 19:33:42 +02:00
|
|
|
# Copyright (C) 2007 MySQL AB
|
|
|
|
#
|
|
|
|
# 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
|
2019-05-11 20:29:06 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2019-04-15 17:16:02 +02:00
|
|
|
INCLUDE_DIRECTORIES(${SSL_INCLUDE_DIRS})
|
2014-12-22 15:53:17 +01:00
|
|
|
|
|
|
|
IF(SSL_DEFINES)
|
2019-04-15 17:16:02 +02:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(ma_crypt.c PROPERTIES COMPILE_FLAGS ${SSL_DEFINES})
|
2014-12-22 15:53:17 +01:00
|
|
|
ENDIF()
|
|
|
|
|
2010-09-12 18:40:01 +02:00
|
|
|
SET(ARIA_SOURCES ma_init.c ma_open.c ma_extra.c ma_info.c ma_rkey.c
|
2008-01-10 13:21:53 +01:00
|
|
|
ma_rnext.c ma_rnext_same.c
|
|
|
|
ma_search.c ma_page.c ma_key_recover.c ma_key.c
|
2008-06-09 11:06:06 +02:00
|
|
|
ma_locking.c ma_state.c
|
2008-01-10 13:21:53 +01:00
|
|
|
ma_rrnd.c ma_scan.c ma_cache.c
|
|
|
|
ma_statrec.c ma_packrec.c ma_dynrec.c
|
|
|
|
ma_blockrec.c ma_bitmap.c
|
2019-04-15 17:16:02 +02:00
|
|
|
ma_update.c ma_write.c ma_unique.c
|
2008-01-10 13:21:53 +01:00
|
|
|
ma_delete.c
|
|
|
|
ma_rprev.c ma_rfirst.c ma_rlast.c ma_rsame.c
|
|
|
|
ma_rsamepos.c ma_panic.c ma_close.c ma_create.c
|
|
|
|
ma_range.c ma_dbug.c ma_checksum.c
|
|
|
|
ma_changed.c ma_static.c ma_delete_all.c
|
|
|
|
ma_delete_table.c ma_rename.c ma_check.c
|
2019-04-15 17:16:02 +02:00
|
|
|
ma_keycache.c ma_preload.c ma_ft_parser.c
|
2008-01-10 13:21:53 +01:00
|
|
|
ma_ft_update.c ma_ft_boolean_search.c
|
|
|
|
ma_ft_nlq_search.c ft_maria.c ma_sort.c
|
2011-07-13 21:10:18 +02:00
|
|
|
ha_maria.cc trnman.c lockman.c
|
2008-01-10 13:21:53 +01:00
|
|
|
ma_rt_index.c ma_rt_key.c ma_rt_mbr.c ma_rt_split.c
|
|
|
|
ma_sp_key.c ma_control_file.c ma_loghandler.c
|
2011-06-11 10:41:46 +02:00
|
|
|
ma_pagecache.c ma_pagecaches.c
|
2008-01-10 13:21:53 +01:00
|
|
|
ma_checkpoint.c ma_recovery.c ma_commit.c ma_pagecrc.c
|
2009-01-12 20:27:02 +01:00
|
|
|
ha_maria.h maria_def.h ma_recovery_util.c ma_servicethread.c
|
2011-02-12 15:43:24 +01:00
|
|
|
ma_norec.c
|
2018-11-18 20:34:58 +01:00
|
|
|
ma_crypt.c ma_backup.c
|
2008-01-10 13:21:53 +01:00
|
|
|
)
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2012-04-12 01:33:43 +02:00
|
|
|
IF(APPLE)
|
|
|
|
# Workaround linker bug on OSX 10.7
|
|
|
|
ADD_DEFINITIONS(-fno-common)
|
|
|
|
ENDIF()
|
|
|
|
|
2019-04-15 17:16:02 +02:00
|
|
|
MYSQL_ADD_PLUGIN(aria ${ARIA_SOURCES} STORAGE_ENGINE MANDATORY
|
|
|
|
LINK_LIBRARIES myisam mysys mysys_ssl
|
|
|
|
RECOMPILE_FOR_EMBEDDED)
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2012-05-22 11:04:32 +02:00
|
|
|
MYSQL_ADD_EXECUTABLE(aria_ftdump maria_ftdump.c COMPONENT Server)
|
2010-11-25 18:17:28 +01:00
|
|
|
TARGET_LINK_LIBRARIES(aria_ftdump aria)
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2012-05-22 11:04:32 +02:00
|
|
|
MYSQL_ADD_EXECUTABLE(aria_chk maria_chk.c COMPONENT Server)
|
2010-11-25 18:17:28 +01:00
|
|
|
TARGET_LINK_LIBRARIES(aria_chk aria)
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2012-05-22 11:04:32 +02:00
|
|
|
MYSQL_ADD_EXECUTABLE(aria_read_log maria_read_log.c COMPONENT Server)
|
2010-11-25 18:17:28 +01:00
|
|
|
TARGET_LINK_LIBRARIES(aria_read_log aria)
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2012-05-22 11:04:32 +02:00
|
|
|
MYSQL_ADD_EXECUTABLE(aria_dump_log maria_dump_log.c unittest/ma_loghandler_examples.c COMPONENT Server)
|
2010-11-25 18:17:28 +01:00
|
|
|
TARGET_LINK_LIBRARIES(aria_dump_log aria)
|
2010-09-12 18:40:01 +02:00
|
|
|
SET_TARGET_PROPERTIES(aria_dump_log PROPERTIES COMPILE_FLAGS "-DMARIA_DUMP_LOG")
|
2008-02-25 17:31:55 +01:00
|
|
|
|
2012-05-22 11:04:32 +02:00
|
|
|
MYSQL_ADD_EXECUTABLE(aria_pack maria_pack.c COMPONENT Server)
|
2010-11-25 18:17:28 +01:00
|
|
|
TARGET_LINK_LIBRARIES(aria_pack aria)
|
2008-01-10 13:21:53 +01:00
|
|
|
|
2012-09-25 12:45:11 +02:00
|
|
|
IF(WITH_UNIT_TESTS)
|
2010-11-25 18:17:28 +01:00
|
|
|
ADD_EXECUTABLE(ma_test1 ma_test1.c)
|
|
|
|
TARGET_LINK_LIBRARIES(ma_test1 aria)
|
2008-01-10 13:21:53 +01:00
|
|
|
|
2010-11-25 18:17:28 +01:00
|
|
|
ADD_EXECUTABLE(ma_test2 ma_test2.c)
|
|
|
|
TARGET_LINK_LIBRARIES(ma_test2 aria)
|
2008-01-10 13:21:53 +01:00
|
|
|
|
2010-11-25 18:17:28 +01:00
|
|
|
ADD_EXECUTABLE(ma_test3 ma_test3.c)
|
|
|
|
TARGET_LINK_LIBRARIES(ma_test3 aria)
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2010-11-25 18:17:28 +01:00
|
|
|
ADD_EXECUTABLE(ma_rt_test ma_rt_test.c)
|
|
|
|
TARGET_LINK_LIBRARIES(ma_rt_test aria)
|
2007-10-04 19:33:42 +02:00
|
|
|
|
2010-11-25 18:17:28 +01:00
|
|
|
ADD_EXECUTABLE(ma_sp_test ma_sp_test.c)
|
|
|
|
TARGET_LINK_LIBRARIES(ma_sp_test aria)
|
2018-11-18 20:34:58 +01:00
|
|
|
|
|
|
|
ADD_EXECUTABLE(test_ma_backup test_ma_backup.c)
|
|
|
|
TARGET_LINK_LIBRARIES(test_ma_backup aria)
|
|
|
|
|
2012-10-30 23:05:55 +01:00
|
|
|
ADD_SUBDIRECTORY(unittest)
|
2018-11-18 20:34:58 +01:00
|
|
|
|
2010-11-25 18:17:28 +01:00
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF (MSVC)
|
|
|
|
SET_TARGET_PROPERTIES(aria_chk aria_pack PROPERTIES LINK_FLAGS "setargv.obj")
|
|
|
|
ENDIF()
|
2010-06-25 15:09:45 +02:00
|
|
|
|
2019-05-05 19:50:12 +02:00
|
|
|
OPTION(USE_ARIA_FOR_TMP_TABLES "Use Aria for temporary tables" ON)
|
2011-04-25 17:22:25 +02:00
|
|
|
|
2019-04-15 17:16:02 +02:00
|
|
|
#
|
|
|
|
# S3
|
|
|
|
#
|
|
|
|
INCLUDE (CheckIncludeFiles)
|
|
|
|
|
|
|
|
SET(S3_SOURCES ha_s3.cc s3_func.c
|
|
|
|
libmarias3/src/debug.c libmarias3/src/error.c libmarias3/src/marias3.c
|
2019-05-31 14:33:04 +02:00
|
|
|
libmarias3/src/request.c libmarias3/src/response.c libmarias3/src/sha256.c
|
|
|
|
libmarias3/src/sha256-internal.c)
|
2019-04-15 17:16:02 +02:00
|
|
|
|
|
|
|
IF(NOT PLUGIN_S3 STREQUAL NO)
|
|
|
|
FIND_PACKAGE(LibXml2)
|
|
|
|
FIND_PACKAGE(CURL)
|
|
|
|
ENDIF()
|
|
|
|
|
2019-05-31 14:33:04 +02:00
|
|
|
IF (LIBXML2_FOUND AND CURL_FOUND)
|
2019-04-15 17:16:02 +02:00
|
|
|
MYSQL_ADD_PLUGIN(s3 ${S3_SOURCES} STORAGE_ENGINE STATIC_ONLY
|
2019-05-31 14:33:04 +02:00
|
|
|
LINK_LIBRARIES aria myisam mysys mysys_ssl xml2 curl
|
2019-04-15 17:16:02 +02:00
|
|
|
RECOMPILE_FOR_EMBEDDED)
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF(TARGET s3)
|
|
|
|
MYSQL_ADD_EXECUTABLE(aria_s3_copy aria_s3_copy.cc COMPONENT Server)
|
|
|
|
TARGET_LINK_LIBRARIES(aria_s3_copy s3)
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libmarias3 ${LIBXML2_INCLUDE_DIR})
|
|
|
|
ADD_DEFINITIONS(-DWITH_S3_STORAGE_ENGINE)
|
|
|
|
|
|
|
|
TARGET_LINK_LIBRARIES(aria s3)
|
|
|
|
ENDIF()
|