You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.3 KiB

19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
  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. # Build mysql_fix_privilege_tables.sql
  16. ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql
  17. COMMAND copy /b
  18. mysql_system_tables.sql + mysql_system_tables_fix.sql
  19. mysql_fix_privilege_tables.sql
  20. DEPENDS
  21. ${PROJECT_SOURCE_DIR}/scripts/mysql_system_tables.sql
  22. ${PROJECT_SOURCE_DIR}/scripts/mysql_system_tables_fix.sql)
  23. # Build comp_sql - used for embedding SQL in C or C++ programs
  24. ADD_EXECUTABLE(comp_sql comp_sql.c)
  25. TARGET_LINK_LIBRARIES(comp_sql debug dbug mysys strings)
  26. # Use comp_sql to build mysql_fix_privilege_tables_sql.c
  27. GET_TARGET_PROPERTY(COMP_SQL_EXE comp_sql LOCATION)
  28. ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c
  29. COMMAND ${COMP_SQL_EXE}
  30. mysql_fix_privilege_tables
  31. mysql_fix_privilege_tables.sql
  32. mysql_fix_privilege_tables_sql.c
  33. DEPENDS comp_sql ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql)
  34. # Add dummy target for the above to be built
  35. ADD_CUSTOM_TARGET(GenFixPrivs
  36. ALL
  37. DEPENDS ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c)
  38. # ----------------------------------------------------------------------
  39. # Replace some variables @foo@ in the .in/.sh file, and write the new script
  40. # ----------------------------------------------------------------------
  41. SET(CFLAGS "-D_WINDOWS ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
  42. SET(prefix "${CMAKE_INSTALL_PREFIX}/MySQL Server ${MYSQL_BASE_VERSION}")
  43. SET(sysconfdir ${prefix})
  44. SET(bindir ${prefix}/bin)
  45. SET(libexecdir ${prefix}/bin)
  46. SET(scriptdir ${prefix}/bin)
  47. SET(datadir ${prefix}/share)
  48. SET(pkgdatadir ${prefix}/share)
  49. SET(localstatedir ${prefix}/data)
  50. CONFIGURE_FILE(mysql_config.pl.in
  51. scripts/mysql_config.pl ESCAPE_QUOTES @ONLY)
  52. CONFIGURE_FILE(mysql_convert_table_format.sh
  53. scripts/mysql_convert_table_format.pl ESCAPE_QUOTES @ONLY)
  54. CONFIGURE_FILE(mysql_install_db.pl.in
  55. scripts/mysql_install_db.pl ESCAPE_QUOTES @ONLY)
  56. CONFIGURE_FILE(mysql_secure_installation.pl.in
  57. scripts/mysql_secure_installation.pl ESCAPE_QUOTES @ONLY)
  58. CONFIGURE_FILE(mysqld_multi.sh
  59. scripts/mysqld_multi.pl ESCAPE_QUOTES @ONLY)
  60. CONFIGURE_FILE(mysqldumpslow.sh
  61. scripts/mysqldumpslow.pl ESCAPE_QUOTES @ONLY)
  62. CONFIGURE_FILE(mysqlhotcopy.sh
  63. scripts/mysqlhotcopy.pl ESCAPE_QUOTES @ONLY)