diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-11-26 23:07:53 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-11-26 23:07:53 +0100 |
commit | 64e308e28d2b0fb4cd005e23189e3639912bcd60 (patch) | |
tree | 07aa8c5d623328ff0288dba79634ec3e2a9ed5e3 /sql/CMakeLists.txt | |
parent | 6be24a771a27a077d58d21a4a1f8db3fbd14cac4 (diff) | |
download | mariadb-git-64e308e28d2b0fb4cd005e23189e3639912bcd60.tar.gz |
Fix build and packaging on Windows:
- build executables we have in 5.3 (mysql_install_db.exe, mysq_upgrade_service.exe, upgrade wizard), and MSI
- add some missing headers to windows specific source files.
This needs to be done since 5.5 is using WIN32_LEAN_AND_MEAN preprocessor constant thus windows.h
no more includes whiole Windows
- do not deliver perl scripts (mysql_install_db.pl & friends) -they do not work, are not documented, and we
have native executables for this functionality. do not pack echo.exe, replace.exe into MSI, they
are not needed. Do not build resolveip on Windows, it is not used.
- precache results of of system checks in cmake/os/WindowsCache.cmake (like it is alreay done for majority of tests
to speed up cmake run with VS)
- make feedback plugin DEFAULT on Windows (so MSI works if user enables plugin),
fix null pointer access in PSI_register
Diffstat (limited to 'sql/CMakeLists.txt')
-rw-r--r-- | sql/CMakeLists.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 6d7b73ffcee..3f6d6a08397 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -302,6 +302,46 @@ ELSE() ENDIF() ENDIF() +IF(WIN32) + SET(my_bootstrap_sql ${CMAKE_CURRENT_BINARY_DIR}/my_bootstrap.sql) + FILE(TO_NATIVE_PATH ${my_bootstrap_sql} native_outfile) + + # Create bootstrapper SQL script + ADD_CUSTOM_COMMAND(OUTPUT + ${my_bootstrap_sql} + COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_SOURCE_DIR}/scripts + cmd /c copy mysql_system_tables.sql+mysql_system_tables_data.sql+fill_help_tables.sql ${native_outfile} + DEPENDS + ${CMAKE_SOURCE_DIR}/scripts/mysql_system_tables.sql + ${CMAKE_SOURCE_DIR}/scripts/mysql_system_tables_data.sql + ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql + ) + + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mysql_bootstrap_sql.c + COMMAND comp_sql + mysql_bootstrap_sql + ${CMAKE_CURRENT_BINARY_DIR}/my_bootstrap.sql + mysql_bootstrap_sql.c + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + DEPENDS comp_sql ${my_bootstrap_sql} + ) + + MYSQL_ADD_EXECUTABLE(mysql_install_db + mysql_install_db.cc + ${CMAKE_CURRENT_BINARY_DIR}/mysql_bootstrap_sql.c + COMPONENT Server + ) + TARGET_LINK_LIBRARIES(mysql_install_db mysys) + + ADD_LIBRARY(winservice STATIC winservice.c) + TARGET_LINK_LIBRARIES(winservice shell32) + MYSQL_ADD_EXECUTABLE(mysql_upgrade_service + mysql_upgrade_service.cc + COMPONENT Server) + TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice) +ENDIF() + ADD_CUSTOM_TARGET(show-dist-name COMMAND ${CMAKE_COMMAND} -E echo "${CPACK_PACKAGE_FILE_NAME}" ) |