Commit a52ea360 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

- Optionally, copy mysqld renamed to mysqld-debug from debug build directory into resulting package

- Fix  to mysql_install_db.pl to the correct place on Windows ( under scripts directory)
parent 8c9c2431
......@@ -154,12 +154,21 @@ ELSE()
SET(localstatedir ${MYSQL_DATADIR})
ENDIF()
IF(UNIX)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.sh
${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db ESCAPE_QUOTES @ONLY)
SET(DEST ${INSTALL_BINDIR})
SET(EXT)
ELSE()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_install_db.pl.in
${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db.pl ESCAPE_QUOTES @ONLY)
SET(DEST ${INSTALL_SCRIPTDIR})
SET(EXT ".pl")
ENDIF()
INSTALL(FILES
"${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db"
DESTINATION bin
"${CMAKE_CURRENT_BINARY_DIR}/mysql_install_db${EXT}"
DESTINATION ${DEST}
PERMISSIONS OWNER_READ OWNER_WRITE
OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
......
......@@ -276,3 +276,39 @@ ELSE()
ENDIF()
ENDIF()
# Optionally install mysqld from debug build run. outside of the current build dir
# (unless multi-config generator is used# like Visual Studio or Xcode).
# For Makefile generators we default Debug build directory to ${buildroot}/../debug.
GET_FILENAME_COMPONENT(BINARY_PARENTDIR ${CMAKE_BINARY_DIR} PATH)
SET(DEBUGBUILDDIR "${BINARY_PARENTDIR}/debug")
IF(WIN32)
SET(EXE ".exe")
ELSE()
SET(EXE)
ENDIF()
IF(CMAKE_GENERATOR MATCHES "Makefiles")
SET(MYSQLD_DEBUG_EXE ${DEBUGBUILDDIR}/sql/mysqld${EXE})
ELSE()
# Visual Studio and Xcode
SET(MYSQLD_DEBUG_EXE ${CMAKE_BINARY_DIR}/sql/Debug/mysqld${EXE})
ENDIF()
INSTALL(FILES ${MYSQLD_DEBUG_EXE}
DESTINATION ${INSTALL_SBINDIR}
RENAME mysqld-debug${EXE}
CONFIGURATIONS Release RelWithDebInfo
OPTIONAL)
IF(WIN32)
STRING(REPLACE ".exe" ".pdb" MYSQLD_DEBUG_PDB ${MYSQLD_DEBUG_EXE})
INSTALL(FILES ${MYSQLD_DEBUG_PDB}
CONFIGURATIONS Release RelWithDebInfo
DESTINATION ${INSTALL_SBINDIR}
RENAME mysqld-debug.pdb
OPTIONAL)
ENDIF()
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