2009-09-07 22:50:10 +02:00
|
|
|
# Copyright (C) 2006-2009 MySQL AB & Monty Program Ab
|
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
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
2009-07-15 15:46:25 +02:00
|
|
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
|
2009-07-31 21:22:02 +02:00
|
|
|
IF(COMMAND cmake_policy)
|
|
|
|
cmake_policy(SET CMP0005 NEW)
|
|
|
|
ENDIF(COMMAND cmake_policy)
|
2011-01-29 18:51:12 +01:00
|
|
|
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/win/cmake)
|
2007-11-02 20:16:45 +01:00
|
|
|
|
2006-01-31 14:52:16 +01:00
|
|
|
PROJECT(MySql)
|
2011-01-29 18:51:12 +01:00
|
|
|
include(package_name)
|
|
|
|
include(mysql_version)
|
|
|
|
include(mysql_add_executable)
|
|
|
|
include(install_macros)
|
|
|
|
include(install_layout)
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
|
|
|
|
|
|
|
|
# Hardcode WITH_XXX_STORAGE_ENGINE to ON for storage engines that go into the
|
|
|
|
# distributable package, this is temporary solution to get rid of configure.js stuff,
|
|
|
|
# 5.5 will handle it more nicely.
|
|
|
|
|
|
|
|
SET(WITH_ARCHIVE_STORAGE_ENGINE 1 CACHE BOOL "Include archive storage engine")
|
|
|
|
SET(WITH_BLACKHOLE_STORAGE_ENGINE 1 CACHE BOOL "Include blockhole storage engine")
|
|
|
|
SET(WITH_FEDERATEDX_STORAGE_ENGINE 1 CACHE BOOL "Include federatedx storage engine")
|
|
|
|
SET(WITH_PARTITION_STORAGE_ENGINE 1 CACHE BOOL "Include partition storage engine")
|
|
|
|
SET(WITH_ARIA_STORAGE_ENGINE 1 CACHE BOOL "Include aria storage engine")
|
|
|
|
SET(WITH_PBXT_STORAGE_ENGINE 1 CACHE BOOL "Include pbxt storage engine")
|
|
|
|
SET(WITH_XTRADB_STORAGE_ENGINE 1 CACHE BOOL "Include xtradb storage engine")
|
|
|
|
IF(WIN32)
|
|
|
|
LINK_LIBRARIES(ws2_32)
|
|
|
|
# This reads user configuration, generated by configure.js.
|
|
|
|
INCLUDE(win/configure.data OPTIONAL)
|
|
|
|
ENDIF()
|
2011-02-03 21:02:20 +01:00
|
|
|
IF(BUILD_RELEASE)
|
|
|
|
MESSAGE("Building release package")
|
|
|
|
ENDIF()
|
2006-01-31 14:52:16 +01:00
|
|
|
|
2007-08-04 08:51:58 +02:00
|
|
|
|
2006-03-29 15:39:53 +02:00
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
|
2011-01-29 18:51:12 +01:00
|
|
|
${CMAKE_BINARY_DIR}/include/mysql_version.h @ONLY)
|
|
|
|
|
|
|
|
# Speed up multiprocessor build
|
|
|
|
IF (MSVC_VERSION GREATER 1400)
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
|
|
|
ENDIF()
|
2006-04-03 10:25:36 +02:00
|
|
|
|
2011-01-29 18:51:12 +01:00
|
|
|
|
|
|
|
SET(CMAKE_INSTALL_PREFIX "C:/MariaDB${MYSQL_BASE_VERSION}")
|
|
|
|
SET(INSTALL_ROOT "${CMAKE_INSTALL_PREFIX}")
|
2006-08-31 19:52:42 +02:00
|
|
|
# Set standard options
|
2007-08-04 00:26:46 +02:00
|
|
|
ADD_DEFINITIONS(-DHAVE_YASSL)
|
2009-07-31 21:22:02 +02:00
|
|
|
ADD_DEFINITIONS(-DCMAKE_CONFIGD)
|
2011-01-29 18:51:12 +01:00
|
|
|
ADD_DEFINITIONS(-DDEFAULT_MYSQL_HOME="${INSTALL_ROOT}")
|
|
|
|
ADD_DEFINITIONS(-DDEFAULT_BASEDIR="${INSTALL_ROOT}")
|
|
|
|
ADD_DEFINITIONS(-DMYSQL_DATADIR="data")
|
|
|
|
ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="${INSTALL_ROOT}")
|
2009-07-31 21:22:02 +02:00
|
|
|
ADD_DEFINITIONS(-DPACKAGE=mysql)
|
|
|
|
ADD_DEFINITIONS(-DSHAREDIR="share")
|
2010-04-02 11:20:09 +02:00
|
|
|
ADD_DEFINITIONS(-DPLUGINDIR="lib/plugin")
|
2006-08-31 19:52:42 +02:00
|
|
|
|
2007-04-23 16:15:51 +02:00
|
|
|
# Set debug options
|
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
|
2006-08-31 19:52:42 +02:00
|
|
|
|
2010-11-18 17:02:37 +01:00
|
|
|
SET(localstatedir "C:\\\\mysql\\\\data\\\\")
|
2006-03-29 15:39:53 +02:00
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-huge.cnf.sh
|
2011-01-29 18:51:12 +01:00
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-huge.ini @ONLY)
|
2006-03-29 15:39:53 +02:00
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-innodb-heavy-4G.cnf.sh
|
2011-01-29 18:51:12 +01:00
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-innodb-heavy-4G.ini @ONLY)
|
2006-03-29 15:39:53 +02:00
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-large.cnf.sh
|
2011-01-29 18:51:12 +01:00
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-large.ini @ONLY)
|
2006-03-29 15:39:53 +02:00
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-medium.cnf.sh
|
2011-01-29 18:51:12 +01:00
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-medium.ini @ONLY)
|
2006-03-29 15:39:53 +02:00
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/support-files/my-small.cnf.sh
|
2011-01-29 18:51:12 +01:00
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-small.ini @ONLY)
|
2006-03-28 13:49:29 +02:00
|
|
|
|
2009-08-11 17:44:13 +02:00
|
|
|
|
|
|
|
ADD_DEFINITIONS(-D__NT__)
|
|
|
|
|
2006-04-03 10:25:36 +02:00
|
|
|
IF(CYBOZU)
|
2007-06-15 20:32:16 +02:00
|
|
|
ADD_DEFINITIONS(-DCYBOZU)
|
2006-04-03 10:25:36 +02:00
|
|
|
ENDIF(CYBOZU)
|
|
|
|
|
2008-11-12 13:36:53 +01:00
|
|
|
IF(EXTRA_DEBUG)
|
|
|
|
ADD_DEFINITIONS(-D EXTRA_DEBUG)
|
|
|
|
ENDIF(EXTRA_DEBUG)
|
|
|
|
|
Bug#473914: mysql_client_test fail with in debug compilaton on windows x64
Reason: inconsistent compilation, federatedx is compiled without SAFEMALLOC
flag, while anything else is compiled with SAFEMALLOC.
As a consequence, my_hash_init used inside federatedx initialization does not
provide correct caller info parameters (file, line) , so they are initialized with
whatever is on stack. When info about allocated memory is output in
COM_DEBUG command, the server crashes trying to output string starting at
0xcccccccccccccccc.
The fix is to remove SAFEMALLOC preprocessor flags
from every CMakeLists.txt, except the top-level one.
Also, SAFEMALLOC is not defined by default now, instead
there is WITH_DEBUG_FULL CMake option which adds
-DSAFEMALLOC to C and C++ flags in debug compilation.
This option is off by default, because
1) Debug C runtime already has heap debugging builtin with
overwrite and leak detection
2)safemalloc considerably slows down the tests.
Note also that
- SAFEMALLOC is gone in MySQL5.5
- On Windows, heap related overflows can also be found using free pageheap utility
(that is also part of application verifier). This is even more efficient if there are no other layers
on top of Windows heap allocator, e.g it is most efficient with release version.
2010-12-06 12:52:06 +01:00
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFE_MUTEX")
|
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFE_MUTEX")
|
|
|
|
|
|
|
|
OPTION (WITH_DEBUG_FULL "Enable malloc debug library (only debug builds)" OFF)
|
|
|
|
IF(WITH_DEBUG_FULL)
|
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC")
|
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC")
|
|
|
|
ENDIF()
|
|
|
|
|
2009-09-29 17:38:40 +02:00
|
|
|
IF(ENABLED_DEBUG_SYNC)
|
|
|
|
ADD_DEFINITIONS(-D ENABLED_DEBUG_SYNC)
|
|
|
|
ENDIF(ENABLED_DEBUG_SYNC)
|
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
|
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DENABLED_DEBUG_SYNC")
|
|
|
|
|
2006-02-07 16:43:42 +01:00
|
|
|
# in some places we use DBUG_OFF
|
2007-06-15 20:32:16 +02:00
|
|
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDBUG_OFF")
|
2007-08-04 00:26:46 +02:00
|
|
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")
|
2007-06-15 20:32:16 +02:00
|
|
|
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDBUG_OFF")
|
2007-08-04 00:26:46 +02:00
|
|
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF")
|
2006-02-07 16:43:42 +01:00
|
|
|
|
2008-03-21 16:23:17 +01:00
|
|
|
#TODO: update the code and remove the disabled warnings
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805")
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805")
|
|
|
|
|
2008-04-07 07:32:59 +02:00
|
|
|
# Disable warnings in Visual Studio 8 and above
|
2008-04-08 00:40:37 +02:00
|
|
|
IF(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
|
2006-03-28 18:05:25 +02:00
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996")
|
|
|
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996")
|
2007-03-22 16:53:37 +01:00
|
|
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /wd4996")
|
2006-03-28 18:05:25 +02:00
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996")
|
|
|
|
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996")
|
2007-03-22 16:53:37 +01:00
|
|
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /wd4996")
|
2008-04-08 00:40:37 +02:00
|
|
|
ENDIF(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
|
2007-08-03 21:51:37 +02:00
|
|
|
|
2009-06-10 10:59:49 +02:00
|
|
|
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
|
|
|
|
# VS2003 has a bug that prevents linking mysqld with module definition file
|
|
|
|
# (/DEF option for linker). Linker would incorrectly complain about multiply
|
|
|
|
# defined symbols. Workaround is to disable dynamic plugins, so /DEF is not
|
|
|
|
# used.
|
|
|
|
MESSAGE("Warning: Building MySQL with Visual Studio 2003.NET is no more supported.")
|
|
|
|
MESSAGE("Please use a newer version of Visual Studio.")
|
|
|
|
SET(WITHOUT_DYNAMIC_PLUGINS TRUE)
|
|
|
|
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
|
|
|
|
|
2008-04-07 07:32:59 +02:00
|
|
|
# Settings for Visual Studio 7 and above.
|
2008-04-08 00:40:37 +02:00
|
|
|
IF(MSVC)
|
2007-08-03 21:51:37 +02:00
|
|
|
# replace /MDd with /MTd
|
|
|
|
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
|
|
|
|
STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
|
|
|
|
STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
|
|
|
STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG_INIT ${CMAKE_C_FLAGS_DEBUG_INIT})
|
|
|
|
|
|
|
|
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
|
|
|
|
STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
|
|
|
|
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
|
|
|
|
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
|
|
|
|
|
|
|
|
# generate map files, set stack size (see bug#20815)
|
|
|
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576")
|
|
|
|
|
|
|
|
# remove support for Exception handling
|
|
|
|
STRING(REPLACE "/GX" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
|
|
|
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
|
|
|
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_INIT ${CMAKE_CXX_FLAGS_INIT})
|
|
|
|
STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
|
2009-02-25 16:57:49 +01:00
|
|
|
|
|
|
|
# Mark 32 bit executables large address aware so they can
|
|
|
|
# use > 2GB address space
|
|
|
|
IF(CMAKE_SIZEOF_VOID_P MATCHES 4)
|
|
|
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
|
|
|
|
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 4)
|
|
|
|
|
2007-10-08 19:00:01 +02:00
|
|
|
# Disable automatic manifest generation.
|
|
|
|
STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS
|
|
|
|
${CMAKE_EXE_LINKER_FLAGS})
|
|
|
|
# Explicitly disable it since it is the default for newer versions of VS
|
|
|
|
STRING(REGEX MATCH "MANIFEST:NO" tmp_manifest ${CMAKE_EXE_LINKER_FLAGS})
|
|
|
|
IF(NOT tmp_manifest)
|
|
|
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
|
|
|
|
ENDIF(NOT tmp_manifest)
|
2008-04-08 00:40:37 +02:00
|
|
|
ENDIF(MSVC)
|
2006-01-31 14:52:16 +01:00
|
|
|
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
IF(WIN32)
|
|
|
|
ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
|
2009-09-15 00:45:48 +02:00
|
|
|
ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501")
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
ENDIF(WIN32)
|
2006-01-31 14:52:16 +01:00
|
|
|
|
2009-06-10 10:59:49 +02:00
|
|
|
# default to x86 platform. We'll check for X64 in a bit
|
|
|
|
SET (PLATFORM X86)
|
|
|
|
|
2008-02-27 22:17:05 +01:00
|
|
|
# This definition is necessary to work around a bug with Intellisense described
|
|
|
|
# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper
|
|
|
|
# debugger functionality.
|
|
|
|
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
|
|
|
MESSAGE(STATUS "Detected 64-bit platform.")
|
|
|
|
ADD_DEFINITIONS("-D_WIN64")
|
2009-06-10 10:59:49 +02:00
|
|
|
SET (PLATFORM X64)
|
2008-02-27 22:17:05 +01:00
|
|
|
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
|
|
|
|
2007-04-23 22:23:32 +02:00
|
|
|
IF(EMBED_MANIFESTS)
|
2007-07-25 19:33:39 +02:00
|
|
|
# Search for the tools (mt, makecat, signtool) necessary for embedding
|
|
|
|
# manifests and signing executables with the MySQL AB authenticode cert.
|
|
|
|
#
|
|
|
|
# CMake will first search it's defaults (CMAKE_FRAMEWORK_PATH,
|
|
|
|
# CMAKE_APPBUNDLE_PATH, CMAKE_PROGRAM_PATH and the system PATH) followed
|
|
|
|
# by the listed paths which are the current possible defaults and should be
|
|
|
|
# updated when necessary.
|
|
|
|
#
|
|
|
|
# The custom manifests are designed to be compatible with all mt versions.
|
|
|
|
# The MySQL AB Authenticode certificate is available only internally.
|
|
|
|
# Others should store a single signing certificate in a local cryptographic
|
|
|
|
# service provider and alter the signtool command as necessary.
|
2007-04-23 22:23:32 +02:00
|
|
|
FIND_PROGRAM(HAVE_MANIFEST_TOOL NAMES mt
|
|
|
|
PATHS
|
|
|
|
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/VC/bin"
|
|
|
|
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
|
|
|
|
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
|
2007-07-25 19:33:39 +02:00
|
|
|
FIND_PROGRAM(HAVE_CATALOG_TOOL NAMES makecat
|
|
|
|
PATHS
|
|
|
|
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin")
|
|
|
|
FIND_PROGRAM(HAVE_SIGN_TOOL NAMES signtool
|
|
|
|
PATHS
|
|
|
|
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/Common7/Tools/Bin"
|
|
|
|
"$ENV{PROGRAMFILES}/Microsoft Visual Studio 8/SDK/v2.0/Bin")
|
|
|
|
|
2007-04-23 22:23:32 +02:00
|
|
|
IF(HAVE_MANIFEST_TOOL)
|
2007-07-25 19:33:39 +02:00
|
|
|
MESSAGE(STATUS "Found Mainfest Tool.")
|
2007-04-23 22:23:32 +02:00
|
|
|
ELSE(HAVE_MANIFEST_TOOL)
|
|
|
|
MESSAGE(FATAL_ERROR "Manifest tool, mt.exe, can't be found.")
|
|
|
|
ENDIF(HAVE_MANIFEST_TOOL)
|
2007-07-25 19:33:39 +02:00
|
|
|
IF(HAVE_CATALOG_TOOL)
|
|
|
|
MESSAGE(STATUS "Found Catalog Tool.")
|
|
|
|
ELSE(HAVE_CATALOG_TOOL)
|
|
|
|
MESSAGE(FATAL_ERROR "Catalog tool, makecat.exe, can't be found.")
|
|
|
|
ENDIF(HAVE_CATALOG_TOOL)
|
|
|
|
IF(HAVE_SIGN_TOOL)
|
|
|
|
MESSAGE(STATUS "Found Sign Tool. Embedding custom manifests and signing executables.")
|
|
|
|
ELSE(HAVE_SIGN_TOOL)
|
|
|
|
MESSAGE(FATAL_ERROR "Sign tool, signtool.exe, can't be found.")
|
|
|
|
ENDIF(HAVE_SIGN_TOOL)
|
|
|
|
|
2007-04-23 22:23:32 +02:00
|
|
|
# Set the processor architecture.
|
|
|
|
IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
|
2007-06-26 20:24:01 +02:00
|
|
|
SET(PROCESSOR_ARCH "amd64")
|
2007-04-23 22:23:32 +02:00
|
|
|
ELSE(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
|
|
|
|
SET(PROCESSOR_ARCH "X86")
|
|
|
|
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
|
|
|
|
ENDIF(EMBED_MANIFESTS)
|
|
|
|
|
2009-06-10 10:59:49 +02:00
|
|
|
# Figure out what engines to build and how (statically or dynamically),
|
|
|
|
# add preprocessor defines for storage engines.
|
|
|
|
IF(WITHOUT_DYNAMIC_PLUGINS)
|
|
|
|
MESSAGE("Dynamic plugins are disabled.")
|
|
|
|
ENDIF(WITHOUT_DYNAMIC_PLUGINS)
|
|
|
|
|
|
|
|
FILE(GLOB STORAGE_SUBDIRS storage/*)
|
|
|
|
FOREACH(SUBDIR ${STORAGE_SUBDIRS})
|
|
|
|
FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/storage ${SUBDIR})
|
|
|
|
IF (EXISTS ${SUBDIR}/CMakeLists.txt)
|
|
|
|
# Check MYSQL_STORAGE_ENGINE macro is present
|
|
|
|
FILE(STRINGS ${SUBDIR}/CMakeLists.txt HAVE_STORAGE_ENGINE REGEX MYSQL_STORAGE_ENGINE)
|
|
|
|
IF(HAVE_STORAGE_ENGINE)
|
2009-10-08 15:19:24 +02:00
|
|
|
# Extract name of engine from HAVE_STORAGE_ENGINE
|
|
|
|
STRING(REGEX REPLACE ".*MYSQL_STORAGE_ENGINE\\((.*\)\\).*"
|
|
|
|
"\\1" ENGINE_NAME ${HAVE_STORAGE_ENGINE})
|
|
|
|
STRING(TOUPPER ${ENGINE_NAME} ENGINE)
|
|
|
|
STRING(TOLOWER ${ENGINE_NAME} ENGINE_LOWER)
|
|
|
|
|
2009-06-10 10:59:49 +02:00
|
|
|
SET(ENGINE_BUILD_TYPE "DYNAMIC")
|
|
|
|
# Read plug.in to find out if a plugin is mandatory and whether it supports
|
|
|
|
# build as shared library (dynamic).
|
|
|
|
IF(EXISTS ${SUBDIR}/plug.in)
|
|
|
|
FILE(READ ${SUBDIR}/plug.in PLUGIN_FILE_CONTENT)
|
|
|
|
STRING (REGEX MATCH "MYSQL_PLUGIN_DYNAMIC" MYSQL_PLUGIN_DYNAMIC ${PLUGIN_FILE_CONTENT})
|
|
|
|
STRING (REGEX MATCH "MYSQL_PLUGIN_MANDATORY" MYSQL_PLUGIN_MANDATORY ${PLUGIN_FILE_CONTENT})
|
|
|
|
STRING (REGEX MATCH "MYSQL_PLUGIN_STATIC" MYSQL_PLUGIN_STATIC ${PLUGIN_FILE_CONTENT})
|
2009-09-15 23:20:58 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# XTRADB is located in storage/xtradb, but it says everywhere it is 'innobase' (e.g.
|
|
|
|
# it declares 'builtin_innobase_plugin', not builtin_xtradb_plugin).
|
|
|
|
# Extract the intended plugin name from MYSQL_STORAGE_ENGINE definition and use it
|
|
|
|
# where appropriate.
|
|
|
|
STRING (REGEX MATCH "MYSQL_STORAGE_ENGINE.[a-z]*" PLUGIN_NAME ${PLUGIN_FILE_CONTENT})
|
|
|
|
STRING (REGEX REPLACE "MYSQL_STORAGE_ENGINE.(.*)" "\\1" PLUGIN_NAME ${PLUGIN_NAME})
|
2009-10-03 21:24:13 +02:00
|
|
|
|
|
|
|
# Also remember this "xtradb"/"innobase" name discrepancy for libmysqld/CMakeLists.txt:
|
|
|
|
SET (plugin_dir_${PLUGIN_NAME} ${DIRNAME})
|
2009-06-10 10:59:49 +02:00
|
|
|
|
|
|
|
IF(MYSQL_PLUGIN_MANDATORY)
|
|
|
|
SET(WITH_${ENGINE}_STORAGE_ENGINE TRUE)
|
|
|
|
ENDIF(MYSQL_PLUGIN_MANDATORY)
|
|
|
|
|
|
|
|
IF (WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
|
|
|
|
SET(ENGINE_BUILD_TYPE "STATIC")
|
|
|
|
ELSEIF(NOT WITHOUT_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_DYNAMIC AND NOT WITHOUT_DYNAMIC_PLUGINS)
|
|
|
|
SET(ENGINE_BUILD_TYPE "DYNAMIC")
|
|
|
|
ELSE(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
|
|
|
|
SET(ENGINE_BUILD_TYPE "NONE")
|
|
|
|
ENDIF(WITH_${ENGINE}_STORAGE_ENGINE AND MYSQL_PLUGIN_STATIC)
|
2009-10-03 21:24:13 +02:00
|
|
|
|
2009-06-10 10:59:49 +02:00
|
|
|
IF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
|
2010-04-01 16:34:51 +02:00
|
|
|
SET (maria_plugin_defs "${maria_plugin_defs},builtin_maria_${PLUGIN_NAME}_plugin")
|
2009-09-15 23:20:58 +02:00
|
|
|
SET (MYSQLD_STATIC_ENGINE_LIBS ${MYSQLD_STATIC_ENGINE_LIBS} ${PLUGIN_NAME})
|
2009-06-10 10:59:49 +02:00
|
|
|
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_${ENGINE}_STORAGE_ENGINE")
|
|
|
|
SET (WITH_${ENGINE}_STORAGE_ENGINE TRUE)
|
2009-10-08 15:19:24 +02:00
|
|
|
SET (${ENGINE}_DIR ${DIRNAME})
|
2009-06-10 10:59:49 +02:00
|
|
|
ENDIF (ENGINE_BUILD_TYPE STREQUAL "STATIC")
|
|
|
|
ENDIF(EXISTS ${SUBDIR}/plug.in)
|
|
|
|
|
|
|
|
IF(NOT ENGINE_BUILD_TYPE STREQUAL "NONE")
|
|
|
|
LIST(APPEND ${ENGINE_BUILD_TYPE}_ENGINE_DIRECTORIES ${SUBDIR})
|
|
|
|
ENDIF(NOT ENGINE_BUILD_TYPE STREQUAL "NONE")
|
|
|
|
|
|
|
|
ENDIF(HAVE_STORAGE_ENGINE)
|
|
|
|
ENDIF(EXISTS ${SUBDIR}/CMakeLists.txt)
|
|
|
|
ENDFOREACH(SUBDIR ${STORAGE_SUBDIRS})
|
|
|
|
|
|
|
|
# Special handling for partition(not really pluggable)
|
|
|
|
IF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
|
|
|
|
SET (STORAGE_ENGINE_DEFS "${STORAGE_ENGINE_DEFS} -DWITH_PARTITION_STORAGE_ENGINE")
|
2010-04-01 16:34:51 +02:00
|
|
|
SET (maria_plugin_defs "${maria_plugin_defs},builtin_maria_partition_plugin")
|
2009-06-10 10:59:49 +02:00
|
|
|
ENDIF(NOT WITHOUT_PARTITION_STORAGE_ENGINE)
|
|
|
|
|
2010-09-12 18:40:01 +02:00
|
|
|
# Special handling for tmp tables with the Aria engine
|
|
|
|
IF(WITH_ARIA_STORAGE_ENGINE)
|
|
|
|
ADD_DEFINITIONS(-DWITH_ARIA_STORAGE_ENGINE)
|
2009-09-07 22:50:10 +02:00
|
|
|
IF(WITH_MARIA_TMP_TABLES)
|
|
|
|
ADD_DEFINITIONS(-DUSE_MARIA_FOR_TMP_TABLES)
|
|
|
|
ENDIF(WITH_MARIA_TMP_TABLES)
|
2010-09-12 18:40:01 +02:00
|
|
|
ENDIF(WITH_ARIA_STORAGE_ENGINE)
|
2009-09-07 22:50:10 +02:00
|
|
|
|
2009-06-10 10:59:49 +02:00
|
|
|
ADD_DEFINITIONS(${STORAGE_ENGINE_DEFS})
|
|
|
|
|
|
|
|
# Now write out our mysql_plugin_defs struct
|
|
|
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
|
2011-01-29 18:51:12 +01:00
|
|
|
${CMAKE_BINARY_DIR}/sql/sql_builtin.cc @ONLY)
|
2009-06-10 10:59:49 +02:00
|
|
|
|
|
|
|
# Add subdirectories for storage engines
|
|
|
|
SET (ENGINE_BUILD_TYPE "STATIC")
|
|
|
|
FOREACH(DIR ${STATIC_ENGINE_DIRECTORIES})
|
|
|
|
ADD_SUBDIRECTORY(${DIR})
|
|
|
|
ENDFOREACH(DIR ${STATIC_ENGINE_DIRECTORIES})
|
|
|
|
|
|
|
|
SET (ENGINE_BUILD_TYPE "DYNAMIC")
|
|
|
|
FOREACH(DIR ${DYNAMIC_ENGINE_DIRECTORIES})
|
|
|
|
ADD_SUBDIRECTORY(${DIR})
|
|
|
|
ENDFOREACH(DIR ${DYNAMIC_ENGINE_DIRECTORIES})
|
|
|
|
|
|
|
|
|
2007-08-03 21:51:37 +02:00
|
|
|
# FIXME "debug" only needed if build type is "Debug", but
|
|
|
|
# CMAKE_BUILD_TYPE is not set during configure time.
|
2006-03-28 13:49:29 +02:00
|
|
|
ADD_SUBDIRECTORY(vio)
|
|
|
|
ADD_SUBDIRECTORY(dbug)
|
|
|
|
ADD_SUBDIRECTORY(strings)
|
|
|
|
ADD_SUBDIRECTORY(regex)
|
|
|
|
ADD_SUBDIRECTORY(mysys)
|
2007-04-18 18:35:13 +02:00
|
|
|
ADD_SUBDIRECTORY(scripts)
|
2007-03-22 08:43:14 +01:00
|
|
|
ADD_SUBDIRECTORY(zlib)
|
2006-03-28 13:49:29 +02:00
|
|
|
ADD_SUBDIRECTORY(extra/yassl)
|
|
|
|
ADD_SUBDIRECTORY(extra/yassl/taocrypt)
|
2009-03-12 23:27:35 +01:00
|
|
|
ADD_SUBDIRECTORY(extra/libevent)
|
2006-03-28 13:49:29 +02:00
|
|
|
ADD_SUBDIRECTORY(extra)
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
ADD_SUBDIRECTORY(sql)
|
2011-01-29 18:51:12 +01:00
|
|
|
ADD_SUBDIRECTORY(client)
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
ADD_SUBDIRECTORY(server-tools/instance-manager)
|
2007-08-04 08:51:58 +02:00
|
|
|
ADD_SUBDIRECTORY(libmysql)
|
2010-03-03 15:44:14 +01:00
|
|
|
ADD_SUBDIRECTORY(libservices)
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
ADD_SUBDIRECTORY(tests)
|
2011-01-29 18:51:12 +01:00
|
|
|
ADD_SUBDIRECTORY(mysql-test)
|
|
|
|
ADD_SUBDIRECTORY(include)
|
2008-01-10 13:21:53 +01:00
|
|
|
ADD_SUBDIRECTORY(unittest/mytap)
|
|
|
|
ADD_SUBDIRECTORY(unittest/mysys)
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
IF(WITH_EMBEDDED_SERVER)
|
2007-06-15 20:32:16 +02:00
|
|
|
ADD_SUBDIRECTORY(libmysqld)
|
|
|
|
ADD_SUBDIRECTORY(libmysqld/examples)
|
CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js:
Additional changes for bug#29903
- Changed to do embedded build part as normal build, when
WITH_EMBEDDED_SERVER is set.
- Allow both normal and debug build with embedded.
- Build static embedded library by pointing out all source and compile
it all, i.e. not building libraries from libraries, not portable.
- Let embedded use generated files from the "sql" directory, added
dependencies to make sure built before embedded.
- Mark library "dbug" in TARGET_LINK_LIBRARIES() with "debug", so only
linked in when debug target is used.
- Removed change of target name with "mysqld${MYSQLD_EXE_SUFFIX}", as
others can't depend on it, not defined at configure time. Instead
set the output file name.
- Created work around for bug in CMake 2.4.6 and output names, to
set the "mysqld<suffix>.pdb" name to the same base name.
- Set the correct manifest "name" (patch by iggy)
CMakeLists.txt:
Changes for embedded and Windows
libmysql/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/CMakeLists.txt:
Changes for embedded and Windows
libmysqld/examples/CMakeLists.txt:
Changes for embedded and Windows
mysys/CMakeLists.txt:
Changes for embedded and Windows
regex/CMakeLists.txt:
Changes for embedded and Windows
server-tools/instance-manager/CMakeLists.txt:
Changes for embedded and Windows
sql/CMakeLists.txt:
Changes for embedded and Windows
storage/archive/CMakeLists.txt:
Changes for embedded and Windows
storage/blackhole/CMakeLists.txt:
Changes for embedded and Windows
storage/csv/CMakeLists.txt:
Changes for embedded and Windows
storage/example/CMakeLists.txt:
Changes for embedded and Windows
storage/federated/CMakeLists.txt:
Changes for embedded and Windows
storage/heap/CMakeLists.txt:
Changes for embedded and Windows
storage/innobase/CMakeLists.txt:
Changes for embedded and Windows
storage/myisam/CMakeLists.txt:
Changes for embedded and Windows
storage/myisammrg/CMakeLists.txt:
Changes for embedded and Windows
strings/CMakeLists.txt:
Changes for embedded and Windows
vio/CMakeLists.txt:
Changes for embedded and Windows
win/README:
Changes for embedded and Windows
win/configure.js:
Changes for embedded and Windows
win/mysql_manifest.cmake:
Changes for embedded and Windows
2007-08-06 23:16:01 +02:00
|
|
|
ENDIF(WITH_EMBEDDED_SERVER)
|
2007-12-19 12:58:06 +01:00
|
|
|
ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
|
2011-01-29 18:51:12 +01:00
|
|
|
IF(WIN32)
|
|
|
|
ADD_SUBDIRECTORY(win/upgrade_wizard)
|
|
|
|
ADD_SUBDIRECTORY(win/packaging)
|
|
|
|
ENDIF()
|
2010-06-25 15:09:45 +02:00
|
|
|
|
2011-01-29 18:51:12 +01:00
|
|
|
IF(WIN32)
|
|
|
|
SET(CPACK_GENERATOR "ZIP")
|
|
|
|
ENDIF()
|
|
|
|
INSTALL(FILES
|
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-huge.ini
|
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-large.ini
|
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-medium.ini
|
|
|
|
${CMAKE_BINARY_DIR}/support-files/my-small.ini
|
|
|
|
DESTINATION .
|
|
|
|
COMPONENT IniFiles
|
|
|
|
)
|
|
|
|
INSTALL(FILES
|
|
|
|
COPYING
|
|
|
|
EXCEPTIONS-CLIENT
|
|
|
|
DESTINATION .
|
|
|
|
COMPONENT Readme
|
|
|
|
)
|
|
|
|
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" STREQUAL "2.8.3")
|
|
|
|
# CMake bug#11452, only in 2.8.3
|
|
|
|
SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "")
|
|
|
|
ENDIF()
|
2010-06-25 15:09:45 +02:00
|
|
|
# This must always be the last line
|
|
|
|
INCLUDE(CPack)
|