~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to scripts/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2006 MySQL AB
 
2
 
3
# This program is free software; you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; version 2 of the License.
 
6
 
7
# This program is distributed in the hope that it will be useful,
 
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
# GNU General Public License for more details.
 
11
 
12
# You should have received a copy of the GNU General Public License
 
13
# along with this program; if not, write to the Free Software
 
14
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
15
 
 
16
# Build mysql_fix_privilege_tables.sql
 
17
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql
 
18
                   COMMAND copy /b
 
19
                   mysql_system_tables.sql + mysql_system_tables_fix.sql
 
20
                   mysql_fix_privilege_tables.sql
 
21
                   DEPENDS
 
22
                   ${PROJECT_SOURCE_DIR}/scripts/mysql_system_tables.sql
 
23
                   ${PROJECT_SOURCE_DIR}/scripts/mysql_system_tables_fix.sql)
 
24
 
 
25
# Build comp_sql - used for embedding SQL in C or C++ programs
 
26
ADD_EXECUTABLE(comp_sql comp_sql.c)
 
27
TARGET_LINK_LIBRARIES(comp_sql debug dbug mysys strings)
 
28
 
 
29
# Use comp_sql to build mysql_fix_privilege_tables_sql.c
 
30
GET_TARGET_PROPERTY(COMP_SQL_EXE comp_sql LOCATION)
 
31
 
 
32
ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c
 
33
                   COMMAND ${COMP_SQL_EXE}
 
34
                   mysql_fix_privilege_tables
 
35
                   mysql_fix_privilege_tables.sql
 
36
                   mysql_fix_privilege_tables_sql.c
 
37
                   DEPENDS comp_sql ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql)
 
38
 
 
39
# Add dummy target for the above to be built
 
40
ADD_CUSTOM_TARGET(GenFixPrivs
 
41
                  ALL
 
42
                  DEPENDS ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c)
 
43
 
 
44
# ----------------------------------------------------------------------
 
45
# Replace some variables @foo@ in the .in/.sh file, and write the new script
 
46
# ----------------------------------------------------------------------
 
47
 
 
48
SET(CFLAGS             "-D_WINDOWS ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
 
49
SET(prefix             "${CMAKE_INSTALL_PREFIX}/MySQL Server ${MYSQL_BASE_VERSION}")
 
50
SET(sysconfdir          ${prefix})
 
51
SET(bindir              ${prefix}/bin)
 
52
SET(libexecdir          ${prefix}/bin)
 
53
SET(scriptdir           ${prefix}/bin)
 
54
SET(datadir             ${prefix}/share)
 
55
SET(pkgdatadir          ${prefix}/share)
 
56
SET(localstatedir       ${prefix}/data)
 
57
 
 
58
CONFIGURE_FILE(mysql_config.pl.in
 
59
               scripts/mysql_config.pl ESCAPE_QUOTES @ONLY)
 
60
 
 
61
CONFIGURE_FILE(mysql_convert_table_format.sh
 
62
               scripts/mysql_convert_table_format.pl ESCAPE_QUOTES @ONLY)
 
63
 
 
64
CONFIGURE_FILE(mysql_install_db.pl.in
 
65
               scripts/mysql_install_db.pl ESCAPE_QUOTES @ONLY)
 
66
 
 
67
CONFIGURE_FILE(mysql_secure_installation.pl.in
 
68
               scripts/mysql_secure_installation.pl ESCAPE_QUOTES @ONLY)
 
69
 
 
70
CONFIGURE_FILE(mysqld_multi.sh
 
71
               scripts/mysqld_multi.pl ESCAPE_QUOTES @ONLY)
 
72
 
 
73
CONFIGURE_FILE(mysqldumpslow.sh
 
74
               scripts/mysqldumpslow.pl ESCAPE_QUOTES @ONLY)
 
75
 
 
76
CONFIGURE_FILE(mysqlhotcopy.sh
 
77
               scripts/mysqlhotcopy.pl ESCAPE_QUOTES @ONLY)