summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt10
-rw-r--r--client/Makefile.am2
-rw-r--r--include/config-netware.h2
-rw-r--r--include/config-win.h4
-rw-r--r--libmysql/Makefile.shared2
-rw-r--r--libmysqld/Makefile.am2
-rw-r--r--mysys/Makefile.am2
-rw-r--r--ndb/src/mgmsrv/Makefile.am2
-rw-r--r--sql/Makefile.am2
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/unireg.h4
11 files changed, 23 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f53a9fb146..5705a2dfe57 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,9 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
+IF(COMMAND cmake_policy)
+ cmake_policy(SET CMP0005 NEW)
+ENDIF(COMMAND cmake_policy)
PROJECT(MySql)
@@ -26,6 +29,13 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
# Set standard options
ADD_DEFINITIONS(-DCMAKE_BUILD)
ADD_DEFINITIONS(-DHAVE_YASSL)
+ADD_DEFINITIONS(-DCMAKE_CONFIGD)
+ADD_DEFINITIONS(-DDEFAULT_MYSQL_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
+ADD_DEFINITIONS(-DDEFAULT_BASEDIR="c:/Program Files/MySQL/")
+ADD_DEFINITIONS(-DMYSQL_DATADIR="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/data")
+ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}/")
+ADD_DEFINITIONS(-DPACKAGE=mysql)
+ADD_DEFINITIONS(-DSHAREDIR="share")
# Set debug options
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
diff --git a/client/Makefile.am b/client/Makefile.am
index 672bb2e0c47..e77d294b0ac 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -57,7 +57,7 @@ strings_src=decimal.c
# Fix for mit-threads
DEFS = -DUNDEF_THREADS_HACK \
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
- -DDATADIR="\"$(localstatedir)\""
+ -DMYSQL_DATADIR="\"$(localstatedir)\""
EXTRA_DIST = get_password.c CMakeLists.txt echo.c
diff --git a/include/config-netware.h b/include/config-netware.h
index 85a5ef86829..b0cf7986451 100644
--- a/include/config-netware.h
+++ b/include/config-netware.h
@@ -110,7 +110,7 @@ extern "C" {
#define DEFAULT_BASEDIR "sys:/"
#define SHAREDIR "share/"
#define DEFAULT_CHARSET_HOME "sys:/mysql/"
-#define DATADIR "data/"
+#define MYSQL_DATADIR "data/"
/* 64-bit file system calls */
#define SIZEOF_OFF_T 8
diff --git a/include/config-win.h b/include/config-win.h
index 05bdfd2c226..84705809d7a 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -303,13 +303,15 @@ inline ulonglong double2ulonglong(double d)
#ifdef _CUSTOMCONFIG_
#include <custom_conf.h>
#else
+#ifndef CMAKE_CONFIGD
#define DEFAULT_MYSQL_HOME "c:\\mysql"
-#define DATADIR "c:\\mysql\\data"
+#define MYSQL_DATADIR "c:\\mysql\\data"
#define PACKAGE "mysql"
#define DEFAULT_BASEDIR "C:\\"
#define SHAREDIR "share"
#define DEFAULT_CHARSET_HOME "C:/mysql/"
#endif
+#endif
#ifndef DEFAULT_HOME_ENV
#define DEFAULT_HOME_ENV MYSQL_HOME
#endif
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index ad0ac53cfba..b7942d20cea 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -82,7 +82,7 @@ vio_objects= vio.lo viosocket.lo viossl.lo viosslfactories.lo
CLEANFILES = $(target_libadd) $(SHLIBOBJS) \
$(target)
DEFS = -DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
- -DDATADIR="\"$(MYSQLDATAdir)\"" \
+ -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DDEFAULT_HOME_ENV=MYSQL_HOME \
-DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX \
-DDEFAULT_SYSCONFDIR="\"$(sysconfdir)\"" \
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index 17e308b3324..fd2609d026e 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -23,7 +23,7 @@ MYSQLBASEdir= $(prefix)
DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
- -DDATADIR="\"$(MYSQLDATAdir)\"" \
+ -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\""
INCLUDES= @bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
-I$(top_builddir)/include -I$(top_srcdir)/include \
diff --git a/mysys/Makefile.am b/mysys/Makefile.am
index 8c6bf5f7006..7cb87492b40 100644
--- a/mysys/Makefile.am
+++ b/mysys/Makefile.am
@@ -66,7 +66,7 @@ libmysys_a_LIBADD = @THREAD_LOBJECTS@
# charset2html_DEPENDENCIES= $(LIBRARIES)
EXTRA_PROGRAMS =
DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \
- -DDATADIR="\"$(MYSQLDATAdir)\"" \
+ -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DDEFAULT_CHARSET_HOME="\"$(MYSQLBASEdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DDEFAULT_HOME_ENV=MYSQL_HOME \
diff --git a/ndb/src/mgmsrv/Makefile.am b/ndb/src/mgmsrv/Makefile.am
index 3d1845957e6..495d31c8d15 100644
--- a/ndb/src/mgmsrv/Makefile.am
+++ b/ndb/src/mgmsrv/Makefile.am
@@ -48,7 +48,7 @@ LDADD_LOC = $(top_builddir)/ndb/src/mgmclient/CommandInterpreter.lo \
@TERMCAP_LIB@
DEFS_LOC = -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
- -DDATADIR="\"$(MYSQLDATAdir)\"" \
+ -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
-DMYSQLCLUSTERDIR="\"$(MYSQLCLUSTERdir)\""
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 2a0d59d0ab9..e4f339384c9 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -114,7 +114,7 @@ mysql_tzinfo_to_sql_LDADD = @MYSQLD_EXTRA_LDFLAGS@ $(LDADD) $(CXXLDFLAGS)
DEFS = -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
- -DDATADIR="\"$(MYSQLDATAdir)\"" \
+ -DMYSQL_DATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
@DEFS@
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ec08edbc265..37b3754d716 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -6865,7 +6865,7 @@ static void mysql_init_variables(void)
/* Set directory paths */
strmake(language, LANGUAGE, sizeof(language)-1);
- strmake(mysql_real_data_home, get_relative_path(DATADIR),
+ strmake(mysql_real_data_home, get_relative_path(MYSQL_DATADIR),
sizeof(mysql_real_data_home)-1);
mysql_data_home_buff[0]=FN_CURLIB; // all paths are relative from here
mysql_data_home_buff[1]=0;
diff --git a/sql/unireg.h b/sql/unireg.h
index 8e01e6222e6..781b9b980e2 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -29,8 +29,8 @@
#define TEMP_PREFIX "MY"
#define LOG_PREFIX "ML"
#define PROGDIR "bin/"
-#ifndef DATADIR
-#define DATADIR "data/"
+#ifndef MYSQL_DATADIR
+#define MYSQL_DATADIR "data/"
#endif
#ifndef SHAREDIR
#define SHAREDIR "share/"