Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
4878ea45
Commit
4878ea45
authored
Jun 13, 2013
by
Vicent Martí
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1650 from nulltoken/ntk/winrc-filename
cmake: Add option to specify the name of the binary
parents
6de9b2ee
c1cf1af4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
17 deletions
+10
-17
CMakeLists.txt
+5
-14
src/win32/git2.rc
+5
-3
No files found.
CMakeLists.txt
View file @
4878ea45
...
...
@@ -27,7 +27,8 @@ OPTION( BUILD_EXAMPLES "Build library usage example apps" OFF )
OPTION
(
TAGS
"Generate tags"
OFF
)
OPTION
(
PROFILE
"Generate profiling information"
OFF
)
OPTION
(
ENABLE_TRACE
"Enables tracing support"
OFF
)
OPTION
(
SONAME_APPEND
"Append the given string to the library's filename"
OFF
)
OPTION
(
LIBGIT2_FILENAME
"Name of the produced binary"
OFF
)
IF
(
MSVC
)
# This option is only availalbe when building with MSVC. By default,
# libgit2 is build using the stdcall calling convention, as that's what
...
...
@@ -326,23 +327,13 @@ MSVC_SPLIT_SOURCES(git2)
IF
(
SONAME
)
SET_TARGET_PROPERTIES
(
git2 PROPERTIES VERSION
${
LIBGIT2_VERSION_STRING
}
)
SET_TARGET_PROPERTIES
(
git2 PROPERTIES SOVERSION
${
LIBGIT2_VERSION_MAJOR
}
)
IF
(
SONAME_APPEND
)
SET_TARGET_PROPERTIES
(
git2 PROPERTIES OUTPUT_NAME
"git2-
${
SONAME_APPEND
}
"
)
IF
(
LIBGIT2_FILENAME
)
ADD_DEFINITIONS
(
-DLIBGIT2_FILENAME=\
"
${
LIBGIT2_FILENAME
}
\"
)
SET_TARGET_PROPERTIES(git2 PROPERTIES OUTPUT_NAME
${
LIBGIT2_FILENAME
}
)
ENDIF()
ENDIF()
CONFIGURE_FILE(
${
CMAKE_CURRENT_SOURCE_DIR
}
/libgit2.pc.in
${
CMAKE_CURRENT_BINARY_DIR
}
/libgit2.pc @ONLY)
IF
(
NOT BUILD_SHARED_LIBS
)
SET
(
LIBGIT2_NAME_PREFIX
"lib"
)
ENDIF
()
IF
(
SONAME_APPEND
)
SET
(
LIBGIT2_NAME_SUFFIX
"-
${
SONAME_APPEND
}
"
)
ENDIF
()
CONFIGURE_FILE
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/win32/git2.rc.cmake
${
WIN_RC
}
@ONLY
)
IF (MSVC_IDE)
# Precompiled headers
SET_TARGET_PROPERTIES(git2 PROPERTIES COMPILE_FLAGS "
/Yuprecompiled.h /FIprecompiled.h
")
...
...
src/win32/git2.rc
.cmake
→
src/win32/git2.rc
View file @
4878ea45
#include <winver.h>
#include "../../include/git2/version.h"
#define LIBGIT2_FILENAME "@LIBGIT2_NAME_PREFIX@git2@LIBGIT2_NAME_SUFFIX@.dll"
#ifndef LIBGIT2_FILENAME
# define LIBGIT2_FILENAME "git2"
#endif
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION LIBGIT2_VER_MAJOR,LIBGIT2_VER_MINOR,LIBGIT2_VER_REVISION,0
...
...
@@ -23,9 +25,9 @@ BEGIN
BEGIN
VALUE "FileDescription", "libgit2 - the Git linkable library\0"
VALUE "FileVersion", LIBGIT2_VERSION "\0"
VALUE
"InternalName"
, LIBGIT2_FILENAME
"\0"
VALUE "InternalName", LIBGIT2_FILENAME "
.dll
\0"
VALUE "LegalCopyright", "Copyright (C) the libgit2 contributors. All rights reserved.\0"
VALUE
"OriginalFilename"
, LIBGIT2_FILENAME
"\0"
VALUE "OriginalFilename", LIBGIT2_FILENAME "
.dll
\0"
VALUE "ProductName", "libgit2\0"
VALUE "ProductVersion", LIBGIT2_VERSION "\0"
VALUE "Comments", "For more information visit http://libgit2.github.com/\0"
...
...
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