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
04d1596d
Commit
04d1596d
authored
Dec 16, 2009
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix windows errors with version resource
parent
28a7bb8b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
38 deletions
+8
-38
cmake/install_macros.cmake
cmake/install_macros.cmake
+3
-6
cmake/mysql_version.cmake
cmake/mysql_version.cmake
+4
-32
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-0
No files found.
cmake/install_macros.cmake
View file @
04d1596d
...
...
@@ -32,7 +32,9 @@ MACRO (INSTALL_DEBUG_SYMBOLS targets)
STRING
(
REPLACE
".exe"
".pdb"
pdb_location
${
location
}
)
STRING
(
REPLACE
".dll"
".pdb"
pdb_location
${
pdb_location
}
)
STRING
(
REPLACE
".lib"
".pdb"
pdb_location
${
pdb_location
}
)
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
}
)
ENDFOREACH
()
ENDIF
()
...
...
@@ -134,11 +136,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
ENDFOREACH
()
ENDIF
()
IF
(
WIN32
)
FOREACH
(
target
${
TARGETS
}
)
EMBED_VERSION_INFO
(
${
target
}
)
ENDFOREACH
()
ENDIF
()
INSTALL
(
TARGETS
${
TARGETS
}
DESTINATION
${
ARG_DESTINATION
}
)
SET
(
INSTALL_LOCATION
${
ARG_DESTINATION
}
)
...
...
cmake/mysql_version.cmake
View file @
04d1596d
...
...
@@ -150,7 +150,7 @@ SET(COMPANYNAME ${CPACK_PACKAGE_VENDOR})
# Function to embed version info into executables/dlls on Windows
# Refer http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
# for more information
FUNCTION
(
EMBED_VERSION_INFO target
)
FUNCTION
(
WIN32_ADD_VERSION_INFO SOURCES
)
IF
(
NOT WIN32
)
RETURN
()
ENDIF
()
...
...
@@ -158,14 +158,8 @@ FUNCTION(EMBED_VERSION_INFO target)
RETURN
()
ENDIF
()
GET_TARGET_PROPERTY
(
target_type
${
target
}
TYPE
)
IF
(
target_type MATCHES
"STATIC"
)
RETURN
()
ENDIF
()
IF
(
TARGET_TYPE MATCHES
"EXE"
)
IF
(
NOT FILETYPE
)
SET
(
FILETYPE VFT_APP
)
ELSE
()
SET
(
FILETYPE VFT_DLL
)
ENDIF
()
IF
(
NOT MAJOR_VERSION
)
...
...
@@ -185,29 +179,7 @@ FUNCTION(EMBED_VERSION_INFO target)
ENDIF
()
GET_FILENAME_COMPONENT
(
ORIGINALFILENAME
${
target_location
}
NAME
)
# Directory where we have resouce script and compiled .res file
SET
(
RES_DIR
${
CMAKE_BINARY_DIR
}
/version_resources
)
# Create resource script (.rc)
CONFIGURE_FILE
(
${
CMAKE_SOURCE_DIR
}
/cmake/versioninfo.rc.in
${
RES_DIR
}
/
${
target
}
_versioninfo.rc
)
# Compile resource script to object if required
IF
(
EXISTS
${
RES_DIR
}
/
${
target
}
_versioninfo.res
)
IF
(
${
RES_DIR
}
/
${
target
}
_versioninfo.rc IS_NEWER_THAN
${
RES_DIR
}
/
${
target
}
_versioninfo.res
)
SET
(
RUN_RC 1
)
ENDIF
()
ELSE
()
SET
(
RUN_RC 1
)
ENDIF
()
IF
(
RUN_RC
)
# Run resource compiler
EXECUTE_PROCESS
(
COMMAND
${
CMAKE_RC_COMPILER
}
${
target
}
_versioninfo.rc
WORKING_DIRECTORY
${
RES_DIR
}
OUTPUT_QUIET
)
ENDIF
()
TARGET_LINK_LIBRARIES
(
${
target
}
${
RES_DIR
}
/
${
target
}
_versioninfo.res
)
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
target
}
_versioninfo.rc
)
LIST
(
APPEND
${
SOURCES
}
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
target
}
_versioninfo.rc
)
ENDFUNCTION
()
sql/CMakeLists.txt
View file @
04d1596d
...
...
@@ -95,6 +95,7 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
IF
(
WIN32
)
SET
(
MYSQLD_SOURCE main.cc nt_servc.cc nt_servc.h
)
WIN32_ADD_VERSION_INFO
(
MYSQLD_SOURCE
)
ELSE
()
SET
(
MYSQLD_SOURCE main.cc
${
DTRACE_PROBES_ALL
}
)
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