diff options
-rwxr-xr-x | CMakeLists.txt | 75 | ||||
-rwxr-xr-x | client/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | extra/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | libmysql/CMakeLists.txt | 8 | ||||
-rw-r--r-- | mysys/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | regex/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | scripts/CMakeLists.txt | 5 | ||||
-rwxr-xr-x | server-tools/instance-manager/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | sql/CMakeLists.txt | 5 | ||||
-rw-r--r-- | storage/maria/CMakeLists.txt | 3 | ||||
-rw-r--r-- | storage/myisam/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | strings/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | tests/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | zlib/CMakeLists.txt | 2 |
14 files changed, 114 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a79051eb706..c8245b886db 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,3 +333,78 @@ IF(WITH_EMBEDDED_SERVER) ADD_SUBDIRECTORY(libmysqld/examples) ENDIF(WITH_EMBEDDED_SERVER) ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess) + +# Set up the installer +SET(CPACK_PACKAGE_NAME "MariaDB") +STRING(REPLACE "-MariaDB" "" CPACK_PACKAGE_VERSION ${VERSION}) +SET(CPACK_PACKAGE_VENDOR "Monty Program AB http://www.montyprogram.com") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MariaDB") +SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING) +SET(CPACK_GENERATOR NSIS) + +# Installer components and grouping +SET(CPACK_COMPONENT_GROUP_SERVER_DESCRIPTION "The files necessary for running the MariaDB server.") +SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "Files used in development on the MariaDB server.") +SET(CPACK_ALL_INSTALL_TYPES Normal Development) +SET(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "MariaDB server") +SET(CPACK_COMPONENT_RUNTIME_DESCRIPTION "The server itself. You want to install this one.") +SET(CPACK_COMPONENT_RUNTIME_GROUP "Server") +SET(CPACK_COMPONENT_RUNTIME_INSTALL_TYPES Normal Development) +SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Development headers") +SET(CPACK_COMPONENT_HEADERS_DESCRIPTION "Header files for development on MariaDB.") +SET(CPACK_COMPONENT_HEADERS_DEPENDS runtime) +SET(CPACK_COMPONENT_HEADERS_GROUP "Development") +SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Development) +SET(CPACK_COMPONENT_PERLSCRIPTS_DISPLAY_NAME "Server perl scripts") +SET(CPACK_COMPONENT_PERLSCRIPTS_DESCRIPTION "Scripts to controll and modify the server. You need a perl installation for these to work.") +SET(CPACK_COMPONENT_PERLSCRIPTS_DEPENDS runtime) +SET(CPACK_COMPONENT_PERLSCRIPTS_GROUP "Server") +SET(CPACK_COMPONENT_PERLSCRIPTS_INSTALL_TYPES Normal Development) +# TODO: Add debug files +# TODO: Add embedded server files +# TODO: Add test files +# TODO: Add sql-bench + +# Add files to the installer +INSTALL(FILES COPYING EXCEPTIONS-CLIENT DESTINATION .) +INSTALL(FILES support-files/my-huge.ini support-files/my-innodb-heavy-4G.ini DESTINATION .) +INSTALL(FILES support-files/my-large.ini support-files/my-medium.ini DESTINATION .) +INSTALL(FILES support-files/my-small.ini DESTINATION .) +INSTALL(FILES Docs/INSTALL-BINARY DESTINATION Docs) +INSTALL(FILES COPYING DESTINATION Docs) +FILE(GLOB headerfiles "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") +INSTALL(FILES ${headerfiles} DESTINATION include COMPONENT headers) +INSTALL(FILES include/mysql/plugin.h DESTINATION include/mysql COMPONENT headers) +INSTALL(FILES libmysql/libmysql.def DESTINATION include COMPONENT headers) + +# Handle the database files +FILE(GLOB datafiles "${CMAKE_CURRENT_SOURCE_DIR}/win/data/mysql/*") +INSTALL(FILES ${datafiles} DESTINATION data/clean/mysql) +INSTALL(FILES win/data/maria_log.00000001 win/data/maria_log_control DESTINATION data/clean) +INSTALL(DIRECTORY win/data/test DESTINATION data/clean) +SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS} + IfFileExists '$INSTDIR\\\\data\\\\mysql\\\\db.frm' 0 CopyDatabaseFiles + MessageBox MB_OK 'There are already database files present in the data directory. Clean database files are not written to the directory' + GoTo EndCopyDatabaseFiles + CopyDatabaseFiles: + CopyFiles '$INSTDIR\\\\data\\\\clean\\\\*' '$INSTDIR\\\\data' + EndCopyDatabaseFiles:") +SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS} + MessageBox MB_OK 'This will not delete the database files in $INSTDIR\\\\data'") + +# Files in the share dir +INSTALL(FILES sql/share/errmsg.txt DESTINATION share COMPONENT runtime) +FILE(GLOB charsets sql/share/charsets/*) +INSTALL(FILES ${charsets} DESTINATION share/charsets COMPONENT runtime) +FILE(GLOB share_dirs sql/share/*) +FOREACH(SUBDIR ${share_dirs}) + FILE(RELATIVE_PATH DIRNAME ${PROJECT_SOURCE_DIR}/sql/share ${SUBDIR}) + IF (EXISTS ${SUBDIR}/errmsg.sys) + INSTALL(FILES ${SUBDIR}/errmsg.sys DESTINATION share/${DIRNAME} COMPONENT runtime) + ENDIF(EXISTS ${SUBDIR}/errmsg.sys) +ENDFOREACH(SUBDIR ${share_dirs}) + +INCLUDE(InstallRequiredSystemLibraries) + +# This must always be the last line +INCLUDE(CPack) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index e96437d40d0..abd9923d49d 100755 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -83,3 +83,5 @@ IF(EMBED_MANIFESTS) MYSQL_EMBED_MANIFEST("echo" "asInvoker") ENDIF(EMBED_MANIFESTS) +INSTALL(TARGETS mysql mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow + mysqlbinlog mysqladmin mysqlslap echo DESTINATION bin COMPONENT runtime) diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index cec0db6a4ae..ba90492577d 100755 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -53,3 +53,5 @@ TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32) IF(EMBED_MANIFESTS) MYSQL_EMBED_MANIFEST("myTest" "asInvoker") ENDIF(EMBED_MANIFESTS) + +INSTALL(TARGETS comp_err my_print_defaults perror resolveip replace DESTINATION bin COMPONENT runtime) diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index b033aeb4665..5a0c0bf9e22 100755 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -129,3 +129,11 @@ TARGET_LINK_LIBRARIES(libmysql wsock32) IF(EMBED_MANIFESTS) MYSQL_EMBED_MANIFEST("myTest" "asInvoker") ENDIF(EMBED_MANIFESTS) + +# TODO: Install mysqlclient_notls? +# TODO: Which component should these be part of, development? +INSTALL(TARGETS mysqlclient DESTINATION lib/opt COMPONENT runtime) +INSTALL(TARGETS libmysql DESTINATION lib/opt COMPONENT runtime) + +# Also install libmysql.dll to the bin dir +INSTALL(TARGETS libmysql DESTINATION bin COMPONENT runtime) diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index e9873fb0525..bf0c6551a11 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -49,4 +49,6 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c default.c default_ IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(mysys ${MYSYS_SOURCES}) + + INSTALL(TARGETS mysys DESTINATION lib/opt COMPONENT runtime) # TODO: Component? ENDIF(NOT SOURCE_SUBLIBS) diff --git a/regex/CMakeLists.txt b/regex/CMakeLists.txt index 2e3b18c7bb0..b8a0a953af6 100755 --- a/regex/CMakeLists.txt +++ b/regex/CMakeLists.txt @@ -22,4 +22,6 @@ SET(REGEX_SOURCES regcomp.c regerror.c regexec.c regfree.c reginit.c) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(regex ${REGEX_SOURCES}) + + INSTALL(TARGETS regex DESTINATION lib/opt COMPONENT runtime) # TODO: Component ENDIF(NOT SOURCE_SUBLIBS) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 2563c49280e..aa7fa03cf03 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -75,3 +75,8 @@ CONFIGURE_FILE(mysqldumpslow.sh CONFIGURE_FILE(mysqlhotcopy.sh ${CMAKE_BINARY_DIR}/scripts/mysqlhotcopy.pl ESCAPE_QUOTES @ONLY) + +INSTALL(FILES mysqldumpslow.pl mysqlhotcopy.pl mysql_config.pl + mysql_convert_table_format.pl mysql_install_db.pl + mysql_secure_installation.pl mysqld_multi.pl + DESTINATION scripts COMPONENT perlscripts) diff --git a/server-tools/instance-manager/CMakeLists.txt b/server-tools/instance-manager/CMakeLists.txt index 4b9c386afe1..5e61c384254 100755 --- a/server-tools/instance-manager/CMakeLists.txt +++ b/server-tools/instance-manager/CMakeLists.txt @@ -36,3 +36,5 @@ TARGET_LINK_LIBRARIES(mysqlmanager debug dbug mysys strings taocrypt vio yassl z IF(EMBED_MANIFESTS) MYSQL_EMBED_MANIFEST("mysqlmanager" "asInvoker") ENDIF(EMBED_MANIFESTS) + +INSTALL(TARGETS mysqlmanager DESTINATION bin COMPONENT runtime) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index fab538dbee4..af9ed5ed8e3 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -154,3 +154,8 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def) ADD_DEPENDENCIES(udf_example strings GenError) TARGET_LINK_LIBRARIES(udf_example strings wsock32) + +INSTALL(TARGETS mysqld + RUNTIME DESTINATION bin COMPONENT runtime + LIBRARY DESTINATION lib COMPONENT runtime + ARCHIVE DESTINATION lib COMPONENT runtime) diff --git a/storage/maria/CMakeLists.txt b/storage/maria/CMakeLists.txt index c0c3a44c7cf..22e0211f052 100644 --- a/storage/maria/CMakeLists.txt +++ b/storage/maria/CMakeLists.txt @@ -91,4 +91,7 @@ IF(EMBED_MANIFESTS) MYSQL_EMBED_MANIFEST("maria_pack" "asInvoker") ENDIF(EMBED_MANIFESTS) +INSTALL(TARGETS maria_ftdump maria_chk maria_read_log maria_pack maria_dump_log + DESTINATION bin COMPONENT runtime) + ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt index 1a667e271af..7744f4337ef 100644 --- a/storage/myisam/CMakeLists.txt +++ b/storage/myisam/CMakeLists.txt @@ -70,4 +70,6 @@ IF(NOT SOURCE_SUBLIBS) MYSQL_EMBED_MANIFEST("myisampack" "asInvoker") ENDIF(EMBED_MANIFESTS) + INSTALL(TARGETS myisam_ftdump myisamchk myisamlog myisampack DESTINATION bin COMPONENT runtime) + ENDIF(NOT SOURCE_SUBLIBS) diff --git a/strings/CMakeLists.txt b/strings/CMakeLists.txt index 5ba1c0e5747..339fe7854c7 100755 --- a/strings/CMakeLists.txt +++ b/strings/CMakeLists.txt @@ -30,4 +30,6 @@ SET(STRINGS_SOURCES bchange.c bcmp.c bfill.c bmove512.c bmove_upp.c ctype-big5.c IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(strings ${STRINGS_SOURCES}) + + INSTALL(TARGETS strings DESTINATION lib/opt COMPONENT runtime) # TODO: Component ENDIF(NOT SOURCE_SUBLIBS) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2093fc0da36..245c9ce8666 100755 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -25,3 +25,5 @@ TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient_notls wsock32) ADD_EXECUTABLE(bug25714 bug25714.c) TARGET_LINK_LIBRARIES(bug25714 mysqlclient_notls wsock32) + +INSTALL(TARGETS mysql_client_test bug25714 DESTINATION bin COMPONENT runtime) diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index 43235b631f6..a4b75bd5744 100755 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -27,4 +27,6 @@ SET(ZLIB_SOURCES adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio. zutil.c zutil.h) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(zlib ${ZLIB_SOURCES}) + + INSTALL(TARGETS zlib DESTINATION lib/opt COMPONENT runtime) # TODO: Component ENDIF(NOT SOURCE_SUBLIBS) |