Commit 9891642e authored by Daniel Fischer's avatar Daniel Fischer

merge

parents 527446e0 89205a3b
[MYSQL] [MYSQL]
post_commit_to = "commits@lists.mysql.com" #post_commit_to = "commits@lists.mysql.com"
post_push_to = "commits@lists.mysql.com" #post_push_to = "commits@lists.mysql.com"
tree_name = "mysql-trunk" tree_name = "mysql-trunk"
...@@ -36,6 +36,18 @@ SET(CUSTOM_C_FLAGS $ENV{CFLAGS}) ...@@ -36,6 +36,18 @@ SET(CUSTOM_C_FLAGS $ENV{CFLAGS})
OPTION(WITH_DEBUG "Use dbug/safemutex" OFF) OPTION(WITH_DEBUG "Use dbug/safemutex" OFF)
OPTION(WITH_DEBUG_FULL "Use dbug and safemalloc/safemutex. Slow" OFF) OPTION(WITH_DEBUG_FULL "Use dbug and safemalloc/safemutex. Slow" OFF)
# Distinguish between community and non-community builds, with the
# default being a community build. This does not impact the feature
# set that will be compiled in; it's merely provided as a hint to
# custom packaging steps.
OPTION(COMMUNITY_BUILD "Set to true if this is a community build" ON)
# Use a default manufacturer if no manufacturer was identified.
SET(MANUFACTURER_DOCSTRING
"Set the entity that appears as the manufacturer of packages that support a manufacturer field.")
IF(NOT DEFINED MANUFACTURER)
SET(MANUFACTURER "Built from Source" CACHE BOOL ${MANUFACTURER_DOCSTRING})
ENDIF()
# We choose to provide WITH_DEBUG as alias to standard CMAKE_BUILD_TYPE=Debug # We choose to provide WITH_DEBUG as alias to standard CMAKE_BUILD_TYPE=Debug
# which turns out to be not trivial, as this involves synchronization # which turns out to be not trivial, as this involves synchronization
...@@ -277,6 +289,7 @@ IF(WIN32) ...@@ -277,6 +289,7 @@ IF(WIN32)
ELSE() ELSE()
SET(CPACK_GENERATOR "TGZ") SET(CPACK_GENERATOR "TGZ")
ENDIF() ENDIF()
ADD_SUBDIRECTORY(packaging/WiX)
INCLUDE(CPack) INCLUDE(CPack)
IF(UNIX) IF(UNIX)
INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL) INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL)
......
...@@ -33,7 +33,7 @@ IF(UNIX) ...@@ -33,7 +33,7 @@ IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY}) TARGET_LINK_LIBRARIES(mysql ${READLINE_LIBRARY})
ENDIF(UNIX) ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc) MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS")
TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex) TARGET_LINK_LIBRARIES(mysqltest mysqlclient regex)
......
...@@ -31,8 +31,7 @@ ENDIF() ...@@ -31,8 +31,7 @@ ENDIF()
# Create bootstrapper SQL script # Create bootstrapper SQL script
FILE(WRITE bootstrap.sql "use mysql;\n" ) FILE(WRITE bootstrap.sql "use mysql;\n" )
FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql)
fill_help_tables.sql)
FILE(STRINGS ${CMAKE_SOURCE_DIR}/scripts/${FILENAME} CONTENTS) FILE(STRINGS ${CMAKE_SOURCE_DIR}/scripts/${FILENAME} CONTENTS)
FOREACH(STR ${CONTENTS}) FOREACH(STR ${CONTENTS})
IF(NOT STR MATCHES "@current_hostname") IF(NOT STR MATCHES "@current_hostname")
...@@ -40,6 +39,8 @@ FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql ...@@ -40,6 +39,8 @@ FOREACH(FILENAME mysql_system_tables.sql mysql_system_tables_data.sql
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
ENDFOREACH() ENDFOREACH()
FILE(READ ${CMAKE_SOURCE_DIR}/scripts/fill_help_tables.sql CONTENTS)
FILE(APPEND bootstrap.sql ${CONTENTS})
FILE(REMOVE_RECURSE mysql) FILE(REMOVE_RECURSE mysql)
......
...@@ -35,15 +35,84 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets) ...@@ -35,15 +35,84 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
IF(CMAKE_GENERATOR MATCHES "Visual Studio") IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location}) STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
ENDIF() ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION}) IF(target STREQUAL "mysqld")
SET(comp Server)
ELSE()
SET(comp Debuginfo)
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION} COMPONENT ${comp})
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
# Installs manpage for given file (either script or executable)
#
FUNCTION(INSTALL_MANPAGE file)
IF(NOT UNIX)
RETURN()
ENDIF()
GET_FILENAME_COMPONENT(file_name "${file}" NAME)
SET(GLOB_EXPR
${CMAKE_SOURCE_DIR}/man/*${file}man.1*
${CMAKE_SOURCE_DIR}/man/*${file}man.8*
${CMAKE_BINARY_DIR}/man/*${file}man.1*
${CMAKE_BINARY_DIR}/man/*${file}man.8*
)
IF(MYSQL_DOC_DIR)
SET(GLOB_EXPR
${MYSQL_DOC_DIR}/man/*${file}man.1*
${MYSQL_DOC_DIR}/man/*${file}man.8*
${MYSQL_DOC_DIR}/man/*${file}.1*
${MYSQL_DOC_DIR}/man/*${file}.8*
${GLOB_EXPR}
)
ENDIF()
FILE(GLOB_RECURSE MANPAGES ${GLOB_EXPR})
IF(MANPAGES)
LIST(GET MANPAGES 0 MANPAGE)
STRING(REPLACE "${file}man.1" "${file}.1" MANPAGE "${MANPAGE}")
STRING(REPLACE "${file}man.8" "${file}.8" MANPAGE "${MANPAGE}")
IF(MANPAGE MATCHES "${file}.1")
SET(SECTION man1)
ELSE()
SET(SECTION man8)
ENDIF()
INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}")
ENDIF()
ENDFUNCTION()
FUNCTION(INSTALL_SCRIPT)
CMAKE_PARSE_ARGUMENTS(ARG
"DESTINATION;COMPONENT"
""
${ARGN}
)
SET(script ${ARG_DEFAULT_ARGS})
IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF()
IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ELSE()
SET(COMP)
ENDIF()
INSTALL(FILES
${script}
DESTINATION ${ARG_DESTINATION}
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE ${COMP}
)
INSTALL_MANPAGE(${script})
ENDFUNCTION()
# Install symbolic link to CMake target. # Install symbolic link to CMake target.
# the link is created in the same directory as target # the link is created in the same directory as target
# and extension will be the same as for target file. # and extension will be the same as for target file.
MACRO(INSTALL_SYMLINK linkname target destination) MACRO(INSTALL_SYMLINK linkname target destination component)
IF(UNIX) IF(UNIX)
GET_TARGET_PROPERTY(location ${target} LOCATION) GET_TARGET_PROPERTY(location ${target} LOCATION)
GET_FILENAME_COMPONENT(path ${location} PATH) GET_FILENAME_COMPONENT(path ${location} PATH)
...@@ -68,7 +137,12 @@ IF(UNIX) ...@@ -68,7 +137,12 @@ IF(UNIX)
STRING(REPLACE "${CMAKE_CFG_INTDIR}" STRING(REPLACE "${CMAKE_CFG_INTDIR}"
"\${CMAKE_INSTALL_CONFIG_NAME}" output ${output}) "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
ENDIF() ENDIF()
INSTALL(FILES ${output} DESTINATION ${destination}) IF(component)
SET(COMP COMPONENT ${component})
ELSE()
SET(COMP)
ENDIF()
INSTALL(FILES ${output} DESTINATION ${destination} ${COMP})
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
...@@ -128,13 +202,11 @@ ENDMACRO() ...@@ -128,13 +202,11 @@ ENDMACRO()
# Installs targets, also installs pdbs on Windows. # Installs targets, also installs pdbs on Windows.
# #
# More stuff can be added later, e.g signing #
# or pre-link custom targets (one example is creating
# version resource for windows executables)
FUNCTION(MYSQL_INSTALL_TARGETS) FUNCTION(MYSQL_INSTALL_TARGETS)
CMAKE_PARSE_ARGUMENTS(ARG CMAKE_PARSE_ARGUMENTS(ARG
"DESTINATION" "DESTINATION;COMPONENT"
"" ""
${ARGN} ${ARGN}
) )
...@@ -146,15 +218,24 @@ FUNCTION(MYSQL_INSTALL_TARGETS) ...@@ -146,15 +218,24 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
MESSAGE(FATAL_ERROR "Need DESTINATION parameter for MYSQL_INSTALL_TARGETS") MESSAGE(FATAL_ERROR "Need DESTINATION parameter for MYSQL_INSTALL_TARGETS")
ENDIF() ENDIF()
# If signing is required, sign executables before installing
FOREACH(target ${TARGETS}) FOREACH(target ${TARGETS})
IF(SIGNCODE AND SIGNCODE_ENABLED) # If signing is required, sign executables before installing
IF(SIGNCODE AND SIGNCODE_ENABLED)
SIGN_TARGET(${target}) SIGN_TARGET(${target})
ENDIF() ENDIF()
# For Windows, add version info to executables
ADD_VERSION_INFO(${target}) ADD_VERSION_INFO(${target})
# Install man pages on Unix
IF(UNIX)
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
INSTALL_MANPAGE(${target_location})
ENDIF()
ENDFOREACH() ENDFOREACH()
IF(ARG_COMPONENT)
INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION}) SET(COMP COMPONENT ${ARG_COMPONENT})
ENDIF()
INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
SET(INSTALL_LOCATION ${ARG_DESTINATION} ) SET(INSTALL_LOCATION ${ARG_DESTINATION} )
INSTALL_DEBUG_SYMBOLS("${TARGETS}") INSTALL_DEBUG_SYMBOLS("${TARGETS}")
SET(INSTALL_LOCATION) SET(INSTALL_LOCATION)
......
...@@ -214,7 +214,7 @@ ENDMACRO() ...@@ -214,7 +214,7 @@ ENDMACRO()
#) #)
MACRO(MERGE_LIBRARIES) MACRO(MERGE_LIBRARIES)
CMAKE_PARSE_ARGUMENTS(ARG CMAKE_PARSE_ARGUMENTS(ARG
"EXPORTS;OUTPUT_NAME" "EXPORTS;OUTPUT_NAME;COMPONENT"
"STATIC;SHARED;MODULE;NOINSTALL" "STATIC;SHARED;MODULE;NOINSTALL"
${ARGN} ${ARGN}
) )
...@@ -259,7 +259,10 @@ MACRO(MERGE_LIBRARIES) ...@@ -259,7 +259,10 @@ MACRO(MERGE_LIBRARIES)
MESSAGE(FATAL_ERROR "Unknown library type") MESSAGE(FATAL_ERROR "Unknown library type")
ENDIF() ENDIF()
IF(NOT ARG_NOINSTALL) IF(NOT ARG_NOINSTALL)
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}") IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ENDIF()
MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP})
ENDIF() ENDIF()
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "") SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "")
ENDMACRO() ENDMACRO()
......
...@@ -29,7 +29,7 @@ INCLUDE(cmake_parse_arguments) ...@@ -29,7 +29,7 @@ INCLUDE(cmake_parse_arguments)
FUNCTION (MYSQL_ADD_EXECUTABLE) FUNCTION (MYSQL_ADD_EXECUTABLE)
# Pass-through arguments for ADD_EXECUTABLE # Pass-through arguments for ADD_EXECUTABLE
CMAKE_PARSE_ARGUMENTS(ARG CMAKE_PARSE_ARGUMENTS(ARG
"WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION" "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT"
"" ""
${ARGN} ${ARGN}
) )
...@@ -43,7 +43,14 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) ...@@ -43,7 +43,14 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
IF(NOT ARG_EXCLUDE_FROM_ALL) IF(NOT ARG_EXCLUDE_FROM_ALL)
IF(NOT ARG_DESTINATION) IF(NOT ARG_DESTINATION)
SET(ARG_DESTINATION ${INSTALL_BINDIR}) SET(ARG_DESTINATION ${INSTALL_BINDIR})
ENDIF()
IF(ARG_COMPONENT)
SET(COMP COMPONENT ${ARG_COMPONENT})
ELSEIF(MYSQL_INSTALL_COMPONENT)
SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT})
ELSE()
SET(COMP COMPONENT Client)
ENDIF() ENDIF()
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION}) MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP})
ENDIF() ENDIF()
ENDFUNCTION() ENDFUNCTION()
\ No newline at end of file
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
# Produce meaningful package name for the binary package # Produce meaningful package name for the binary package
# The logic is rather involved with special cases for different OSes # The logic is rather involved with special cases for different OSes
INCLUDE(CheckTypeSize)
CHECK_TYPE_SIZE("void *" SIZEOF_VOIDP)
MACRO(GET_PACKAGE_FILE_NAME Var) MACRO(GET_PACKAGE_FILE_NAME Var)
IF(NOT VERSION) IF(NOT VERSION)
MESSAGE(FATAL_ERROR MESSAGE(FATAL_ERROR
...@@ -24,7 +26,8 @@ IF(NOT VERSION) ...@@ -24,7 +26,8 @@ IF(NOT VERSION)
SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 1) SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 1)
SET(DEFAULT_PLATFORM ${CMAKE_SYSTEM_NAME}) SET(DEFAULT_PLATFORM ${CMAKE_SYSTEM_NAME})
SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR}) SET(DEFAULT_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
IF(CMAKE_SIZEOF_VOID_P EQUAL 8) MESSAGE("SIZEOF_VOIDP=${SIZEOF_VOIDP}")
IF(SIZEOF_VOIDP EQUAL 8)
SET(64BIT 1) SET(64BIT 1)
ENDIF() ENDIF()
......
...@@ -173,7 +173,7 @@ MACRO(MYSQL_ADD_PLUGIN) ...@@ -173,7 +173,7 @@ MACRO(MYSQL_ADD_PLUGIN)
SET_TARGET_PROPERTIES(${target} PROPERTIES SET_TARGET_PROPERTIES(${target} PROPERTIES
OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}") OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}")
# Install dynamic library # Install dynamic library
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR}) MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT Server)
INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug) INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug)
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
......
...@@ -81,6 +81,8 @@ ...@@ -81,6 +81,8 @@
#cmakedefine HAVE_SYS_STREAM_H 1 #cmakedefine HAVE_SYS_STREAM_H 1
#cmakedefine HAVE_SYS_TERMCAP_H 1 #cmakedefine HAVE_SYS_TERMCAP_H 1
#cmakedefine HAVE_SYS_TIMEB_H 1 #cmakedefine HAVE_SYS_TIMEB_H 1
#cmakedefine HAVE_SYS_TIMES_H 1
#cmakedefine HAVE_SYS_TIME_H 1
#cmakedefine HAVE_SYS_TYPES_H 1 #cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_SYS_UN_H 1 #cmakedefine HAVE_SYS_UN_H 1
#cmakedefine HAVE_SYS_VADVISE_H 1 #cmakedefine HAVE_SYS_VADVISE_H 1
...@@ -88,6 +90,7 @@ ...@@ -88,6 +90,7 @@
#cmakedefine HAVE_TERMIOS_H 1 #cmakedefine HAVE_TERMIOS_H 1
#cmakedefine HAVE_TERMIO_H 1 #cmakedefine HAVE_TERMIO_H 1
#cmakedefine HAVE_TERMCAP_H 1 #cmakedefine HAVE_TERMCAP_H 1
#cmakedefine HAVE_TIME_H 1
#cmakedefine HAVE_UNISTD_H 1 #cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_UTIME_H 1 #cmakedefine HAVE_UTIME_H 1
#cmakedefine HAVE_VARARGS_H 1 #cmakedefine HAVE_VARARGS_H 1
...@@ -261,6 +264,8 @@ ...@@ -261,6 +264,8 @@
#cmakedefine HAVE_TEMPNAM 1 #cmakedefine HAVE_TEMPNAM 1
#cmakedefine HAVE_THR_SETCONCURRENCY 1 #cmakedefine HAVE_THR_SETCONCURRENCY 1
#cmakedefine HAVE_THR_YIELD 1 #cmakedefine HAVE_THR_YIELD 1
#cmakedefine HAVE_TIME 1
#cmakedefine HAVE_TIMES 1
#cmakedefine HAVE_VALLOC 1 #cmakedefine HAVE_VALLOC 1
#define HAVE_VIO_READ_BUFF 1 #define HAVE_VIO_READ_BUFF 1
#cmakedefine HAVE_VASPRINTF 1 #cmakedefine HAVE_VASPRINTF 1
...@@ -295,11 +300,6 @@ ...@@ -295,11 +300,6 @@
/* Types we may use */ /* Types we may use */
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
#if SIZEOF_CHAR
# define HAVE_CHAR 1
#endif
#ifdef __APPLE__ #ifdef __APPLE__
/* /*
Special handling required for OSX to support universal binaries that Special handling required for OSX to support universal binaries that
...@@ -310,127 +310,71 @@ ...@@ -310,127 +310,71 @@
#else #else
#define SIZEOF_LONG 4 #define SIZEOF_LONG 4
#endif #endif
#define SIZEOF_VOIDP SIZEOF_LONG
#define SIZEOF_CHARP SIZEOF_LONG #define SIZEOF_CHARP SIZEOF_LONG
#define SIZEOF_SIZE_T SIZEOF_LONG #define SIZEOF_SIZE_T SIZEOF_LONG
#else #else
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@ /* No indentation, to fetch the lines from verification scripts */
#cmakedefine SIZEOF_CHARP @SIZEOF_CHARP@ #cmakedefine SIZEOF_LONG @SIZEOF_LONG@
#cmakedefine SIZEOF_SIZE_T @SIZEOF_CHARP@ #cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
#endif #cmakedefine SIZEOF_CHARP @SIZEOF_CHARP@
#cmakedefine SIZEOF_SIZE_T @SIZEOF_CHARP@
#if SIZEOF_LONG
# define HAVE_LONG 1
#endif
#if SIZEOF_CHARP
#define HAVE_CHARP 1
#define SIZEOF_VOIDP SIZEOF_CHARP
#endif #endif
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
#cmakedefine HAVE_CHAR 1
#cmakedefine HAVE_LONG 1
#cmakedefine HAVE_CHARP 1
#cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@ #cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@
#if SIZEOF_SHORT #cmakedefine HAVE_SHORT 1
# define HAVE_SHORT 1
#endif
#cmakedefine SIZEOF_INT @SIZEOF_INT@ #cmakedefine SIZEOF_INT @SIZEOF_INT@
#if SIZEOF_INT #cmakedefine HAVE_INT 1
# define HAVE_INT 1
#endif
#cmakedefine SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@ #cmakedefine SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
#if SIZEOF_LONG_LONG #cmakedefine HAVE_LONG_LONG 1
# define HAVE_LONG_LONG 1
#endif
#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@ #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
#if SIZEOF_OFF_T #cmakedefine HAVE_OFF_T 1
#define HAVE_OFF_T 1
#endif
#cmakedefine SIZEOF_SIGSET_T @SIZEOF_SIGSET_T@ #cmakedefine SIZEOF_SIGSET_T @SIZEOF_SIGSET_T@
#if SIZEOF_SIGSET_T #cmakedefine HAVE_SIGSET_T 1
#define HAVE_SIGSET_T 1 #cmakedefine HAVE_SIZE_T 1
#endif
#if SIZEOF_SIZE_T
#define HAVE_SIZE_T 1
#endif
#cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@ #cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@
#if SIZEOF_UCHAR #cmakedefine HAVE_UCHAR 1
#define HAVE_UCHAR 1
#endif
#cmakedefine SIZEOF_UINT @SIZEOF_UINT@ #cmakedefine SIZEOF_UINT @SIZEOF_UINT@
#if SIZEOF_UINT #cmakedefine HAVE_UINT 1
#define HAVE_UINT 1
#endif
#cmakedefine SIZEOF_ULONG @SIZEOF_ULONG@ #cmakedefine SIZEOF_ULONG @SIZEOF_ULONG@
#if SIZEOF_ULONG #cmakedefine HAVE_ULONG 1
#define HAVE_ULONG 1
#endif
#cmakedefine SIZEOF_INT8 @SIZEOF_INT8@ #cmakedefine SIZEOF_INT8 @SIZEOF_INT8@
#if SIZEOF_INT8 #cmakedefine HAVE_INT8 1
#define HAVE_INT8 1
#endif
#cmakedefine SIZEOF_UINT8 @SIZEOF_UINT8@ #cmakedefine SIZEOF_UINT8 @SIZEOF_UINT8@
#if SIZEOF_UINT8 #cmakedefine HAVE_UINT8 1
#define HAVE_UINT8 1
#endif
#cmakedefine SIZEOF_INT16 @SIZEOF_INT16@ #cmakedefine SIZEOF_INT16 @SIZEOF_INT16@
#if SIZEOF_INT16 #cmakedefine HAVE_INT16 1
# define HAVE_INT16 1
#endif
#cmakedefine SIZEOF_UINT16 @SIZEOF_UINT16@ #cmakedefine SIZEOF_UINT16 @SIZEOF_UINT16@
#if SIZEOF_UINT16 #cmakedefine HAVE_UINT16 1
#define HAVE_UINT16 1
#endif
#cmakedefine SIZEOF_INT32 @SIZEOF_INT32@ #cmakedefine SIZEOF_INT32 @SIZEOF_INT32@
#if SIZEOF_INT32 #cmakedefine HAVE_INT32 1
#define HAVE_INT32 1
#endif
#cmakedefine SIZEOF_UINT32 @SIZEOF_UINT32@ #cmakedefine SIZEOF_UINT32 @SIZEOF_UINT32@
#if SIZEOF_UINT32 #cmakedefine HAVE_UINT32 1
#define HAVE_UINT32 1
#endif
#cmakedefine SIZEOF_U_INT32_T @SIZEOF_U_INT32_T@ #cmakedefine SIZEOF_U_INT32_T @SIZEOF_U_INT32_T@
#if SIZEOF_U_INT32_T #cmakedefine HAVE_U_INT32_T 1
#define HAVE_U_INT32_T 1
#endif
#cmakedefine SIZEOF_INT64 @SIZEOF_INT64@ #cmakedefine SIZEOF_INT64 @SIZEOF_INT64@
#if SIZEOF_INT64 #cmakedefine HAVE_INT64 1
#define HAVE_INT64 1
#endif
#cmakedefine SIZEOF_UINT64 @SIZEOF_UINT64@ #cmakedefine SIZEOF_UINT64 @SIZEOF_UINT64@
#if SIZEOF_UINT64 #cmakedefine HAVE_UINT64 1
#define HAVE_UINT64 1 #cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
#endif #cmakedefine HAVE_BOOL 1
#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@ #cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@
#cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
#if SIZEOF_BOOL
#define HAVE_BOOL 1
#endif
#cmakedefine HAVE_MBSTATE_T #cmakedefine HAVE_MBSTATE_T
#define MAX_INDEXES 64 #define MAX_INDEXES 64
#cmakedefine QSORT_TYPE_IS_VOID 1 #cmakedefine QSORT_TYPE_IS_VOID 1
#define RETQSORTTYPE void #cmakedefine RETQSORTTYPE @RETQSORTTYPE@
#cmakedefine SIGNAL_RETURN_TYPE_IS_VOID 1 #cmakedefine SIGNAL_RETURN_TYPE_IS_VOID 1
#define RETSIGTYPE void #cmakedefine RETSIGTYPE @RETSIGTYPE@
#if SIGNAL_RETURN_TYPE_IS_VOID #cmakedefine VOID_SIGHANDLER 1
#define VOID_SIGHANDLER 1
#endif
#define STRUCT_RLIMIT struct rlimit #define STRUCT_RLIMIT struct rlimit
#ifdef __APPLE__ #ifdef __APPLE__
...@@ -547,7 +491,7 @@ ...@@ -547,7 +491,7 @@
#cmakedefine strtoull @strtoull@ #cmakedefine strtoull @strtoull@
#cmakedefine vsnprintf @vsnprintf@ #cmakedefine vsnprintf @vsnprintf@
#if (_MSC_VER > 1310) #if (_MSC_VER > 1310)
#define HAVE_SETENV # define HAVE_SETENV
#define setenv(a,b,c) _putenv_s(a,b) #define setenv(a,b,c) _putenv_s(a,b)
#endif #endif
...@@ -575,7 +519,7 @@ ...@@ -575,7 +519,7 @@
#cmakedefine FN_NO_CASE_SENSE 1 #cmakedefine FN_NO_CASE_SENSE 1
#cmakedefine HAVE_CHARSET_armscii8 1 #cmakedefine HAVE_CHARSET_armscii8 1
#cmakedefine HAVE_CHARSET_ascii #cmakedefine HAVE_CHARSET_ascii 1
#cmakedefine HAVE_CHARSET_big5 1 #cmakedefine HAVE_CHARSET_big5 1
#cmakedefine HAVE_CHARSET_cp1250 1 #cmakedefine HAVE_CHARSET_cp1250 1
#cmakedefine HAVE_CHARSET_cp1251 1 #cmakedefine HAVE_CHARSET_cp1251 1
...@@ -637,7 +581,7 @@ ...@@ -637,7 +581,7 @@
#cmakedefine WITH_PERFSCHEMA_STORAGE_ENGINE 1 #cmakedefine WITH_PERFSCHEMA_STORAGE_ENGINE 1
#cmakedefine WITH_NDBCLUSTER_STORAGE_ENGINE 1 #cmakedefine WITH_NDBCLUSTER_STORAGE_ENGINE 1
#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY) #if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
#define HAVE_NDB_BINLOG 1 # define HAVE_NDB_BINLOG 1
#endif #endif
#cmakedefine DEFAULT_MYSQL_HOME "@DEFAULT_MYSQL_HOME@" #cmakedefine DEFAULT_MYSQL_HOME "@DEFAULT_MYSQL_HOME@"
......
...@@ -90,6 +90,13 @@ ENDIF(WITHOUT_DYNAMIC_PLUGINS) ...@@ -90,6 +90,13 @@ ENDIF(WITHOUT_DYNAMIC_PLUGINS)
# Large files, common flag # Large files, common flag
SET(_LARGEFILE_SOURCE 1) SET(_LARGEFILE_SOURCE 1)
# If finds the size of a type, set SIZEOF_<type> and HAVE_<type>
FUNCTION(MY_CHECK_TYPE_SIZE type defbase)
CHECK_TYPE_SIZE("${type}" SIZEOF_${defbase})
IF(SIZEOF_${defbase})
SET(HAVE_${defbase} 1 PARENT_SCOPE)
ENDIF()
ENDFUNCTION()
# Searches function in libraries # Searches function in libraries
# if function is found, sets output parameter result to the name of the library # if function is found, sets output parameter result to the name of the library
...@@ -108,6 +115,7 @@ FUNCTION(MY_SEARCH_LIBS func libs result) ...@@ -108,6 +115,7 @@ FUNCTION(MY_SEARCH_LIBS func libs result)
CHECK_LIBRARY_EXISTS(${lib} ${func} "" HAVE_${func}_IN_${lib}) CHECK_LIBRARY_EXISTS(${lib} ${func} "" HAVE_${func}_IN_${lib})
IF(HAVE_${func}_IN_${lib}) IF(HAVE_${func}_IN_${lib})
SET(${result} ${lib} PARENT_SCOPE) SET(${result} ${lib} PARENT_SCOPE)
SET(HAVE_${result} 1 PARENT_SCOPE)
RETURN() RETURN()
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
...@@ -169,6 +177,7 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H) ...@@ -169,6 +177,7 @@ CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H)
CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H) CHECK_INCLUDE_FILES (aio.h HAVE_AIO_H)
CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H) CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H)
CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H) CHECK_INCLUDE_FILES (crypt.h HAVE_CRYPT_H)
CHECK_INCLUDE_FILES (cxxabi.h HAVE_CXXABI_H)
CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H) CHECK_INCLUDE_FILES (dirent.h HAVE_DIRENT_H)
CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H) CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H)
CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H) CHECK_INCLUDE_FILES (execinfo.h HAVE_EXECINFO_H)
...@@ -195,7 +204,6 @@ CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H) ...@@ -195,7 +204,6 @@ CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H)
CHECK_INCLUDE_FILES (semaphore.h HAVE_SEMAPHORE_H) CHECK_INCLUDE_FILES (semaphore.h HAVE_SEMAPHORE_H)
CHECK_INCLUDE_FILES (sys/dir.h HAVE_SYS_DIR_H) CHECK_INCLUDE_FILES (sys/dir.h HAVE_SYS_DIR_H)
CHECK_INCLUDE_FILES (sys/pte.h HAVE_SYS_PTE_H) CHECK_INCLUDE_FILES (sys/pte.h HAVE_SYS_PTE_H)
CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H)
CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H) CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H)
CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H) CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H)
...@@ -235,6 +243,13 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H) ...@@ -235,6 +243,13 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H)
CHECK_INCLUDE_FILES (stdarg.h HAVE_STDARG_H) CHECK_INCLUDE_FILES (stdarg.h HAVE_STDARG_H)
CHECK_INCLUDE_FILES("stdlib.h;sys/un.h" HAVE_SYS_UN_H) CHECK_INCLUDE_FILES("stdlib.h;sys/un.h" HAVE_SYS_UN_H)
IF(HAVE_SYS_STREAM_H)
# Needs sys/stream.h on Solaris
CHECK_INCLUDE_FILES (sys/stream.h sys/ptem.h HAVE_SYS_PTEM_H)
ELSE()
CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H)
ENDIF()
# Figure out threading library # Figure out threading library
# #
FIND_PACKAGE (Threads) FIND_PACKAGE (Threads)
...@@ -458,14 +473,11 @@ set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ...@@ -458,14 +473,11 @@ set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
-D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS) -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS)
SET(CMAKE_EXTRA_INCLUDE_FILES signal.h) SET(CMAKE_EXTRA_INCLUDE_FILES signal.h)
CHECK_TYPE_SIZE(sigset_t SIZEOF_SIGSET_T) MY_CHECK_TYPE_SIZE(sigset_t SIGSET_T)
IF(SIZEOF_SIGSET_T)
SET(HAVE_SIGSET_T 1)
ENDIF()
IF(NOT SIZEOF_SIGSET_T) IF(NOT SIZEOF_SIGSET_T)
SET(sigset_t int) SET(sigset_t int)
ENDIF() ENDIF()
CHECK_TYPE_SIZE(mode_t SIZEOF_MODE_T) MY_CHECK_TYPE_SIZE(mode_t MODE_T)
IF(NOT SIZEOF_MODE_T) IF(NOT SIZEOF_MODE_T)
SET(mode_t int) SET(mode_t int)
ENDIF() ENDIF()
...@@ -478,43 +490,41 @@ ENDIF(HAVE_STDINT_H) ...@@ -478,43 +490,41 @@ ENDIF(HAVE_STDINT_H)
IF(NOT APPLE) IF(NOT APPLE)
# Prevent some checks on OSX, they return ambigious results # Prevent some checks on OSX, they return ambigious results
# on universal 32/64 bit binariess # on universal 32/64 bit binariess
CHECK_TYPE_SIZE("char *" SIZEOF_CHARP) MY_CHECK_TYPE_SIZE("void *" VOIDP)
CHECK_TYPE_SIZE(long SIZEOF_LONG) MY_CHECK_TYPE_SIZE("char *" CHARP)
CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T) MY_CHECK_TYPE_SIZE(long LONG)
MY_CHECK_TYPE_SIZE(size_t SIZE_T)
ENDIF() ENDIF()
CHECK_TYPE_SIZE(char SIZEOF_CHAR) MY_CHECK_TYPE_SIZE(char CHAR)
CHECK_TYPE_SIZE(short SIZEOF_SHORT) MY_CHECK_TYPE_SIZE(short SHORT)
CHECK_TYPE_SIZE(int SIZEOF_INT) MY_CHECK_TYPE_SIZE(int INT)
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG) MY_CHECK_TYPE_SIZE("long long" LONG_LONG)
SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h sys/types.h) SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h sys/types.h)
CHECK_TYPE_SIZE(off_t SIZEOF_OFF_T) MY_CHECK_TYPE_SIZE(off_t OFF_T)
CHECK_TYPE_SIZE(uchar SIZEOF_UCHAR) MY_CHECK_TYPE_SIZE(uchar UCHAR)
CHECK_TYPE_SIZE(uint SIZEOF_UINT) MY_CHECK_TYPE_SIZE(uint UINT)
CHECK_TYPE_SIZE(ulong SIZEOF_ULONG) MY_CHECK_TYPE_SIZE(ulong ULONG)
CHECK_TYPE_SIZE(int8 SIZEOF_INT8) MY_CHECK_TYPE_SIZE(int8 INT8)
CHECK_TYPE_SIZE(uint8 SIZEOF_UINT8) MY_CHECK_TYPE_SIZE(uint8 UINT8)
CHECK_TYPE_SIZE(int16 SIZEOF_INT16) MY_CHECK_TYPE_SIZE(int16 INT16)
CHECK_TYPE_SIZE(uint16 SIZEOF_UINT16) MY_CHECK_TYPE_SIZE(uint16 UINT16)
CHECK_TYPE_SIZE(int32 SIZEOF_INT32) MY_CHECK_TYPE_SIZE(int32 INT32)
CHECK_TYPE_SIZE(uint32 SIZEOF_UINT32) MY_CHECK_TYPE_SIZE(uint32 UINT32)
CHECK_TYPE_SIZE(u_int32_t SIZEOF_U_INT32_T) MY_CHECK_TYPE_SIZE(u_int32_t U_INT32_T)
CHECK_TYPE_SIZE(int64 SIZEOF_INT64) MY_CHECK_TYPE_SIZE(int64 INT64)
CHECK_TYPE_SIZE(uint64 SIZEOF_UINT64) MY_CHECK_TYPE_SIZE(uint64 UINT64)
SET (CMAKE_EXTRA_INCLUDE_FILES sys/types.h) SET (CMAKE_EXTRA_INCLUDE_FILES sys/types.h)
CHECK_TYPE_SIZE(bool SIZEOF_BOOL) MY_CHECK_TYPE_SIZE(bool BOOL)
SET(CMAKE_EXTRA_INCLUDE_FILES) SET(CMAKE_EXTRA_INCLUDE_FILES)
IF(HAVE_SYS_SOCKET_H) IF(HAVE_SYS_SOCKET_H)
SET(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) SET(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
ENDIF(HAVE_SYS_SOCKET_H) ENDIF(HAVE_SYS_SOCKET_H)
CHECK_TYPE_SIZE(socklen_t SIZEOF_SOCKLEN_T) MY_CHECK_TYPE_SIZE(socklen_t SOCKLEN_T)
SET(CMAKE_EXTRA_INCLUDE_FILES) SET(CMAKE_EXTRA_INCLUDE_FILES)
IF(HAVE_IEEEFP_H) IF(HAVE_IEEEFP_H)
SET(CMAKE_EXTRA_INCLUDE_FILES ieeefp.h) SET(CMAKE_EXTRA_INCLUDE_FILES ieeefp.h)
CHECK_TYPE_SIZE(fp_except SIZEOF_FP_EXCEPT) MY_CHECK_TYPE_SIZE(fp_except FP_EXCEPT)
IF(SIZEOF_FP_EXCEPT)
SET(HAVE_FP_EXCEPT TRUE)
ENDIF()
ENDIF() ENDIF()
...@@ -678,6 +688,7 @@ int main(int ac, char **av) {} ...@@ -678,6 +688,7 @@ int main(int ac, char **av) {}
" SIGNAL_RETURN_TYPE_IS_VOID) " SIGNAL_RETURN_TYPE_IS_VOID)
IF(SIGNAL_RETURN_TYPE_IS_VOID) IF(SIGNAL_RETURN_TYPE_IS_VOID)
SET(RETSIGTYPE void) SET(RETSIGTYPE void)
SET(VOID_SIGHANDLER 1)
ELSE(SIGNAL_RETURN_TYPE_IS_VOID) ELSE(SIGNAL_RETURN_TYPE_IS_VOID)
SET(RETSIGTYPE int) SET(RETSIGTYPE int)
ENDIF(SIGNAL_RETURN_TYPE_IS_VOID) ENDIF(SIGNAL_RETURN_TYPE_IS_VOID)
...@@ -777,7 +788,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS) ...@@ -777,7 +788,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS)
# Assume regular sprintf # Assume regular sprintf
SET(SPRINTFS_RETURNS_INT 1) SET(SPRINTFS_RETURNS_INT 1)
IF(CMAKE_COMPILER_IS_GNUXX) IF(CMAKE_COMPILER_IS_GNUXX AND HAVE_CXXABI_H)
CHECK_CXX_SOURCE_COMPILES(" CHECK_CXX_SOURCE_COMPILES("
#include <cxxabi.h> #include <cxxabi.h>
int main(int argc, char **argv) int main(int argc, char **argv)
...@@ -787,9 +798,6 @@ CHECK_CXX_SOURCE_COMPILES(" ...@@ -787,9 +798,6 @@ CHECK_CXX_SOURCE_COMPILES("
return 0; return 0;
}" }"
HAVE_ABI_CXA_DEMANGLE) HAVE_ABI_CXA_DEMANGLE)
IF(HAVE_ABI_CXA_DEMANGLE)
SET(HAVE_CXXABI_H 1)
ENDIF()
ENDIF() ENDIF()
CHECK_C_SOURCE_COMPILES(" CHECK_C_SOURCE_COMPILES("
...@@ -983,14 +991,8 @@ ELSEIF(WIN32) ...@@ -983,14 +991,8 @@ ELSEIF(WIN32)
SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} winsock2.h ws2ipdef.h) SET(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} winsock2.h ws2ipdef.h)
ENDIF() ENDIF()
CHECK_TYPE_SIZE("struct sockaddr_in6" SIZEOF_SOCKADDR_IN6) MY_CHECK_TYPE_SIZE("struct sockaddr_in6" SOCKADDR_IN6)
CHECK_TYPE_SIZE("struct in6_addr" SIZEOF_IN6_ADDR) MY_CHECK_TYPE_SIZE("struct in6_addr" IN6_ADDR)
IF(SIZEOF_SOCKADDR_IN6)
SET(HAVE_STRUCT_SOCKADDR_IN6 1)
ENDIF()
IF(SIZEOF_IN6_ADDR)
SET(HAVE_STRUCT_IN6_ADDR 1)
ENDIF()
IF(HAVE_STRUCT_SOCKADDR_IN6 OR HAVE_STRUCT_IN6_ADDR) IF(HAVE_STRUCT_SOCKADDR_IN6 OR HAVE_STRUCT_IN6_ADDR)
SET(HAVE_IPV6 TRUE CACHE INTERNAL "") SET(HAVE_IPV6 TRUE CACHE INTERNAL "")
......
...@@ -24,6 +24,8 @@ ${CMAKE_SOURCE_DIR}/storage/ndb/include/ndbapi ...@@ -24,6 +24,8 @@ ${CMAKE_SOURCE_DIR}/storage/ndb/include/ndbapi
${CMAKE_SOURCE_DIR}/storage/ndb/include/portlib ${CMAKE_SOURCE_DIR}/storage/ndb/include/portlib
${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmapi) ${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmapi)
# Default install component for the files is Server here
SET(MYSQL_INSTALL_COMPONENT Server)
IF(NOT CMAKE_CROSSCOMPILING) IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(comp_err comp_err.c) ADD_EXECUTABLE(comp_err comp_err.c)
......
...@@ -57,7 +57,7 @@ SET(HEADERS ...@@ -57,7 +57,7 @@ SET(HEADERS
${HEADERS_GEN_CONFIGURE} ${HEADERS_GEN_CONFIGURE}
) )
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR}) INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h") INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development FILES_MATCHING PATTERN "*.h" )
...@@ -152,7 +152,7 @@ SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES}) ...@@ -152,7 +152,7 @@ SET(LIBS clientlib dbug strings vio mysys ${ZLIB_LIBRARY} ${SSL_LIBRARIES})
# Merge several convenience libraries into one big mysqlclient # Merge several convenience libraries into one big mysqlclient
# and link them together into shared library. # and link them together into shared library.
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS}) MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
# Visual Studio users need debug static library for debug projects # Visual Studio users need debug static library for debug projects
IF(MSVC) IF(MSVC)
...@@ -171,11 +171,11 @@ IF(UNIX) ...@@ -171,11 +171,11 @@ IF(UNIX)
SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION}) SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR}) INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
ENDIF() ENDIF()
IF(NOT DISABLE_SHARED) IF(NOT DISABLE_SHARED)
MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS}) MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} COMPONENT SharedLibraries)
IF(UNIX) IF(UNIX)
# libtool compatability # libtool compatability
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
...@@ -209,7 +209,7 @@ IF(NOT DISABLE_SHARED) ...@@ -209,7 +209,7 @@ IF(NOT DISABLE_SHARED)
"${CMAKE_SHARED_LIBRARY_SUFFIX}" "${CMAKE_SHARED_LIBRARY_SUFFIX}"
"" ""
linkname) linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR}) INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS) LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
FOREACH(ver ${OS_SHARED_LIB_SYMLINKS}) FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
...@@ -218,7 +218,7 @@ IF(NOT DISABLE_SHARED) ...@@ -218,7 +218,7 @@ IF(NOT DISABLE_SHARED)
"${CMAKE_SHARED_LIBRARY_SUFFIX}" "${CMAKE_SHARED_LIBRARY_SUFFIX}"
"${ver}" "${ver}"
linkname) linkname)
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR}) INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
ENDIF() ENDIF()
...@@ -124,7 +124,7 @@ FOREACH(LIB ${LIBS}) ...@@ -124,7 +124,7 @@ FOREACH(LIB ${LIBS})
ENDFOREACH() ENDFOREACH()
MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS} MERGE_LIBRARIES(mysqlserver STATIC ${EMBEDDED_LIBS}
OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME}) OUTPUT_NAME ${MYSQLSERVER_OUTPUT_NAME} COMPONENT Embedded)
# Visual Studio users need debug static library # Visual Studio users need debug static library
IF(MSVC) IF(MSVC)
...@@ -137,5 +137,6 @@ IF(UNIX) ...@@ -137,5 +137,6 @@ IF(UNIX)
ENDIF() ENDIF()
IF(MSVC AND NOT DISABLE_SHARED) IF(MSVC AND NOT DISABLE_SHARED)
MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS}) MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS}
COMPONENT Embedded)
ENDIF() ENDIF()
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
INSTALL( INSTALL(
DIRECTORY . DIRECTORY .
DESTINATION ${INSTALL_MYSQLTESTDIR} DESTINATION ${INSTALL_MYSQLTESTDIR}
COMPONENT Test
PATTERN "var/" EXCLUDE PATTERN "var/" EXCLUDE
PATTERN "lib/My/SafeProcess" EXCLUDE PATTERN "lib/My/SafeProcess" EXCLUDE
PATTERN "lib/t*" EXCLUDE PATTERN "lib/t*" EXCLUDE
......
...@@ -13,15 +13,20 @@ ...@@ -13,15 +13,20 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SET(INSTALL_ARGS
DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess"
COMPONENT Test
)
IF (WIN32) IF (WIN32)
ADD_EXECUTABLE(my_safe_process safe_process_win.cc) MYSQL_ADD_EXECUTABLE(my_safe_process safe_process_win.cc ${INSTALL_ARGS})
ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc) MYSQL_ADD_EXECUTABLE(my_safe_kill safe_kill_win.cc ${INSTALL_ARGS})
ELSE() ELSE()
ADD_EXECUTABLE(my_safe_process safe_process.cc) MYSQL_ADD_EXECUTABLE(my_safe_process safe_process.cc ${INSTALL_ARGS})
ENDIF() ENDIF()
INSTALL(TARGETS my_safe_process DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess") INSTALL(TARGETS my_safe_process DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
IF(WIN32) IF(WIN32)
INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess") INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
ENDIF() ENDIF()
INSTALL(FILES safe_process.pl Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess") INSTALL(FILES safe_process.pl Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
...@@ -93,10 +93,6 @@ my_bool my_basic_init(void) ...@@ -93,10 +93,6 @@ my_bool my_basic_init(void)
my_umask_dir= (int) (atoi_octal(str) | 0700); my_umask_dir= (int) (atoi_octal(str) | 0700);
#endif #endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
init_glob_errs(); init_glob_errs();
instrumented_stdin.m_file= stdin; instrumented_stdin.m_file= stdin;
...@@ -122,6 +118,10 @@ my_bool my_basic_init(void) ...@@ -122,6 +118,10 @@ my_bool my_basic_init(void)
return 1; return 1;
#endif #endif
/* $HOME is needed early to parse configuration files located in ~/ */
if ((home_dir= getenv("HOME")) != 0)
home_dir= intern_filename(home_dir_buff, home_dir);
return 0; return 0;
} }
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
# Copyright 2010, Oracle and/or its affiliates. All rights reserved.
#
# 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
IF(NOT WIN32)
RETURN()
ENDIF()
FIND_PATH(WIX_DIR heat.exe
$ENV{WIX_DIR}/bin
$ENV{ProgramFiles}/wix/bin
"$ENV{ProgramFiles}/Windows Installer XML v3/bin"
"$ENV{ProgramFiles}/Windows Installer XML v3.5/bin"
)
IF(NOT WIX_DIR)
IF(NOT _WIX_DIR_CHECKED)
SET(_WIX_DIR_CHECKED 1 CACHE INTERNAL "")
MESSAGE(STATUS "Cannot find wix 3, installer project will not be generated")
ENDIF()
RETURN()
ENDIF()
ADD_SUBDIRECTORY(ca)
# extra.wxs.in needs DATADIR_MYSQL_FILES and DATADIR_PERFORMANCE_SCHEMA_FILES, i.e
# Wix-compatible file lists for ${builddir}\sql\data\{mysql,performance_schema}
FOREACH(dir mysql performance_schema)
FILE(GLOB files ${CMAKE_BINARY_DIR}/sql/data/${dir}/*)
SET(filelist)
FOREACH(f ${files})
FILE(TO_NATIVE_PATH "${f}" file_native_path)
GET_FILENAME_COMPONENT(file_name "${f}" NAME)
SET(filelist
"${filelist}
<File Id='${file_name}' Source='${file_native_path}'/>")
ENDFOREACH()
STRING(TOUPPER ${dir} DIR_UPPER)
SET(DATADIR_${DIR_UPPER}_FILES "${filelist}")
ENDFOREACH()
FIND_PROGRAM(HEAT_EXECUTABLE heat ${WIX_DIR})
FIND_PROGRAM(CANDLE_EXECUTABLE candle ${WIX_DIR})
FIND_PROGRAM(LIGHT_EXECUTABLE light ${WIX_DIR})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/create_msi.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
@ONLY)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(WixWin64 " Win64='yes'")
ELSE()
SET(WixWin64)
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/extra.wxs.in
${CMAKE_CURRENT_BINARY_DIR}/extra.wxs)
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_CFG_INTDIR}")
ENDIF()
# WiX wants the license text as rtf; if there is no rtf license,
# we create a fake one from the plain text COPYING file.
IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.rtf")
MESSAGE("copying COPYING.rtf")
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/COPYING.rtf" CONTENTS)
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "${CONTENTS}")
ELSE()
MESSAGE("creating COPYING.rtf")
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/../../COPYING" CONTENTS)
STRING(REGEX REPLACE "\n" "\\\\par\n" CONTENTS "${CONTENTS}")
STRING(REGEX REPLACE "\t" "\\\\tab" CONTENTS "${CONTENTS}")
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 Courier New;}}\\viewkind4\\uc1\\pard\\lang1031\\f0\\fs15")
FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "${CONTENTS}")
FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/COPYING.rtf" "\n}\n")
ENDIF()
ADD_CUSTOM_TARGET(
MSI
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND}
-DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake
-DCPACK_WIX_INCLUDE=${CMAKE_CURRENT_BINARY_DIR}/extra.wxs
${CONFIG_PARAM}
-P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
ADD_DEPENDENCIES(MSI wixca)
ADD_CUSTOM_TARGET(
MSI_ESSENTIALS
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND} -DESSENTIALS=1
-DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake
-DCPACK_WIX_INCLUDE=${CMAKE_CURRENT_BINARY_DIR}/extra.wxs
${CONFIG_PARAM}
-P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
ADD_DEPENDENCIES(MSI wixca)
IF(ESSENTIALS)
MESSAGE("Essentials!")
SET(CPACK_COMPONENTS_USED "Server;Client;DataFiles")
SET(CPACK_WIX_UI "WixUI_InstallDir")
MATH(EXPR bits ${CMAKE_SIZEOF_VOID_P}*8)
SET(CPACK_PACKAGE_FILE_NAME "mysql-essentials-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH}-win${bits}")
ELSE()
SET(CPACK_COMPONENTS_USED
"Server;Client;DataFiles;Development;SharedLibraries;Embedded;Debuginfo;Documentation;IniFiles;Readme;Server_Scripts")
ENDIF()
# Some components like Embedded are optional
# We will build MSI without embedded if it was not selected for build
#(need to modify CPACK_COMPONENTS_ALL for that)
SET(CPACK_ALL)
FOREACH(comp1 ${CPACK_COMPONENTS_USED})
SET(found)
FOREACH(comp2 ${CPACK_COMPONENTS_ALL})
IF(comp1 STREQUAL comp2)
SET(found 1)
BREAK()
ENDIF()
ENDFOREACH()
IF(found)
SET(CPACK_ALL ${CPACK_ALL} ${comp1})
ENDIF()
ENDFOREACH()
SET(CPACK_COMPONENTS_ALL ${CPACK_ALL})
# Always install (hidden), includes Readme files
SET(CPACK_COMPONENT_GROUP_ALWAYSINSTALL_HIDDEN 1)
SET(CPACK_COMPONENT_README_GROUP "AlwaysInstall")
# Feature MySQL Server
SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DISPLAY_NAME "MySQL Server")
SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_EXPANDED "1")
SET(CPACK_COMPONENT_GROUP_MYSQLSERVER_DESCRIPTION "Install MySQL Server")
# Subfeature "Server" (hidden)
SET(CPACK_COMPONENT_SERVER_GROUP "MySQLServer")
SET(CPACK_COMPONENT_SERVER_HIDDEN 1)
# Subfeature "Client"
SET(CPACK_COMPONENT_CLIENT_GROUP "MySQLServer")
SET(CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client Programs")
SET(CPACK_COMPONENT_CLIENT_DESCRIPTION
"Various helpful (commandline) tools including the mysql command line client" )
#Subfeature "Data Files"
SET(CPACK_COMPONENT_DATAFILES_GROUP "MySQLServer")
SET(CPACK_COMPONENT_DATAFILES_DISPLAY_NAME "Server data files")
SET(CPACK_COMPONENT_DATAFILES_DESCRIPTION "Server data files" )
#Feature "Devel"
SET(CPACK_COMPONENT_GROUP_DEVEL_DISPLAY_NAME "Development Components")
SET(CPACK_COMPONENT_GROUP_DEVEL_DESCRIPTION "Installs C/C++ header files and libraries")
#Subfeature "Development"
SET(CPACK_COMPONENT_DEVELOPMENT_GROUP "Devel")
SET(CPACK_COMPONENT_DEVELOPMENT_HIDDEN 1)
#Subfeature "Shared libraries"
SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "Devel")
SET(CPACK_COMPONENT_SHAREDLIBRARIES_DISPLAY_NAME "Client C API library (shared)")
SET(CPACK_COMPONENT_SHAREDLIBRARIES_DESCRIPTION "Installs shared client library")
#Subfeature "Embedded"
SET(CPACK_COMPONENT_EMBEDDED_GROUP "Devel")
SET(CPACK_COMPONENT_EMBEDDED_DISPLAY_NAME "Embedded server library")
SET(CPACK_COMPONENT_EMBEDDED_DESCRIPTION "Installs embedded server library")
SET(CPACK_COMPONENT_EMBEDDED_WIX_LEVEL 2)
#Feature Debug Symbols
SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DISPLAY_NAME "Debug Symbols")
SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_DESCRIPTION "Installs Debug Symbols")
SET(CPACK_COMPONENT_GROUP_DEBUGSYMBOLS_WIX_LEVEL 2)
SET(CPACK_COMPONENT_DEBUGINFO_GROUP "DebugSymbols")
SET(CPACK_COMPONENT_DEBUGINFO_HIDDEN 1)
#Feature Documentation
SET(CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "Documentation")
SET(CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION "Installs documentation")
SET(CPACK_COMPONENT_DOCUMENTATION_WIX_LEVEL 2)
#Feature tests
SET(CPACK_COMPONENT_TEST_DISPLAY_NAME "Tests")
SET(CPACK_COMPONENT_TEST_DESCRIPTION "Installs unittests (requires Perl to run)")
SET(CPACK_COMPONENT_TEST_WIX_LEVEL 2)
#Feature Misc (hidden, installs only if everything is installed)
SET(CPACK_COMPONENT_GROUP_MISC_HIDDEN 1)
SET(CPACK_COMPONENT_GROUP_MISC_WIX_LEVEL 100)
SET(CPACK_COMPONENT_INIFILES_GROUP "Misc")
SET(CPACK_COMPONENT_SERVER_SCRIPTS_GROUP "Misc")
# Copyright 2010, Oracle and/or its affiliates. All rights reserved.
#
# 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
INCLUDE_DIRECTORIES(${WIX_DIR}/../SDK/inc)
LINK_DIRECTORIES(${WIX_DIR}/../SDK/lib)
SET(WIXCA_SOURCES CustomAction.cpp CustomAction.rc CustomAction.def)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
LINK_LIBRARIES(wcautil_x64 dutil_x64 msi version)
ELSE()
LINK_LIBRARIES(wcautil dutil msi version)
ENDIF()
ADD_LIBRARY(wixca SHARED ${WIXCA_SOURCES})
/* Copyright 2010, Oracle and/or its affiliates. All rights reserved.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#ifndef UNICODE
#define UNICODE
#endif
#include <windows.h>
#include <winreg.h>
#include <msi.h>
#include <msiquery.h>
#include <wcautil.h>
#include <string.h>
#include <strsafe.h>
/*
* Search the registry for a service whose ImagePath starts
* with our install directory. Stop and remove it if requested.
*/
static TCHAR last_service_name[128];
int remove_service(TCHAR *installdir, int check_only) {
HKEY hKey;
int done = 0;
if(wcslen(installdir) < 3) {
WcaLog(LOGMSG_STANDARD, "INSTALLDIR is suspiciously short, better not do anything.");
return 0;
}
if(check_only == 0) {
WcaLog(LOGMSG_STANDARD, "Determining number of matching services...");
int servicecount = remove_service(installdir, 1);
if(servicecount <= 0) {
WcaLog(LOGMSG_STANDARD, "No services found, not removing anything.");
return 0;
} else if(servicecount == 1) {
TCHAR buf[256];
swprintf_s(buf, sizeof(buf), TEXT("There is a service called '%ls' set up to run from this installation. Do you wish me to stop and remove that service?"), last_service_name);
int rc = MessageBox(NULL, buf, TEXT("Removing MySQL Server"), MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
if(rc == IDCANCEL) return -1;
if(rc != IDYES) return 0;
} else if(servicecount > 0) {
TCHAR buf[256];
swprintf_s(buf, sizeof(buf), TEXT("There appear to be %d services set up to run from this installation. Do you wish me to stop and remove those services?"), servicecount);
int rc = MessageBox(NULL, buf, TEXT("Removing MySQL Server"), MB_ICONQUESTION|MB_YESNOCANCEL|MB_SYSTEMMODAL);
if(rc == IDCANCEL) return -1;
if(rc != IDYES) return 0;
}
}
if(check_only == -1) check_only = 0;
WcaLog(LOGMSG_STANDARD, "Looking for service...");
WcaLog(LOGMSG_STANDARD, "INSTALLDIR = %ls", installdir);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\services"), 0, KEY_READ, &hKey)==ERROR_SUCCESS) {
DWORD index = 0;
TCHAR keyname[1024];
DWORD keylen = sizeof(keyname);
FILETIME t;
/* Go through all services in the registry */
while(RegEnumKeyExW(hKey, index, keyname, &keylen, NULL, NULL, NULL, &t) == ERROR_SUCCESS) {
HKEY hServiceKey = 0;
TCHAR path[1024];
DWORD pathlen = sizeof(path)-1;
if (RegOpenKeyExW(hKey, keyname, NULL, KEY_READ, &hServiceKey) == ERROR_SUCCESS) {
/* Look at the ImagePath value of each service */
if (RegQueryValueExW(hServiceKey, TEXT("ImagePath"), NULL, NULL, (LPBYTE)path, &pathlen) == ERROR_SUCCESS) {
path[pathlen] = 0;
TCHAR *p = path;
if(p[0] == '"') p += 1;
/* See if it is similar to our install directory */
if(wcsncmp(p, installdir, wcslen(installdir)) == 0) {
WcaLog(LOGMSG_STANDARD, "Found service '%ls' with ImagePath '%ls'.", keyname, path);
swprintf_s(last_service_name, sizeof(last_service_name), TEXT("%ls"), keyname);
/* If we are supposed to stop and remove the service... */
if(!check_only) {
WcaLog(LOGMSG_STANDARD, "Trying to stop the service.");
SC_HANDLE hSCM = NULL;
hSCM = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
if(hSCM != NULL) {
SC_HANDLE hService = NULL;
hService = OpenService(hSCM, keyname, SERVICE_STOP|SERVICE_QUERY_STATUS|DELETE);
if(hService != NULL) {
WcaLog(LOGMSG_STANDARD, "Waiting for the service to stop...");
SERVICE_STATUS status;
/* Attempt to stop the service */
if(ControlService(hService, SERVICE_CONTROL_STOP, &status)) {
/* Now wait until it's stopped */
while("it's one big, mean and cruel world out there") {
if(!QueryServiceStatus(hService, &status)) break;
if(status.dwCurrentState == SERVICE_STOPPED) break;
Sleep(1000);
}
WcaLog(LOGMSG_STANDARD, "Stopped the service.");
}
/* Mark the service for deletion */
DeleteService(hService);
CloseServiceHandle(hService);
}
CloseServiceHandle(hSCM);
}
}
done++;
}
}
RegCloseKey(hServiceKey);
}
index++;
keylen = sizeof(keyname)-1;
}
RegCloseKey(hKey);
} else {
WcaLog(LOGMSG_STANDARD, "Can't seem to go through the list of installed services in the registry.");
}
return done;
}
UINT wrap(MSIHANDLE hInstall, char *name, int check_only) {
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, name);
ExitOnFailure(hr, "Failed to initialize");
WcaLog(LOGMSG_STANDARD, "Initialized.");
TCHAR INSTALLDIR[1024];
DWORD INSTALLDIR_size = sizeof(INSTALLDIR);
if(MsiGetPropertyW(hInstall, TEXT("CustomActionData"), INSTALLDIR, &INSTALLDIR_size) == ERROR_SUCCESS) {
int rc = remove_service(INSTALLDIR, check_only);
if(rc < 0) {
er = ERROR_CANCELLED;
}
} else {
er = ERROR_CANT_ACCESS_FILE;
}
LExit:
return WcaFinalize(er);
}
UINT __stdcall RemoveServiceNoninteractive(MSIHANDLE hInstall)
{
return wrap(hInstall, "RemoveServiceNoninteractive", -1);
}
UINT __stdcall RemoveService(MSIHANDLE hInstall)
{
return wrap(hInstall, "RemoveService", 0);
}
UINT __stdcall TestService(MSIHANDLE hInstall)
{
return wrap(hInstall, "TestService", 1);
}
/* DllMain - Initialize and cleanup WiX custom action utils */
extern "C" BOOL WINAPI DllMain(
__in HINSTANCE hInst,
__in ULONG ulReason,
__in LPVOID
)
{
switch(ulReason)
{
case DLL_PROCESS_ATTACH:
WcaGlobalInitialize(hInst);
break;
case DLL_PROCESS_DETACH:
WcaGlobalFinalize();
break;
}
return TRUE;
}
LIBRARY "wixca"
VERSION 1.0
EXPORTS
RemoveService
RemoveServiceNoninteractive
TestService
#include "afxres.h"
#undef APSTUDIO_READONLY_SYMBOLS
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
END
This diff is collapsed.
<Include xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!-- Datafiles that installation will copy to CommonAppData (initial database)
They are declared Permanent and NeverOverwrite since it is user data -->
<DirectoryRef Id='TARGETDIR'>
<Directory Id="CommonAppDataFolder">
<Directory Id="datadir.mysql" Name="MySQL">
<Directory Id="datadir.mysql.mysqlserver"
Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@">
<Directory Id="DATADIR" Name=".">
<Component Id="component.datadir" Guid="d3491319-5dbc-4477-95f3-4f809ef1dd2d">
<CreateFolder>
<util:PermissionEx User="[LogonUser]" GenericAll="yes" />
</CreateFolder>
</Component>
<Directory Id="datadir.mysql.mysqlserver.data" Name="data">
<Directory Id="datadir.mysql.mysqlserver.data.mysql" Name="mysql">
<Component Id="component.datadir.mysql"
Guid="19ec0f1f-1a7f-424e-a788-b09346c0a709"
Permanent="yes" NeverOverwrite="yes">
<CreateFolder>
<util:PermissionEx User="[LogonUser]" GenericAll="yes" />
</CreateFolder>
@DATADIR_MYSQL_FILES@
</Component>
</Directory>
<Directory Id="datadir.mysql.mysqlserver.data.performance_schema"
Name="performance_schema">
<Component Id="component.datadir.performance_schema"
Guid="af2a6776-2655-431f-a748-9e9f4645acc3"
Permanent="yes" NeverOverwrite="yes">
<CreateFolder>
<util:PermissionEx User="[LogonUser]" GenericAll="yes" />
</CreateFolder>
@DATADIR_PERFORMANCE_SCHEMA_FILES@
</Component>
</Directory>
<Directory Id="datadir.mysql.mysqlserver.data.test" Name="test">
<Component Id="component.datadir.test" Guid="52fa9f0a-fcd1-420a-b2ac-95a8f70ad20a">
<CreateFolder/>
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>
</DirectoryRef>
<Feature Id="UserEditableDatafiles" Level='1' Display='hidden' ConfigurableDirectory="DATADIR">
<ComponentRef Id="component.datadir"/>
<ComponentRef Id="component.datadir.mysql"/>
<ComponentRef Id="component.datadir.performance_schema"/>
<ComponentRef Id="component.datadir.test"/>
</Feature>
</Include>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product
Id="*"
UpgradeCode="49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3"
Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@"
Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@"
Language="1033"
Manufacturer="@MANUFACTURER@">
<Package Id='*'
Keywords='Installer'
Description="MySQL Database Server"
Manufacturer='@MANUFACTURER@'
InstallerVersion='200'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252'
Platform='@Platform@'/>
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' />
<!-- Upgrade -->
<Upgrade Id="49EB7A6A-1CEF-4A1E-9E89-B9A4993963E3">
<UpgradeVersion
Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.0"
IncludeMinimum="yes"
Maximum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@"
Property="OLDERVERSIONBEINGUPGRADED" />
<UpgradeVersion
Minimum="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@"
OnlyDetect="yes"
Property="NEWERVERSIONDETECTED" />
</Upgrade>
<Condition Message="A later version of [ProductName] is already installed. Setup will now exit.">
NOT NEWERVERSIONDETECTED OR Installed
</Condition>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize"/>
</InstallExecuteSequence>
<!-- UI -->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"></Property>
<UIRef Id="@CPACK_WIX_UI@" />
<UIRef Id="WixUI_ErrorProgressText" />
<WixVariable
Id="WixUIBannerBmp"
Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminHeader.jpg" />
<WixVariable
Id="WixUIDialogBmp"
Value="@CMAKE_CURRENT_SOURCE_DIR@/AdminBackground.jpg" />
<Icon
Id="icon.ico"
SourceFile="@CMAKE_CURRENT_SOURCE_DIR@/MySQLServer.ico"/>
<Property
Id="ARPPRODUCTICON"
Value="icon.ico" />
<!-- License -->
<WixVariable
Id="WixUILicenseRtf"
Value="@CMAKE_CURRENT_BINARY_DIR@/COPYING.rtf"/>
<!-- How to remove the service on uninstall -->
<Binary Id='wixca.dll' SourceFile='@CMAKE_CURRENT_BINARY_DIR@/ca/RelWithDebInfo/wixca.dll' />
<CustomAction Id="UnregisterProperty" Property="UnregisterService" Value="[INSTALLDIR]" Return="check" />
<CustomAction Id="UnregisterPropertySilent" Property="UnregisterServiceSilently" Value="[INSTALLDIR]" Return="check" />
<CustomAction Id="UnregisterService"
BinaryKey="wixca.dll"
DllEntry="RemoveService"
Execute="deferred"
Impersonate="no"
Return="check" />
<CustomAction Id="UnregisterServiceSilently"
BinaryKey="wixca.dll"
DllEntry="RemoveServiceNoninteractive"
Execute="deferred"
Impersonate="no"
Return="check" />
<InstallExecuteSequence>
<Custom Action="UnregisterProperty" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE</Custom>
<Custom Action="UnregisterPropertySilent" After="InstallInitialize">Installed And Not UPGRADINGPRODUCTCODE</Custom>
<Custom Action="UnregisterService" After="UnregisterProperty">Installed And Not UPGRADINGPRODUCTCODE And UILevel&gt;2</Custom>
<Custom Action="UnregisterServiceSilently" After="UnregisterPropertySilent">Installed And Not UPGRADINGPRODUCTCODE And UILevel&lt;=2</Custom>
</InstallExecuteSequence>
<!-- Installation root-->
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='@PlatformProgramFilesFolder@'>
<Directory Id='directory.MySQL' Name='MySQL'>
<Directory Id='INSTALLDIR' Name='MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@'>
</Directory>
</Directory>
</Directory>
</Directory>
<!-- CPACK_WIX_FEATURES -->
@CPACK_WIX_FEATURES@
<!-- CPACK_WIX_DIRECTORIES -->
@CPACK_WIX_DIRECTORIES@
<!--CPACK_WIX_COMPONENTS-->
@CPACK_WIX_COMPONENTS@
<!--CPACK_WIX_COMPONENTS_GROUPS -->
@CPACK_WIX_COMPONENT_GROUPS@
<!--CPACK_WIX_INCLUDES -->
@CPACK_WIX_INCLUDES@
</Product>
</Wix>
\ No newline at end of file
...@@ -13,4 +13,5 @@ ...@@ -13,4 +13,5 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MYSQL_ADD_PLUGIN(audit_null audit_null.c MODULE_ONLY) MYSQL_ADD_PLUGIN(audit_null audit_null.c
MODULE_ONLY MODULE_OUTPUT_NAME "adt_null")
...@@ -13,4 +13,5 @@ ...@@ -13,4 +13,5 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
MYSQL_ADD_PLUGIN(daemon_example daemon_example.cc MODULE_ONLY) MYSQL_ADD_PLUGIN(daemon_example daemon_example.cc
MODULE_ONLY MODULE_OUTPUT_NAME "libdaemon_example")
...@@ -77,7 +77,7 @@ INSTALL(FILES ...@@ -77,7 +77,7 @@ INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql ${CMAKE_CURRENT_SOURCE_DIR}/fill_help_tables.sql
${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql ${CMAKE_CURRENT_SOURCE_DIR}/mysql_test_data_timezone.sql
${FIX_PRIVILEGES_SQL} ${FIX_PRIVILEGES_SQL}
DESTINATION ${INSTALL_MYSQLSHAREDIR} DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
) )
# TCMalloc hacks # TCMalloc hacks
...@@ -175,12 +175,10 @@ ELSE() ...@@ -175,12 +175,10 @@ ELSE()
SET(EXT ".pl") SET(EXT ".pl")
ENDIF() ENDIF()
INSTALL(FILES INSTALL_SCRIPT(
"${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db${EXT}" "${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db${EXT}"
DESTINATION ${DEST} DESTINATION ${DEST}
PERMISSIONS OWNER_READ OWNER_WRITE COMPONENT Server
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
) )
...@@ -255,6 +253,7 @@ IF(MSVC) ...@@ -255,6 +253,7 @@ IF(MSVC)
ENDIF() ENDIF()
SET(NON_THREADED_LIBS ${CLIENT_LIBS}) SET(NON_THREADED_LIBS ${CLIENT_LIBS})
SET(mysql_config_COMPONENT COMPONENT Development)
IF(WIN32) IF(WIN32)
# On Windows, some .sh and some .pl.in files are configured # On Windows, some .sh and some .pl.in files are configured
...@@ -268,31 +267,22 @@ IF(WIN32) ...@@ -268,31 +267,22 @@ IF(WIN32)
mysqlhotcopy) mysqlhotcopy)
FOREACH(file ${PLIN_FILES}) FOREACH(file ${PLIN_FILES})
IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server_Scripts)
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.pl.in CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.pl.in
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl
DESTINATION scripts
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
ENDFOREACH() ENDFOREACH()
FOREACH(file ${SH_FILES}) FOREACH(file ${SH_FILES})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL(FILES INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl
DESTINATION scripts
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
ENDFOREACH() ENDFOREACH()
ELSE() ELSE()
# On Unix, most of the files end up in the bin directory # On Unix, most of the files end up in the bin directory
SET(mysql_config_COMPONENT COMPONENT Development)
SET(BIN_SCRIPTS SET(BIN_SCRIPTS
msql2mysql msql2mysql
mysql_config mysql_config
...@@ -321,13 +311,14 @@ ELSE() ...@@ -321,13 +311,14 @@ ELSE()
MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file} in " MESSAGE(FATAL_ERROR "Can not find ${file}.sh or ${file} in "
"${CMAKE_CURRENT_SOURCE_DIR}" ) "${CMAKE_CURRENT_SOURCE_DIR}" )
ENDIF() ENDIF()
INSTALL(FILES IF(NOT ${file}_COMPONENT)
${CMAKE_CURRENT_BINARY_DIR}/${file} SET(${file}_COMPONENT Server)
DESTINATION ${INSTALL_BINDIR} ENDIF()
PERMISSIONS OWNER_READ OWNER_WRITE INSTALL_SCRIPT(
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE ${CMAKE_CURRENT_BINARY_DIR}/${file}
WORLD_READ WORLD_EXECUTE DESTINATION ${INSTALL_BINDIR}
) COMPONENT ${${file}_COMPONENT}
)
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
...@@ -342,7 +333,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_FLAGS MATCHES "-static") ...@@ -342,7 +333,8 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_FLAGS MATCHES "-static")
ERROR_QUIET ERROR_QUIET
) )
IF(${RESULT} EQUAL 0 AND EXISTS ${LIBGCC_LOCATION}) IF(${RESULT} EQUAL 0 AND EXISTS ${LIBGCC_LOCATION})
INSTALL(FILES "${LIBGCC_LOCATION}" DESTINATION ${INSTALL_LIBDIR}) INSTALL(FILES "${LIBGCC_LOCATION}" DESTINATION ${INSTALL_LIBDIR}
COMPONENT Development)
ENDIF() ENDIF()
ENDIF() ENDIF()
...@@ -97,7 +97,7 @@ ELSE() ...@@ -97,7 +97,7 @@ ELSE()
SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
ENDIF() ENDIF()
MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR}) MYSQL_ADD_EXECUTABLE(mysqld ${MYSQLD_SOURCE} DESTINATION ${INSTALL_SBINDIR} COMPONENT Server)
IF(NOT WITHOUT_DYNAMIC_PLUGINS) IF(NOT WITHOUT_DYNAMIC_PLUGINS)
SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE) SET_TARGET_PROPERTIES(mysqld PROPERTIES ENABLE_EXPORTS TRUE)
...@@ -252,7 +252,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE") ...@@ -252,7 +252,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE")
# Avoid completely empty directories and install dummy file instead. # Avoid completely empty directories and install dummy file instead.
SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.empty ) SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.empty )
FILE(WRITE ${DUMMY_FILE} "") FILE(WRITE ${DUMMY_FILE} "")
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/test) INSTALL(FILES ${DUMMY_FILE} DESTINATION data/test COMPONENT DataFiles)
# Install initial database on windows # Install initial database on windows
IF(NOT CMAKE_CROSSCOMPILING) IF(NOT CMAKE_CROSSCOMPILING)
...@@ -280,7 +280,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE) ...@@ -280,7 +280,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
ALL ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/data/mysql/user.frm DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/data/mysql/user.frm
) )
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data DESTINATION . INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data DESTINATION . COMPONENT DataFiles
PATTERN "bootstrap.sql" EXCLUDE) PATTERN "bootstrap.sql" EXCLUDE)
ELSE() ELSE()
# Not windows or cross compiling, just install an empty directory # Not windows or cross compiling, just install an empty directory
......
...@@ -45,10 +45,10 @@ SET(files ...@@ -45,10 +45,10 @@ SET(files
FOREACH (dir ${dirs}) FOREACH (dir ${dirs})
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir} INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir}
DESTINATION ${INSTALL_MYSQLSHAREDIR}) DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server)
ENDFOREACH() ENDFOREACH()
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/charsets DESTINATION ${INSTALL_MYSQLSHAREDIR} INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/charsets DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
PATTERN "languages.html" EXCLUDE PATTERN "languages.html" EXCLUDE
) )
INSTALL(FILES ${files} DESTINATION ${INSTALL_MYSQLSHAREDIR}) INSTALL(FILES ${files} DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server)
...@@ -32,6 +32,8 @@ ELSE() ...@@ -32,6 +32,8 @@ ELSE()
SET(HOSTNAME "hostname") SET(HOSTNAME "hostname")
ENDIF() ENDIF()
# XXX: shouldn't we just have variables for all this stuff and centralise
# XXX: their configuration in install_layout.cmake?
IF(WIN32) IF(WIN32)
SET(inst_location ${INSTALL_DOCREADMEDIR}) SET(inst_location ${INSTALL_DOCREADMEDIR})
ELSE() ELSE()
...@@ -41,10 +43,13 @@ ENDIF() ...@@ -41,10 +43,13 @@ ENDIF()
FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small) FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh
${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY) ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} DESTINATION ${inst_location}) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension}
DESTINATION ${inst_location} COMPONENT IniFiles)
ENDFOREACH() ENDFOREACH()
IF(UNIX) IF(UNIX)
# XXX: again, used elsewhere (scripts/), should be standardised in
# XXX: install_layout.cmake
IF(INSTALL_LAYOUT MATCHES "STANDALONE") IF(INSTALL_LAYOUT MATCHES "STANDALONE")
SET(prefix ".") SET(prefix ".")
ELSE() ELSE()
...@@ -64,7 +69,7 @@ IF(UNIX) ...@@ -64,7 +69,7 @@ IF(UNIX)
INSTALL(FILES magic DESTINATION ${inst_location}) INSTALL(FILES magic DESTINATION ${inst_location})
ENDIF() ENDIF()
INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal) INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
CONFIGURE_FILE(MySQL-shared-compat.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/MySQL-shared-compat.spec @ONLY) CONFIGURE_FILE(MySQL-shared-compat.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/MySQL-shared-compat.spec @ONLY)
CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql.spec @ONLY) CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql.spec @ONLY)
CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql.${VERSION}.spec @ONLY) CONFIGURE_FILE(mysql.spec.sh ${CMAKE_CURRENT_BINARY_DIR}/mysql.${VERSION}.spec @ONLY)
......
This diff is collapsed.
...@@ -27,4 +27,4 @@ IF(WITH_UNIT_TESTS) ...@@ -27,4 +27,4 @@ IF(WITH_UNIT_TESTS)
SET_TARGET_PROPERTIES(bug25714 PROPERTIES LINKER_LANGUAGE CXX) SET_TARGET_PROPERTIES(bug25714 PROPERTIES LINKER_LANGUAGE CXX)
ENDIF() ENDIF()
INSTALL(TARGETS mysql_client_test DESTINATION bin) INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment