summaryrefslogtreecommitdiff
path: root/scripts/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/CMakeLists.txt')
-rwxr-xr-xscripts/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
new file mode 100755
index 00000000000..8580844097e
--- /dev/null
+++ b/scripts/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Copyright (C) 2006 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+ADD_EXECUTABLE(comp_sql comp_sql.c)
+TARGET_LINK_LIBRARIES(comp_sql dbug mysys strings)
+
+# Build comp_sql - used for embedding SQL in C or C++ programs
+GET_TARGET_PROPERTY(COMP_SQL_EXE comp_sql LOCATION)
+
+ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/client/mysql_fix_privilege_tables_sql.c
+ COMMAND ${COMP_SQL_EXE}
+ ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql
+ ${PROJECT_SOURCE_DIR}/client/mysql_fix_privilege_tables_sql.c
+ DEPENDS comp_sql ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql)
+