Commit f68e8aa8 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix a couple fo things replated to MSI

parent 900317e6
......@@ -264,14 +264,16 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
INSTALL(FILES EXCEPTIONS-CLIENT DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT
Development)
INSTALL(FILES COPYING README DESTINATION ${INSTALL_DOCREADMEDIR})
INSTALL(FILES COPYING DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme OPTIONAL)
INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
IF(UNIX)
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR})
INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Documentation)
ENDIF()
# MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR})
INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR} COMPONENT Documentation)
# Packaging
IF(WIN32)
SET(CPACK_GENERATOR "ZIP")
......
......@@ -35,7 +35,12 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
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()
ENDIF()
ENDMACRO()
......
......@@ -4,10 +4,10 @@ IF(NOT WIN32)
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"
$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)
......@@ -31,6 +31,12 @@ ENDIF()
ADD_CUSTOM_TARGET(
MSI
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
COMMAND ${CMAKE_COMMAND} -DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
ADD_CUSTOM_TARGET(
MSI_ESSENTIALS
COMMAND set VS_UNICODE_OUTPUT=
COMMAND ${CMAKE_COMMAND} -DESSENTIALS=1 -DCPACK_WIX_CONFIG=${CMAKE_CURRENT_SOURCE_DIR}/CPackWixConfig.cmake ${CONFIG_PARAM} -P ${CMAKE_CURRENT_BINARY_DIR}/create_msi.cmake
)
......@@ -11,9 +11,21 @@ FOREACH(comp ${COMPS})
)
ENDFOREACH()
SET(INC 0)
MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}")
STRING(REPLACE "-" "_" ${varname} "${${varname}}")
STRING(REPLACE "/" "." ret "${str}")
STRING(REPLACE "-" "_" ret "${ret}}")
STRING(LENGTH l "${ret}")
IF(l GREATER 65)
STRING(SUBSTRING "${ret}" 0 64 ret)
MATH(EXPR INC ${INC}+1)
SET(ret "${ret}${INC})
ENDIF()
SET(${varname} ${ret})
ENDMACRO()
MACRO(GENERATE_GUID VarName)
EXECUTE_PROCESS(COMMAND uuidgen -c OUTPUT_VARIABLE ${VarName} OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDMACRO()
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
......@@ -24,23 +36,34 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FILE(RELATIVE_PATH dir_rel ${topdir} ${dir})
IF(dir_rel)
MAKE_DIRECTORY(${dir_root}/${dir_rel})
MAKE_WIX_IDENTIFIER("${dir_rel}" id)
FILE(APPEND ${file} "<DirectoryRef Id='directory.${id}'>\n")
MAKE_WIX_IDENTIFIER("${dir_rel}" dir_id)
ELSE()
FILE(APPEND ${file} "<DirectoryRef Id='INSTALLDIR'>\n")
ENDIF()
FILE(APPEND ${file} "<DirectoryRef Id='D.${dir_id}'>\n")
SET(NONEXEFILES)
FOREACH(f ${all_files})
IF(NOT IS_DIRECTORY ${f})
FILE(RELATIVE_PATH rel ${topdir} ${f})
GET_FILENAME_COMPONENT(ext "${f}" EXT)
FILE(TO_NATIVE_PATH ${f} f_native)
FILE(RELATIVE_PATH rel ${topdir} ${f})
MAKE_WIX_IDENTIFIER("${rel}" id)
FILE(TO_NATIVE_PATH ${f} f_native)
FILE(APPEND ${file} " <Component Id='component.${id}' Guid='*'>\n")
FILE(APPEND ${file} " <File Id='file.${id}' KeyPath='yes' Source='${f_native}'/>\n")
FILE(APPEND ${file} " </Component>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='component.${id}'/>\n")
IF(ext MATCHES ".dll" OR ext MATCHES ".exe")
FILE(APPEND ${file} " <Component Id='C.${id}' Guid='*'>\n")
FILE(APPEND ${file} " <File Id='file.${id}' KeyPath='yes' Source='${f_native}'/>\n")
FILE(APPEND ${file} " </Component>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='C.${id}'/>\n")
ELSE()
# Collect nonexe files into a single component to reduce number of components
SET(NONEXEFILES "${NONEXEFILES} <File Id='file.${id}' Source='${f_native}'/>\n")
ENDIF()
ENDIF()
ENDFOREACH()
IF(NONEXEFILES)
GENERATE_GUID(guid)
FILE(APPEND ${file} " <Component Id='C.${d_name}.${dir_id}.nonexefiles' Id='${guid}>\n${NONEXEFILES}</Component>"
ENDIF()
FILE(APPEND ${file} "</DirectoryRef>\n")
FOREACH(f ${all_files})
IF(IS_DIRECTORY ${f})
......@@ -54,7 +77,7 @@ FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix)
IF(rel)
MAKE_WIX_IDENTIFIER("${rel}" id)
GET_FILENAME_COMPONENT(name ${dir} NAME)
FILE(APPEND ${file} "${prefix}<Directory Id='directory.${id}' Name='${name}'>\n")
FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\n")
ENDIF()
FILE(GLOB all_files ${dir}/*)
FOREACH(f ${all_files})
......
......@@ -7,12 +7,143 @@ SET(CMAKE_CFG_INTDIR "@CMAKE_CFG_INTDIR@")
SET(MAJOR_VERSION "@MAJOR_VERSION@")
SET(MINOR_VERSION "@MINOR_VERSION@")
SET(PATCH "@PATCH@")
SET(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@)
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(Win64 " Win64='yes'")
SET(Platform x64)
SET(PlatformProgramFilesFolder ProgramFiles64Folder)
ELSE()
SET(Platform x86)
SET(PlatformProgramFilesFolder ProgramFilesFolder)
SET(Win64)
ENDIF()
SET(ENV{VS_UNICODE_OUTPUT})
INCLUDE(${CMAKE_BINARY_DIR}/CPackConfig.cmake)
IF(CPACK_WIX_CONFIG)
INCLUDE(${CPACK_WIX_CONFIG})
ENDIF()
IF(NOT CPACK_WIX_UI)
SET(CPACK_WIX_UI "WixUI_Mondo")
ENDIF()
SET(WIX_FEATURES)
FOREACH(comp ${CPACK_COMPONENTS_ALL})
STRING(TOUPPER "${comp}" comp_upper)
IF(NOT CPACK_COMPONENT_${comp_upper}_GROUP)
SET(WIX_FEATURE_${comp_upper}_COMPONENTS "${comp}")
SET(CPACK_COMPONENT_${comp_upper}_HIDDEN 1)
SET(CPACK_COMPONENT_GROUP_${comp_upper}_DISPLAY_NAME ${CPACK_COMPONENT_${comp_upper}_DISPLAY_NAME})
SET(CPACK_COMPONENT_GROUP_${comp_upper}_DESCRIPTION ${CPACK_COMPONENT_${comp_upper}_DESCRIPTION})
SET(CPACK_COMPONENT_GROUP_${comp_upper}_WIX_LEVEL ${CPACK_COMPONENT_${comp_upper}_WIX_LEVEL})
SET(WIX_FEATURES ${WIX_FEATURES} WIX_FEATURE_${comp_upper})
ELSE()
SET(FEATURE_NAME WIX_FEATURE_${CPACK_COMPONENT_${comp_upper}_GROUP})
SET(WIX_FEATURES ${WIX_FEATURES} ${FEATURE_NAME})
LIST(APPEND ${FEATURE_NAME}_COMPONENTS ${comp})
ENDIF()
ENDFOREACH()
LIST(REMOVE_DUPLICATES WIX_FEATURES)
SET(CPACK_WIX_FEATURES)
FOREACH(f ${WIX_FEATURES})
STRING(TOUPPER "${f}" f_upper)
STRING(REPLACE "WIX_FEATURE_" "" f_upper ${f_upper})
IF (CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
SET(TITLE ${CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME})
ELSE()
SET(TITLE CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
ENDIF()
IF (CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
SET(DESCRIPTION ${CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION})
ELSE()
SET(DESCRIPTION CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
ENDIF()
IF(CPACK_COMPONENT_${f_upper}_WIX_LEVEL)
SET(Level ${CPACK_COMPONENT_${f_upper}_WIX_LEVEL})
ELSE()
SET(Level 1)
ENDIF()
IF(CPACK_COMPONENT_GROUP_${f_upper}_HIDDEN)
SET(DISPLAY "Display='hidden'")
SET(TITLE ${f_upper})
SET(DESCRIPTION ${f_upper})
ELSE()
SET(DISPLAY)
IF(CPACK_COMPONENT_GROUP_${f_upper}_EXPANDED)
SET(DISPLAY "Display='expand'")
ENDIF()
IF (CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
SET(TITLE ${CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME})
ELSE()
SET(TITLE CPACK_COMPONENT_GROUP_${f_upper}_DISPLAY_NAME)
ENDIF()
IF (CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
SET(DESCRIPTION ${CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION})
ELSE()
SET(DESCRIPTION CPACK_COMPONENT_GROUP_${f_upper}_DESCRIPTION)
ENDIF()
ENDIF()
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
<Feature Id='${f_upper}'
Title='${TITLE}'
Description='${DESCRIPTION}'
Level='${Level}' ${DISPLAY} >"
)
FOREACH(c ${${f}_COMPONENTS})
STRING(TOUPPER "${c}" c_upper)
IF (CPACK_COMPONENT_${c_upper}_DISPLAY_NAME)
SET(TITLE ${CPACK_COMPONENT_${c_upper}_DISPLAY_NAME})
ELSE()
SET(TITLE CPACK_COMPONENT_${c_upper}_DISPLAY_NAME)
ENDIF()
IF (CPACK_COMPONENT_${c_upper}_DESCRIPTION)
SET(DESCRIPTION ${CPACK_COMPONENT_${c_upper}_DESCRIPTION})
ELSE()
SET(DESCRIPTION CPACK_COMPONENT_${c_upper}_DESCRIPTION)
ENDIF()
IF(CPACK_COMPONENT_${c_upper}_WIX_LEVEL)
SET(Level ${CPACK_COMPONENT_${c_upper}_WIX_LEVEL})
ELSE()
SET(Level 1)
ENDIF()
IF(CPACK_COMPONENT_${c_upper}_HIDDEN)
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
<ComponentGroupRef Id='componentgroup.${c}'/>")
ELSE()
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
<Feature Id='${c}'
Title='${TITLE}'
Description='${DESCRIPTION}'
Level='${Level}'>
<ComponentGroupRef Id='componentgroup.${c}'/>
</Feature>")
ENDIF()
ENDFOREACH()
SET(CPACK_WIX_FEATURES
"${CPACK_WIX_FEATURES}
</Feature>
")
ENDFOREACH()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_server.wxs.in
${CMAKE_CURRENT_BINARY_DIR}/mysql_server.wxs)
IF(CMAKE_INSTALL_CONFIG_NAME)
SET(CONFIG_PARAM "-DCMAKE_INSTALL_CONFIG_NAME=${CMAKE_INSTALL_CONFIG_NAME}")
......@@ -28,6 +159,12 @@ FOREACH(comp ${CPACK_COMPONENTS_ALL})
)
ENDFOREACH()
MACRO(GENERATE_GUID VarName)
EXECUTE_PROCESS(COMMAND uuidgen -c
OUTPUT_VARIABLE ${VarName}
OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDMACRO()
SET(INC_VAR 0)
MACRO(MAKE_WIX_IDENTIFIER str varname)
STRING(REPLACE "/" "." ${varname} "${str}")
......@@ -43,7 +180,8 @@ MACRO(MAKE_WIX_IDENTIFIER str varname)
ENDIF()
ENDMACRO()
FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
FUNCTION(TRAVERSE_FILES dir topdir file file_comp file_default_component dir_root)
FILE(GLOB all_files ${dir}/*)
IF(NOT all_files)
RETURN()
......@@ -52,26 +190,42 @@ FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root)
IF(dir_rel)
MAKE_DIRECTORY(${dir_root}/${dir_rel})
MAKE_WIX_IDENTIFIER("${dir_rel}" id)
FILE(APPEND ${file} "<DirectoryRef Id='D.${id}'>\n")
SET(DirectoryRefId "D.${id}")
ELSE()
FILE(APPEND ${file} "<DirectoryRef Id='INSTALLDIR'>\n")
SET(DirectoryRefId "INSTALLDIR")
ENDIF()
FILE(APPEND ${file} "<DirectoryRef Id='${DirectoryRefId}'>\n")
SET(NONEXEFILES)
FOREACH(f ${all_files})
IF(NOT IS_DIRECTORY ${f})
FILE(RELATIVE_PATH rel ${topdir} ${f})
MAKE_WIX_IDENTIFIER("${rel}" id)
FILE(TO_NATIVE_PATH ${f} f_native)
FILE(APPEND ${file} " <Component Id='C.${id}' Guid='*'>\n")
FILE(APPEND ${file} " <File Id='F.${id}' KeyPath='yes' Source='${f_native}'/>\n")
FILE(APPEND ${file} " </Component>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='C.${id}'/>\n")
GET_FILENAME_COMPONENT(f_ext "${f}" EXT)
# According to MSDN each DLL or EXE should be in the own component
IF(f_ext MATCHES ".exe" OR f_ext MATCHES ".dll")
FILE(APPEND ${file} " <Component Id='C.${id}' Guid='*' ${Win64}>\n")
FILE(APPEND ${file} " <File Id='F.${id}' KeyPath='yes' Source='${f_native}'/>\n")
FILE(APPEND ${file} " </Component>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='C.${id}'/>\n")
ELSE()
SET(NONEXEFILES "${NONEXEFILES}\n<File Id='F.${id}' Source='${f_native}'/>" )
ENDIF()
ENDIF()
ENDFOREACH()
FILE(APPEND ${file} "</DirectoryRef>\n")
IF(NONEXEFILES)
GENERATE_GUID(guid)
SET(ComponentId "C._files_${COMP_NAME}.${DirectoryRefId}")
FILE(APPEND ${file_default_component}
"<DirectoryRef Id='${DirectoryRefId}'>\n<Component Guid='${guid}' Id='${ComponentId}' ${Win64}>${NONEXEFILES}\n</Component></DirectoryRef>\n")
FILE(APPEND ${file_comp} " <ComponentRef Id='${ComponentId}'/>\n")
ENDIF()
FOREACH(f ${all_files})
IF(IS_DIRECTORY ${f})
TRAVERSE_FILES(${f} ${topdir} ${file} ${file_comp} ${dir_root})
TRAVERSE_FILES(${f} ${topdir} ${file} ${file_comp} ${file_default_component} ${dir_root})
ENDIF()
ENDFOREACH()
ENDFUNCTION()
......@@ -101,9 +255,14 @@ FOREACH(d ${DIRS})
GET_FILENAME_COMPONENT(d_name ${d} NAME)
FILE(WRITE
${abs}/${d_name}.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\n<Fragment>\n")
FILE(WRITE
${abs}/${d_name}_default_component.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'><Fragment>")
FILE(WRITE
${abs}/${d_name}_component_group.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\n<Fragment>\n<ComponentGroup Id='componentgroup.${d_name}'>\n")
TRAVERSE_FILES(${d} ${d} ${abs}/${d_name}.wxs ${abs}/${d_name}_component_group.wxs "${abs}/dirs")
${abs}/${d_name}_component_group.wxs "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
<Fragment>\n<ComponentGroup Id='componentgroup.${d_name}'>")
SET(COMP_NAME ${d_name})
TRAVERSE_FILES(${d} ${d} ${abs}/${d_name}.wxs ${abs}/${d_name}_component_group.wxs ${abs}/${d_name}_default_component.wxs "${abs}/dirs")
FILE(APPEND ${abs}/${d_name}_default_component.wxs "\n</Fragment>\n</Wix>")
FILE(APPEND ${abs}/${d_name}.wxs " </Fragment>\n</Wix>")
FILE(APPEND ${abs}/${d_name}_component_group.wxs "</ComponentGroup>\n</Fragment>\n</Wix>")
ENDFOREACH()
......
......@@ -3,27 +3,22 @@
Name="MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@" Version="@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH@" Language="1033" Manufacturer="MySQL AB">
<Package Id='*' Keywords='Installer' Description="MySQL Database Server"
Manufacturer='MySQL AB'
InstallerVersion='310' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
InstallerVersion='200' Languages='1033' Compressed='yes' SummaryCodepage='1252'
Platform='@Platform@'/>
<Media Id='1' Cabinet='product.cab' EmbedCab='yes' />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='ProgramFilesFolder'>
<Directory Id='@PlatformProgramFilesFolder@'>
<Directory Id='directory.MySQL' Name='MySQL'>
<Directory Id='INSTALLDIR' Name='MySQL Server @MAJOR_VERSION@.@MINOR_VERSION@'>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id='Server' Level='1' Title="MySQL Server" Description="Install MySQL server" Display="expand">
<ComponentGroupRef Id='componentgroup.Server'/>
<Feature Level='1' Id='ClientPrograms' Title="Client Programs" Description="Various helpful (commandline) tools including the mysql command line client" >
<ComponentGroupRef Id="componentgroup.Client" />
</Feature>
</Feature>
<Feature Id='Devel' Level='1' Title="Development Components"
Description="Installs C/C++ header files and libraries">
<ComponentGroupRef Id='componentgroup.Development' />
</Feature>
<UIRef Id="WixUI_FeatureTree" />
<!-- CPACK_WIX_FEATURES -->
@CPACK_WIX_FEATURES@
<!--CPACK_WIX_FEATURES end -->
<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" />
......
......@@ -244,6 +244,7 @@ IF(MSVC)
ENDIF()
SET(NON_THREADED_LIBS ${CLIENT_LIBS})
SET(mysql_config_COMPONENT COMPONENT Development)
IF(WIN32)
# On Windows, some .sh and some .pl.in files are configured
......@@ -256,15 +257,18 @@ IF(WIN32)
SET(SH_FILES mysql_convert_table_format mysqld_multi)
FOREACH(file ${PLIN_FILES})
IF(NOT ${file}_COMPONENT)
SET(${file}_COMPONENT Server_Scripts)
ENDIF()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.pl.in
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
ENDFOREACH()
FOREACH(file ${SH_FILES})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl)
INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
ENDFOREACH()
ELSE()
# On Unix, most of the files end up in the bin directory
......
......@@ -241,7 +241,7 @@ IF(INSTALL_LAYOUT STREQUAL "STANDALONE")
# Avoid completely empty directories and install dummy file instead.
SET(DUMMY_FILE ${CMAKE_CURRENT_BINARY_DIR}/.empty )
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
IF(NOT CMAKE_CROSSCOMPILING)
......@@ -269,7 +269,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/data/mysql/user.frm
)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data/mysql DESTINATION data)
INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data/mysql DESTINATION data COMPONENT DataFiles)
ELSE()
# Not windows or cross compiling, just install an empty directory
INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql)
......
......@@ -34,7 +34,8 @@ ENDIF()
FOREACH(inifile my-huge my-innodb-heavy-4G my-large my-medium my-small)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${inifile}.cnf.sh
${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} DESTINATION ${INSTALL_DOCREADMEDIR})
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${inifile}.${ini_file_extension} DESTINATION
${INSTALL_DOCREADMEDIR} COMPONENT IniFiles)
ENDFOREACH()
......
......@@ -27,4 +27,4 @@ IF(WITH_UNIT_TESTS)
SET_TARGET_PROPERTIES(bug25714 PROPERTIES LINKER_LANGUAGE CXX)
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