home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / mysql / scripts / CMakeLists.txt < prev    next >
Text File  |  2008-04-17  |  2KB  |  43 lines

  1. # Copyright (C) 2006 MySQL AB
  2. # This program is free software; you can redistribute it and/or modify
  3. # it under the terms of the GNU General Public License as published by
  4. # the Free Software Foundation; version 2 of the License.
  5. # This program is distributed in the hope that it will be useful,
  6. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  8. # GNU General Public License for more details.
  9. # You should have received a copy of the GNU General Public License
  10. # along with this program; if not, write to the Free Software
  11. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  12.  
  13. # Build mysql_fix_privilege_tables.sql
  14. ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql
  15.                    COMMAND copy /b
  16.                    mysql_system_tables.sql + mysql_system_tables_fix.sql
  17.                    mysql_fix_privilege_tables.sql
  18.                    DEPENDS
  19.                    ${PROJECT_SOURCE_DIR}/scripts/mysql_system_tables.sql
  20.                    ${PROJECT_SOURCE_DIR}/scripts/mysql_system_tables_fix.sql)
  21.  
  22. # Build comp_sql - used for embedding SQL in C or C++ programs
  23. ADD_EXECUTABLE(comp_sql comp_sql.c)
  24. TARGET_LINK_LIBRARIES(comp_sql debug dbug mysys strings)
  25.  
  26. # Use comp_sql to build mysql_fix_privilege_tables_sql.c
  27. GET_TARGET_PROPERTY(COMP_SQL_EXE comp_sql LOCATION)
  28.  
  29. ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c
  30.                    COMMAND ${COMP_SQL_EXE}
  31.                    mysql_fix_privilege_tables
  32.                    mysql_fix_privilege_tables.sql
  33.                    mysql_fix_privilege_tables_sql.c
  34.                    DEPENDS comp_sql ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql)
  35.  
  36. # Add dummy target for the above to be built
  37. ADD_CUSTOM_TARGET(GenFixPrivs
  38.                   ALL
  39.                   DEPENDS ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c)
  40.