Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
56700fd3
Commit
56700fd3
authored
Feb 20, 2010
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install static client and embedded debug libraries
parent
b2d289f3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
37 deletions
+63
-37
cmake/install_macros.cmake
cmake/install_macros.cmake
+50
-0
cmake/os/Windows.cmake
cmake/os/Windows.cmake
+1
-0
libmysql/CMakeLists.txt
libmysql/CMakeLists.txt
+5
-0
libmysqld/CMakeLists.txt
libmysqld/CMakeLists.txt
+5
-0
sql/CMakeLists.txt
sql/CMakeLists.txt
+2
-37
No files found.
cmake/install_macros.cmake
View file @
56700fd3
...
...
@@ -161,3 +161,53 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
SET
(
INSTALL_LOCATION
)
ENDFUNCTION
()
# Optionally install mysqld/client/embedded 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"
CACHE INTERNAL
"Directory of debug build"
)
FUNCTION
(
INSTALL_DEBUG_TARGET target
)
CMAKE_PARSE_ARGUMENTS
(
ARG
"DESTINATION;RENAME"
""
${
ARGN
}
)
GET_TARGET_PROPERTY
(
target_type
${
target
}
TYPE
)
IF
(
ARG_RENAME
)
SET
(
RENAME_PARAM RENAME
${
ARG_RENAME
}${
CMAKE_
${
target_type
}
_SUFFIX
}
)
ELSE
()
SET
(
RENAME_PARAM
)
ENDIF
()
IF
(
NOT ARG_DESTINATION
)
MESSAGE
(
FATAL_ERROR
"Need DESTINATION parameter for INSTALL_DEBUG_TARGET"
)
ENDIF
()
GET_TARGET_PROPERTY
(
target_location
${
target
}
LOCATION
)
IF
(
CMAKE_GENERATOR MATCHES
"Makefiles"
)
STRING
(
REPLACE
"
${
CMAKE_BINARY_DIR
}
"
"
${
DEBUGBUILDDIR
}
"
debug_target_location
"
${
target_location
}
"
)
ELSE
()
STRING
(
REPLACE
"
${
CMAKE_CFG_INTDIR
}
"
"Debug"
debug_target_location
"
${
target_location
}
"
)
ENDIF
()
INSTALL
(
FILES
${
debug_target_location
}
DESTINATION
${
ARG_DESTINATION
}
${
RENAME_PARAM
}
CONFIGURATIONS Release RelWithDebInfo
OPTIONAL
)
IF
(
MSVC
)
GET_FILENAME_COMPONENT
(
ext
${
debug_target_location
}
EXT
)
STRING
(
REPLACE
"
${
ext
}
"
".pdb"
debug_pdb_target_location
"
${
debug_target_location
}
"
)
IF
(
RENAME_PARAM
)
STRING
(
REPLACE
"
${
ext
}
"
".pdb"
"
${
ARG_RENAME
}
"
pdb_rename
)
SET
(
PDB_RENAME_PARAM RENAME
${
pdb_rename
}
)
ENDIF
()
INSTALL
(
FILES
${
debug_pdb_target_location
}
DESTINATION
${
ARG_DESTINATION
}
${
RPDB_RENAME_PARAM
}
CONFIGURATIONS Release RelWithDebInfo
OPTIONAL
)
ENDIF
()
ENDFUNCTION
()
cmake/os/Windows.cmake
View file @
56700fd3
...
...
@@ -88,6 +88,7 @@ IF(MSVC)
# Fix CMake's predefined huge stack size
FOREACH
(
type EXE SHARED MODULE
)
STRING
(
REGEX REPLACE
"/STACK:([^ ]+)"
""
CMAKE_
${
type
}
_LINKER_FLAGS
"
${
CMAKE_
${
type
}
_LINKER_FLAGS
}
"
)
STRING
(
REGEX REPLACE
"/INCREMENTAL:([^ ]+)"
""
CMAKE_
${
type
}
_LINKER_FLAGS_RELWITHDEBINFO
"
${
CMAKE_
${
type
}
_LINKER_FLAGS_RELWITHDEBINFO
}
"
)
ENDFOREACH
()
ADD_DEFINITIONS
(
-DPTHREAD_STACK_MIN=1048576
)
...
...
libmysql/CMakeLists.txt
View file @
56700fd3
...
...
@@ -157,6 +157,11 @@ IF(UNIX)
INSTALL_SYMLINK
(
${
CMAKE_STATIC_LIBRARY_PREFIX
}
mysqlclient_r mysqlclient
${
INSTALL_LIBDIR
}
)
ENDIF
()
# Visual Studio users need debug static library for debug projects
IF
(
MSVC
)
INSTALL_DEBUG_TARGET
(
mysqlclient DESTINATION
${
INSTALL_LIBDIR
}
/debug
)
ENDIF
()
IF
(
NOT DISABLE_SHARED
)
MERGE_LIBRARIES
(
libmysql SHARED
${
LIBS
}
EXPORTS
${
CLIENT_API_FUNCTIONS
}
)
IF
(
UNIX
)
...
...
libmysqld/CMakeLists.txt
View file @
56700fd3
...
...
@@ -126,6 +126,11 @@ ENDFOREACH()
MERGE_LIBRARIES
(
mysqlserver STATIC
${
EMBEDDED_LIBS
}
OUTPUT_NAME
${
MYSQLSERVER_OUTPUT_NAME
}
)
# Visual Studio users need debug static library
IF
(
MSVC
)
INSTALL_DEBUG_TARGET
(
mysqlserver DESTINATION
${
INSTALL_LIBDIR
}
/debug
)
ENDIF
()
IF
(
MSVC AND NOT DISABLE_SHARED
)
MERGE_LIBRARIES
(
libmysqld SHARED
${
LIBS
}
EXPORTS
${
CLIENT_API_FUNCTIONS
}
)
ENDIF
()
sql/CMakeLists.txt
View file @
56700fd3
...
...
@@ -156,6 +156,7 @@ IF(WITH_MYSQLD_LDFLAGS)
SET_TARGET_PROPERTIES
(
mysqld PROPERTIES LINK_FLAGS
"
${
MYSQLD_LINK_FLAGS
}
${
WITH_MYSQLD_LDFLAGS
}
"
)
ENDIF
()
INSTALL_DEBUG_TARGET
(
mysqld DESTINATION
${
INSTALL_SBINDIR
}
RENAME mysqld-debug
)
# Handle out-of-source build from source package with possibly broken
# bison. Copy bison output to from source to build directory, if not already
...
...
@@ -189,7 +190,7 @@ ADD_CUSTOM_COMMAND(
${
CMAKE_COMMAND
}
-E copy_if_different lex_hash.h.tmp lex_hash.h
COMMAND
${
CMAKE_COMMAND
}
-E remove -f lex_hash.h.tmp
WORKING_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
DEPENDS
gen_lex_hash
)
DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/gen_lex_hash.cc
)
ADD_CUSTOM_TARGET
(
GenServerSource
...
...
@@ -275,39 +276,3 @@ 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"
CACHE INTERNAL
"Directory of debug build"
)
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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment